1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 22:05:23 +02:00

refactor(gitops): migrate git form to react [EE-4849] (#8268)

This commit is contained in:
Chaim Lev-Ari 2023-02-23 01:43:33 +05:30 committed by GitHub
parent afe6cd6df0
commit 273a3f9a10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
130 changed files with 3194 additions and 1190 deletions

View file

@ -16,8 +16,13 @@ class DockerComposeFormController {
this.onChangeFormValues = this.onChangeFormValues.bind(this);
}
onChangeFormValues(values) {
this.formValues = values;
onChangeFormValues(newValues) {
return this.$async(async () => {
this.formValues = {
...this.formValues,
...newValues,
};
});
}
onChangeMethod(method) {

View file

@ -21,7 +21,7 @@
<file-upload-description> You can upload a Compose file from your computer. </file-upload-description>
</file-upload-form>
<git-form ng-if="$ctrl.state.Method === 'repository'" model="$ctrl.formValues" on-change="($ctrl.onChangeFormValues)" hide-rebuild-info="true"></git-form>
<git-form ng-if="$ctrl.state.Method === 'repository'" value="$ctrl.formValues" on-change="($ctrl.onChangeFormValues)"></git-form>
<!-- template -->
<div ng-if="$ctrl.state.Method === 'template'">

View file

@ -39,7 +39,9 @@ class KubeManifestFormController {
}
onChangeMethod(method) {
this.state.Method = method;
return this.$async(async () => {
this.state.Method = method;
});
}
}

View file

@ -32,10 +32,4 @@
</file-upload-description>
</file-upload-form>
<git-form
ng-if="$ctrl.state.Method === 'repository'"
deploy-method="kubernetes"
model="$ctrl.formValues"
on-change="($ctrl.onChangeFormValues)"
hide-rebuild-info="true"
></git-form>
<git-form ng-if="$ctrl.state.Method === 'repository'" deploy-method="kubernetes" value="$ctrl.formValues" on-change="($ctrl.onChangeFormValues)"></git-form>