diff --git a/app/authenticated/clusters/new/controller.js b/app/authenticated/clusters/new/controller.js index afc6ae631..d0873a2f0 100644 --- a/app/authenticated/clusters/new/controller.js +++ b/app/authenticated/clusters/new/controller.js @@ -49,6 +49,16 @@ export default Ember.Controller.extend({ }).restartable().maxConcurrency(3), actions: { + cancelAddSystem() { + this.setProperties({ + catalogInfo: null, + _catalogInfoCache: null, + _prefetchInstance: null, + catalogId: 'all', + category: null, + viewCatalog: false, + }); + }, filterAction: function(catalogId){ this.get('fetchTemplates').perform({ "category": this.get('category'), diff --git a/app/authenticated/clusters/new/route.js b/app/authenticated/clusters/new/route.js index 1b583bef5..f29424b87 100644 --- a/app/authenticated/clusters/new/route.js +++ b/app/authenticated/clusters/new/route.js @@ -19,4 +19,18 @@ export default Ember.Route.extend({ }); }); }, + teardownForComponentState: Ember.on('deactivate', function(){ + this.controller.setProperties({ + catalogItem: null, + editCatalog: false, + selectedTemplateUrl: null, + catalogInfo: null, + _catalogInfoCache: null, + _prefetchInstance: null, + catalogId: 'all', + category: null, + viewCatalog: false, + newSystemStack: null, + }); + }) }); diff --git a/app/authenticated/clusters/new/template.hbs b/app/authenticated/clusters/new/template.hbs index 7c6a4bc4b..7d90ae6f3 100644 --- a/app/authenticated/clusters/new/template.hbs +++ b/app/authenticated/clusters/new/template.hbs @@ -31,6 +31,9 @@ cancel=(action "cancelEdit") }} {{else if viewCatalog}} +
{{catalog-index model=catalogInfo category=category diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 735d78e5c..f90429aa1 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -1441,6 +1441,7 @@ editCluster: detail: These stacks will be automatically deployed into the System environment for the cluster. noData: No stacks will be deployed into the System environment. add: Add Stack + cancel: Cancel Add System Stack editContainer: title: