From 87d869d107d81307bfff2b17af37ef27de1678c1 Mon Sep 17 00:00:00 2001 From: Vincent Fiduccia Date: Mon, 26 Mar 2018 17:27:36 -0700 Subject: [PATCH] Volume stuff --- app/volumes/index/template.hbs | 2 - .../accordion-list-item/component.js | 10 +++++ .../container/form-volume-row/template.hbs | 9 +--- .../container/form-volumes/component.js | 43 +++++++++++++++++-- .../cru-persistent-volume-claim/component.js | 3 +- .../components/modal-shortcuts/component.js | 6 +-- .../source-host-path/component.js | 23 +++++++--- .../source-host-path/template.hbs | 19 +++----- package.json | 2 +- translations/en-us.yaml | 6 ++- 10 files changed, 84 insertions(+), 39 deletions(-) diff --git a/app/volumes/index/template.hbs b/app/volumes/index/template.hbs index 5fa28e198..51a231a81 100644 --- a/app/volumes/index/template.hbs +++ b/app/volumes/index/template.hbs @@ -61,8 +61,6 @@ {{/if}} {{/sortable-table}} -{{else if projectController.projects.current.isKubernetes}} -
Coming soon for Kubernetes clusters
{{else}} {{empty-table resource="container" newRoute="volumes.new" newTranslationKey="nav.containers.addVolume"}} {{/if}} diff --git a/lib/shared/addon/components/accordion-list-item/component.js b/lib/shared/addon/components/accordion-list-item/component.js index 32e51f368..fd959220b 100644 --- a/lib/shared/addon/components/accordion-list-item/component.js +++ b/lib/shared/addon/components/accordion-list-item/component.js @@ -88,7 +88,12 @@ export default Component.extend({ if (!get(this,'everExpanded')) { set(this,'everExpanded', true); } + run.next(() => { + if ( this.isDestroyed || this.isDestroying ) { + return; + } + set(this,'expanded', eoi); }); } @@ -100,7 +105,12 @@ export default Component.extend({ if (!get(this,'everExpanded')) { set(this,'everExpanded', true); } + run.next(() => { + if ( this.isDestroyed || this.isDestroying ) { + return; + } + set(this,'intent', get(this,'componentName')); }); } diff --git a/lib/shared/addon/components/container/form-volume-row/template.hbs b/lib/shared/addon/components/container/form-volume-row/template.hbs index 5c884d894..556d4aec2 100644 --- a/lib/shared/addon/components/container/form-volume-row/template.hbs +++ b/lib/shared/addon/components/container/form-volume-row/template.hbs @@ -13,7 +13,7 @@ {{t 'generic.edit'}} - {{else if (eq model.mode "newVolume")}} + {{else if (or (eq model.mode "existingVolume") (eq model.mode "newVolume"))}}