mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 05:49:40 +02:00
fix(edge/stacks): clear templates values on change method [EE-6390] (#10707)
This commit is contained in:
parent
5c59c53e91
commit
7a9436dad7
3 changed files with 13 additions and 5 deletions
|
@ -13,6 +13,7 @@ import { StackType } from '@/react/common/stacks/types';
|
|||
import { applySetStateAction } from '@/react-tools/apply-set-state-action';
|
||||
import { getVariablesFieldDefaultValues } from '@/react/portainer/custom-templates/components/CustomTemplatesVariablesField';
|
||||
import { renderTemplate } from '@/react/portainer/custom-templates/components/utils';
|
||||
import { getInitialTemplateValues } from '@/react/edge/edge-stacks/CreateView/TemplateFieldset';
|
||||
|
||||
export default class CreateEdgeStackViewController {
|
||||
/* @ngInject */
|
||||
|
@ -50,11 +51,7 @@ export default class CreateEdgeStackViewController {
|
|||
endpointTypes: [],
|
||||
baseWebhookUrl: baseEdgeStackWebhookUrl(),
|
||||
isEdit: false,
|
||||
templateValues: {
|
||||
template: null,
|
||||
variables: [],
|
||||
file: '',
|
||||
},
|
||||
templateValues: getInitialTemplateValues(),
|
||||
};
|
||||
|
||||
this.edgeGroups = null;
|
||||
|
@ -328,6 +325,7 @@ export default class CreateEdgeStackViewController {
|
|||
this.formValues.DeploymentType = deploymentType;
|
||||
this.state.Method = 'editor';
|
||||
this.formValues.StackFileContent = '';
|
||||
this.state.templateValues = getInitialTemplateValues();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue