mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
fix(stack): make web editor readonly for git template EE-6706 (#11183)
Some checks failed
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled
Some checks failed
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled
This commit is contained in:
parent
380b23a9f5
commit
988064a542
2 changed files with 6 additions and 2 deletions
|
@ -204,6 +204,9 @@ class CustomTemplatesViewController {
|
||||||
|
|
||||||
const template = _.find(this.templates, { Id: templateId });
|
const template = _.find(this.templates, { Id: templateId });
|
||||||
|
|
||||||
|
const isGit = template.GitConfig !== null;
|
||||||
|
this.state.isEditorReadOnly = isGit;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.state.templateContent = this.formValues.fileContent = await this.CustomTemplateService.customTemplateFile(template.Id, template.GitConfig !== null);
|
this.state.templateContent = this.formValues.fileContent = await this.CustomTemplateService.customTemplateFile(template.Id, template.GitConfig !== null);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -302,10 +302,11 @@ angular
|
||||||
$scope.state.selectedTemplate = template;
|
$scope.state.selectedTemplate = template;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$scope.state.templateContent = await this.CustomTemplateService.customTemplateFile(templateId, template.GitConfig !== null);
|
const isGit = template.GitConfig !== null;
|
||||||
|
$scope.state.templateContent = await this.CustomTemplateService.customTemplateFile(templateId, isGit);
|
||||||
onChangeFileContent($scope.state.templateContent);
|
onChangeFileContent($scope.state.templateContent);
|
||||||
|
|
||||||
$scope.state.isEditorReadOnly = false;
|
$scope.state.isEditorReadOnly = isGit;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
$scope.state.templateLoadFailed = true;
|
$scope.state.templateLoadFailed = true;
|
||||||
throw err;
|
throw err;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue