mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
fix(app): allow editing pod services [EE-6480] (#10875)
* fix(app): allow editing pod services [EE-6480] * address review comment --------- Co-authored-by: testa113 <testa113> Co-authored-by: prabhat khera <prabhat.khera@portainer.io>
This commit is contained in:
parent
7cba02226e
commit
4c0049edbe
5 changed files with 60 additions and 11 deletions
|
@ -199,13 +199,6 @@ class KubernetesCreateApplicationController {
|
|||
this.updateApplicationType();
|
||||
}
|
||||
|
||||
updateApplicationType() {
|
||||
return this.$scope.$evalAsync(() => {
|
||||
this.formValues.ApplicationType = this.getAppType();
|
||||
this.validatePersistedFolders();
|
||||
});
|
||||
}
|
||||
|
||||
getAppType() {
|
||||
if (this.formValues.DeploymentType === this.ApplicationDeploymentTypes.Global) {
|
||||
return this.ApplicationTypes.DaemonSet;
|
||||
|
@ -216,6 +209,14 @@ class KubernetesCreateApplicationController {
|
|||
return this.ApplicationTypes.Deployment;
|
||||
}
|
||||
|
||||
// keep the application type up to date
|
||||
updateApplicationType() {
|
||||
return this.$scope.$evalAsync(() => {
|
||||
this.formValues.ApplicationType = this.getAppType();
|
||||
this.validatePersistedFolders();
|
||||
});
|
||||
}
|
||||
|
||||
onChangeFileContent(value) {
|
||||
this.$scope.$evalAsync(() => {
|
||||
if (this.oldStackFileContent.replace(/(\r\n|\n|\r)/gm, '') !== value.replace(/(\r\n|\n|\r)/gm, '')) {
|
||||
|
@ -273,7 +274,9 @@ class KubernetesCreateApplicationController {
|
|||
}
|
||||
|
||||
imageValidityIsValid() {
|
||||
return this.state.pullImageValidity || (this.formValues.registryDetails && this.formValues.registryDetails.Registry.Type !== RegistryTypes.DOCKERHUB);
|
||||
return (
|
||||
this.isExternalApplication() || this.state.pullImageValidity || (this.formValues.registryDetails && this.formValues.registryDetails.Registry.Type !== RegistryTypes.DOCKERHUB)
|
||||
);
|
||||
}
|
||||
|
||||
onChangeAppName(appName) {
|
||||
|
@ -349,6 +352,7 @@ class KubernetesCreateApplicationController {
|
|||
persistedFolder.useNewVolume = true;
|
||||
});
|
||||
this.validatePersistedFolders();
|
||||
this.updateApplicationType();
|
||||
}
|
||||
/* #endregion */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue