mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 04:15:28 +02:00
fix(edge/templates): fix issues with git templates [EE-6357] (#10679)
This commit is contained in:
parent
974378c9b5
commit
2a18c9f215
16 changed files with 201 additions and 116 deletions
|
@ -12,6 +12,11 @@ class DockerComposeFormController {
|
|||
this.onChangeFile = this.onChangeFile.bind(this);
|
||||
this.onChangeMethod = this.onChangeMethod.bind(this);
|
||||
this.onChangeFormValues = this.onChangeFormValues.bind(this);
|
||||
this.isGitTemplate = this.isGitTemplate.bind(this);
|
||||
}
|
||||
|
||||
isGitTemplate() {
|
||||
return this.state.Method === 'template' && !!this.templateValues.template && !!this.templateValues.template.GitConfig;
|
||||
}
|
||||
|
||||
onChangeFormValues(newValues) {
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
ng-required="true"
|
||||
yml="true"
|
||||
placeholder="Define or paste the content of your docker compose file here"
|
||||
read-only="$ctrl.state.Method === 'template' && $ctrl.template.GitConfig"
|
||||
versions="$ctrl.formValues.versions"
|
||||
read-only="$ctrl.isGitTemplate()"
|
||||
>
|
||||
<editor-description>
|
||||
You can get more information about Compose file format in the
|
||||
|
@ -28,7 +29,7 @@
|
|||
<file-upload-description> You can upload a Compose file from your computer. </file-upload-description>
|
||||
</file-upload-form>
|
||||
|
||||
<div ng-if="$ctrl.state.Method == 'repository'">
|
||||
<div ng-if="$ctrl.state.Method == 'repository' || $ctrl.isGitTemplate()">
|
||||
<git-form
|
||||
value="$ctrl.formValues"
|
||||
on-change="($ctrl.onChangeFormValues)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue