diff --git a/ui/app/components/empty-action-namespaces.js b/ui/app/components/empty-action-namespaces.js new file mode 100644 index 0000000000..96167992d7 --- /dev/null +++ b/ui/app/components/empty-action-namespaces.js @@ -0,0 +1,2 @@ +import OuterHTML from './outer-html'; +export default OuterHTML.extend(); diff --git a/ui/app/components/list-view.js b/ui/app/components/list-view.js index 72f7b8ace2..6c21340897 100644 --- a/ui/app/components/list-view.js +++ b/ui/app/components/list-view.js @@ -6,6 +6,9 @@ export default Component.extend({ tagName: '', items: null, itemNoun: 'item', + // the dasherized name of a component to render + // in the EmptyState component if there are no items in items.length + emptyActions: '', emptyTitle: computed('itemNoun', function() { let items = pluralize(this.get('itemNoun')); diff --git a/ui/app/templates/components/empty-action-namespaces.hbs b/ui/app/templates/components/empty-action-namespaces.hbs new file mode 100644 index 0000000000..ddb51d93bc --- /dev/null +++ b/ui/app/templates/components/empty-action-namespaces.hbs @@ -0,0 +1,7 @@ +{{#link-to "vault.cluster.access.namespaces.create"}} + Create namespace +{{/link-to}} + + + Learn More + diff --git a/ui/app/templates/components/empty-state.hbs b/ui/app/templates/components/empty-state.hbs index 18509137cf..ebe81417b4 100644 --- a/ui/app/templates/components/empty-state.hbs +++ b/ui/app/templates/components/empty-state.hbs @@ -9,9 +9,13 @@

{{/if}} {{#if hasBlock}} -
- {{yield}} -
+
+ {{yield}} +
+ {{else if emptyActions}} +
+ {{component emptyActions}} +
{{/if}} diff --git a/ui/app/templates/components/list-view.hbs b/ui/app/templates/components/list-view.hbs index 115226bb86..da3bf430b2 100644 --- a/ui/app/templates/components/list-view.hbs +++ b/ui/app/templates/components/list-view.hbs @@ -6,7 +6,8 @@ {{else}} {{/if}} diff --git a/ui/app/templates/vault/cluster/access/namespaces/index.hbs b/ui/app/templates/vault/cluster/access/namespaces/index.hbs index 179539ae94..85b830d87b 100644 --- a/ui/app/templates/vault/cluster/access/namespaces/index.hbs +++ b/ui/app/templates/vault/cluster/access/namespaces/index.hbs @@ -12,7 +12,7 @@ {{/link-to}} - + {{list.item.id}}