From c580bcc75370b865e0526ff9f7bb42c62f1d7766 Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Tue, 16 Jul 2019 11:50:34 -0700 Subject: [PATCH] fix cluster templates table not updating when revision is deleted --- app/models/clustertemplaterevision.js | 1 + .../addon/components/cluster-templates-table/component.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/clustertemplaterevision.js b/app/models/clustertemplaterevision.js index e9aec559c..08fa9e2b8 100644 --- a/app/models/clustertemplaterevision.js +++ b/app/models/clustertemplaterevision.js @@ -44,6 +44,7 @@ export default Resource.extend({ newRevision() { this.router.transitionTo('global-admin.cluster-templates.new-revision', this.clusterTemplateId, { queryParams: { revision: this.id } }); }, + setDefault() { const { clusterTemplate } = this; const successTitle = this.intl.t('action.setDefaultRevision.success.title'); diff --git a/lib/global-admin/addon/components/cluster-templates-table/component.js b/lib/global-admin/addon/components/cluster-templates-table/component.js index b49d31334..2919ceec4 100644 --- a/lib/global-admin/addon/components/cluster-templates-table/component.js +++ b/lib/global-admin/addon/components/cluster-templates-table/component.js @@ -44,7 +44,7 @@ export default Component.extend({ sortBy: 'displayName', headers: HEADERS, - rows: computed('clusterTemplateRevisions.each.{clusterTempalte}', 'clusterTemplates.@each.{defaultRevisionId,revisionsCount,revisions}', function() { + rows: computed('clusterTemplateRevisions.@each.{id,state}', function() { const { clusterTemplateRevisions = [] } = this; return clusterTemplateRevisions.sortBy('displayName').filter((ctr) => {