diff --git a/app/models/cluster.js b/app/models/cluster.js index c12b04c1e..3aa2baa48 100644 --- a/app/models/cluster.js +++ b/app/models/cluster.js @@ -4,7 +4,7 @@ import { inject as service } from '@ember/service'; import Resource from 'ember-api-store/models/resource'; import { hasMany } from 'ember-api-store/utils/denormalize'; import ResourceUsage from 'shared/mixins/resource-usage'; -import { alias } from '@ember/object/computed'; +import { equal, alias } from '@ember/object/computed'; import { resolve } from 'rsvp'; export default Resource.extend(ResourceUsage, { @@ -20,6 +20,7 @@ export default Resource.extend(ResourceUsage, { machines: alias('nodes'), clusterRoleTemplateBindings: hasMany('id', 'clusterRoleTemplateBinding', 'clusterId'), roleTemplateBindings: alias('clusterRoleTemplateBindings'), + isGKE: equal('driver', 'googleKubernetesEngine'), actions: { edit() { diff --git a/lib/shared/addon/components/input-answers/component.js b/lib/shared/addon/components/input-answers/component.js index 919249299..14f0c3128 100644 --- a/lib/shared/addon/components/input-answers/component.js +++ b/lib/shared/addon/components/input-answers/component.js @@ -6,6 +6,8 @@ import { isSafari } from 'ui/utils/platform'; import { evaluate } from 'shared/utils/evaluate'; import layout from './template'; +const HIDDEN = 'Hidden'; + export default Component.extend({ layout, originQuestions: alias('selectedTemplate.questions'), @@ -119,6 +121,10 @@ export default Component.extend({ filterdQuestions.forEach((item) => { if ( item.group ) { + if ( item.group === HIDDEN ) { + return; + } + if ( !sections[item.group] ) { sections[item.group] = []; } diff --git a/lib/shared/addon/components/new-catalog/component.js b/lib/shared/addon/components/new-catalog/component.js index abd132098..797bee039 100644 --- a/lib/shared/addon/components/new-catalog/component.js +++ b/lib/shared/addon/components/new-catalog/component.js @@ -21,6 +21,8 @@ export default Component.extend(NewOrEdit, { settings: service(), globalStore: service(), + isGKE: alias('scope.currentCluster.isGKE'), + namespaceErrors: null, allTemplates: null, templateResource: null, diff --git a/lib/shared/addon/components/new-catalog/template.hbs b/lib/shared/addon/components/new-catalog/template.hbs index 1011efb88..482c8bea3 100644 --- a/lib/shared/addon/components/new-catalog/template.hbs +++ b/lib/shared/addon/components/new-catalog/template.hbs @@ -186,6 +186,15 @@ {{/if}} + {{#if isGKE}} +
+ {{/if}} + {{#if errors.length}}