From cad530ec0433b8d4e5739b0780e171c03a376019 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Wed, 22 Sep 2021 07:59:28 +0300 Subject: [PATCH] fix(k8s/apps): edit url deployed app (#5653) --- app/kubernetes/models/application/models/index.js | 1 + .../applications/create/createApplicationController.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/kubernetes/models/application/models/index.js b/app/kubernetes/models/application/models/index.js index 0f280399e..9085a7219 100644 --- a/app/kubernetes/models/application/models/index.js +++ b/app/kubernetes/models/application/models/index.js @@ -118,4 +118,5 @@ export const KubernetesDeploymentTypes = Object.freeze({ GIT: 'git', CONTENT: 'content', APPLICATION_FORM: 'application form', + URL: 'url', }); diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js index ae32bc2de..c3903cf89 100644 --- a/app/kubernetes/views/applications/create/createApplicationController.js +++ b/app/kubernetes/views/applications/create/createApplicationController.js @@ -1078,10 +1078,14 @@ class KubernetesCreateApplicationController { ); if (this.application.ApplicationKind) { - this.state.appType = this.KubernetesDeploymentTypes[this.application.ApplicationKind.toUpperCase()]; + this.state.appType = KubernetesDeploymentTypes[this.application.ApplicationKind.toUpperCase()]; + if (this.application.ApplicationKind === KubernetesDeploymentTypes.URL) { + this.state.appType = KubernetesDeploymentTypes.CONTENT; + } + if (this.application.StackId) { this.stack = await this.StackService.stack(this.application.StackId); - if (this.application.ApplicationKind === this.KubernetesDeploymentTypes.CONTENT) { + if (this.state.appType === KubernetesDeploymentTypes.CONTENT) { this.stackFileContent = await this.StackService.getStackFile(this.application.StackId); } }