diff --git a/app/kubernetes/custom-templates/kube-create-custom-template-view/kube-create-custom-template-view.controller.js b/app/kubernetes/custom-templates/kube-create-custom-template-view/kube-create-custom-template-view.controller.js index 4e48a2152..a966ff8cc 100644 --- a/app/kubernetes/custom-templates/kube-create-custom-template-view/kube-create-custom-template-view.controller.js +++ b/app/kubernetes/custom-templates/kube-create-custom-template-view/kube-create-custom-template-view.controller.js @@ -9,8 +9,8 @@ class KubeCreateCustomTemplateViewController { Object.assign(this, { $async, $state, Authentication, CustomTemplateService, FormValidator, ModalService, Notifications, ResourceControlService }); this.methodOptions = [ - buildOption('method_editor', 'fa fa-edit', 'Web editor', 'Use our Web editor', 'editor'), - buildOption('method_upload', 'fa fa-upload', 'Upload', 'Upload from your computer', 'upload'), + buildOption('method_editor', 'svg-custom', 'Web editor', 'Use our Web editor', 'editor'), + buildOption('method_upload', 'svg-upload', 'Upload', 'Upload from your computer', 'upload'), ]; this.templates = null; @@ -97,7 +97,12 @@ class KubeCreateCustomTemplateViewController { this.state.actionInProgress = true; try { - const customTemplate = await this.createCustomTemplateByMethod(method, this.formValues); + const formValues = { ...this.formValues, Variables: null }; + if (this.formValues.Variables.length > 0) { + formValues.Variables = JSON.stringify(this.formValues.Variables); + } + + const customTemplate = await this.createCustomTemplateByMethod(method, formValues); const accessControlData = this.formValues.AccessControlData; const userDetails = this.Authentication.getUserDetails(); diff --git a/app/kubernetes/custom-templates/kube-create-custom-template-view/kube-create-custom-template-view.html b/app/kubernetes/custom-templates/kube-create-custom-template-view/kube-create-custom-template-view.html index b4a0188dc..7db559ce0 100644 --- a/app/kubernetes/custom-templates/kube-create-custom-template-view/kube-create-custom-template-view.html +++ b/app/kubernetes/custom-templates/kube-create-custom-template-view/kube-create-custom-template-view.html @@ -11,23 +11,25 @@
Templates allow deploying any kind of Kubernetes resource (Deployment, Secret, ConfigMap...)
++ You can get more information about Kubernetes file format in the + official documentation. +
+