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 a12cc34c5..4e48a2152 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 @@ -1,6 +1,7 @@ import { buildOption } from '@/portainer/components/BoxSelector'; import { AccessControlFormData } from '@/portainer/components/accessControlForm/porAccessControlFormModel'; import { getTemplateVariables, intersectVariables } from '@/react/portainer/custom-templates/components/utils'; +import { isBE } from '@/portainer/feature-flags/feature-flags.service'; class KubeCreateCustomTemplateViewController { /* @ngInject */ @@ -13,6 +14,7 @@ class KubeCreateCustomTemplateViewController { ]; this.templates = null; + this.isTemplateVariablesEnabled = isBE; this.state = { method: 'editor', @@ -53,6 +55,10 @@ class KubeCreateCustomTemplateViewController { } parseTemplate(templateStr) { + if (!this.isTemplateVariablesEnabled) { + return; + } + const variables = getTemplateVariables(templateStr); const isValid = !!variables; 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 da8e5d9dc..1707480c6 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 @@ -37,6 +37,7 @@ ; diff --git a/app/portainer/views/custom-templates/create-custom-template-view/createCustomTemplateView.html b/app/portainer/views/custom-templates/create-custom-template-view/createCustomTemplateView.html index bea6cdbcb..02ba30466 100644 --- a/app/portainer/views/custom-templates/create-custom-template-view/createCustomTemplateView.html +++ b/app/portainer/views/custom-templates/create-custom-template-view/createCustomTemplateView.html @@ -108,6 +108,7 @@