1616 @breadcrumbs ={{ array (hash label =" Vault" route =" vault.cluster.dashboard" icon =" vault" ) (hash label =" Namespaces" )}}
1717 />
1818 </:breadcrumbs >
19+ <:badges >
20+ <Hds::Badge @icon =" org" @text ={{ this.namespacePath }} data-test-badge =" namespace-path" />
21+ </:badges >
22+ <:actions >
23+ {{ #unless @model.namespaces }}
24+ <Hds::Button
25+ class =" has-right-margin-4"
26+ @color =" secondary"
27+ @icon =" bulb"
28+ @text =" New to Namespaces?"
29+ {{ on " click" this.enterGuidedStart }}
30+ data-test-button =" guided-start"
31+ />
32+ <Hds::Button
33+ class =" has-right-margin-4"
34+ @icon =" plus"
35+ @route =" vault.cluster.access.namespaces.create"
36+ @text =" Create namespace"
37+ data-test-button =" create-namespace"
38+ />
39+ {{ /unless }}
40+ </:actions >
1941 </Page::Header >
2042
21- <Toolbar >
22- <ToolbarFilters >
23- <FilterInputExplicit
24- @query ={{ @model.pageFilter }}
25- @placeholder =" Search"
26- @handleSearch ={{ this.handleSearch }}
27- @handleInput ={{ this.handleInput }}
28- @handleKeyDown ={{ this.handleKeyDown }}
29- />
30- </ToolbarFilters >
31- <ToolbarActions >
32- <Hds::Button
33- class =" has-right-margin-4"
34- @color =" secondary"
35- @icon =" reload"
36- @iconPosition =" trailing"
37- @text =" Refresh list"
38- {{ on " click" this.refreshNamespaceList }}
39- data-test-button =" refresh-namespace-list"
40- />
41- <ToolbarLink @route =" vault.cluster.access.namespaces.create" @type =" add" data-test-link-to =" create-namespace" >
42- Create namespace
43- </ToolbarLink >
44- </ToolbarActions >
45- </Toolbar >
46-
47- <ListView
48- @items ={{ @model.namespaces }}
49- @itemNoun =" namespace"
50- @paginationRouteName =" vault.cluster.access.namespaces"
51- @onPageChange ={{ this.handlePageChange }}
52- as |list|
53- >
54- {{ #if @model.namespaces.length }}
55- <ListItem as |Item|>
56- <Item .content>
57- {{ list.item.id }}
58- </Item .content>
59- <Item .menu>
60- <Hds::Dropdown @isInline ={{ true }} @listPosition =" bottom-right" as |dd|>
61- <dd .ToggleIcon
62- @icon =" more-horizontal"
63- @text =" More options"
64- @hasChevron ={{ false }}
65- data-test-popup-menu-trigger
66- />
67- {{ #let (concat this.namespace.path (if this.namespace.path " /" ) list.item.id ) as |targetNamespace |}}
68- {{ #if (includes targetNamespace this.namespace.accessibleNamespaces )}}
69- <dd .Interactive
70- {{ on " click" (fn this.switchNamespace targetNamespace )}}
71- data-test-popup-menu =" switch"
72- >Switch to namespace</dd .Interactive>
73- {{ /if }}
74- {{ /let }}
75- <dd .Interactive
76- @color =" critical"
77- {{ on " click" (fn (mut this.nsToDelete ) list.item )}}
78- data-test-popup-menu =" delete"
79- >Delete</dd .Interactive>
80- </Hds::Dropdown >
81- {{ #if (eq this.nsToDelete list.item )}}
82- <ConfirmModal
83- @color =" critical"
84- @onClose ={{ fn (mut this.nsToDelete ) null }}
85- @onConfirm ={{ fn this.deleteNamespace list.item }}
86- @confirmTitle =" Delete this namespace?"
87- @confirmMessage =" Any engines or mounts in this namespace will also be removed."
88- />
89- {{ /if }}
90- </Item .menu>
91- </ListItem >
92- {{ else }}
93- <list .empty>
94- <Hds::Link::Standalone
95- @icon =" learn-link"
96- @text =" Secure multi-tenancy with namespaces tutorial"
97- @href ={{ doc-link " /vault/tutorials/enterprise/namespaces" }}
43+ {{ #if @model.namespaces }}
44+ <Toolbar >
45+ <ToolbarFilters >
46+ <FilterInputExplicit
47+ @query ={{ @model.pageFilter }}
48+ @placeholder =" Search"
49+ @handleSearch ={{ this.handleSearch }}
50+ @handleInput ={{ this.handleInput }}
51+ @handleKeyDown ={{ this.handleKeyDown }}
52+ />
53+ </ToolbarFilters >
54+ <ToolbarActions >
55+ <Hds::Button
56+ class =" has-right-margin-4"
57+ @color =" secondary"
58+ @icon =" reload"
59+ @iconPosition =" trailing"
60+ @text =" Refresh list"
61+ {{ on " click" this.refreshNamespaceList }}
62+ data-test-button =" refresh-namespace-list"
9863 />
99- </list .empty>
64+ <ToolbarLink @route =" vault.cluster.access.namespaces.create" @type =" add" data-test-link-to =" create-namespace" >
65+ Create namespace
66+ </ToolbarLink >
67+ </ToolbarActions >
68+ </Toolbar >
69+
70+ <ListView
71+ @items ={{ @model.namespaces }}
72+ @itemNoun =" namespace"
73+ @paginationRouteName =" vault.cluster.access.namespaces"
74+ @onPageChange ={{ this.handlePageChange }}
75+ as |list|
76+ >
77+ {{ #if @model.namespaces.length }}
78+ <ListItem as |Item|>
79+ <Item .content>
80+ {{ list.item.id }}
81+ </Item .content>
82+ <Item .menu>
83+ <Hds::Dropdown @isInline ={{ true }} @listPosition =" bottom-right" as |dd|>
84+ <dd .ToggleIcon
85+ @icon =" more-horizontal"
86+ @text =" More options"
87+ @hasChevron ={{ false }}
88+ data-test-popup-menu-trigger
89+ />
90+ {{ #let (concat this.namespace.path (if this.namespace.path " /" ) list.item.id ) as |targetNamespace |}}
91+ {{ #if (includes targetNamespace this.namespace.accessibleNamespaces )}}
92+ <dd .Interactive
93+ {{ on " click" (fn this.switchNamespace targetNamespace )}}
94+ data-test-popup-menu =" switch"
95+ >Switch to namespace</dd .Interactive>
96+ {{ /if }}
97+ {{ /let }}
98+ <dd .Interactive
99+ @color =" critical"
100+ {{ on " click" (fn (mut this.nsToDelete ) list.item )}}
101+ data-test-popup-menu =" delete"
102+ >Delete</dd .Interactive>
103+ </Hds::Dropdown >
104+ {{ #if (eq this.nsToDelete list.item )}}
105+ <ConfirmModal
106+ @color =" critical"
107+ @onClose ={{ fn (mut this.nsToDelete ) null }}
108+ @onConfirm ={{ fn this.deleteNamespace list.item }}
109+ @confirmTitle =" Delete this namespace?"
110+ @confirmMessage =" Any engines or mounts in this namespace will also be removed."
111+ />
112+ {{ /if }}
113+ </Item .menu>
114+ </ListItem >
115+ {{ else }}
116+ <list .empty>
117+ <Hds::Link::Standalone
118+ @icon =" learn-link"
119+ @text =" Secure multi-tenancy with namespaces tutorial"
120+ @href ={{ doc-link " /vault/tutorials/enterprise/namespaces" }}
121+ />
122+ </list .empty>
123+ {{ /if }}
124+ </ListView >
125+ {{ else }}
126+ {{ #if this.showSetupAlert }}
127+ <Hds::Alert @type =" inline" class =" top-margin-32" as |A|>
128+ <A .Title>Your current setup is 1 namespace.</A .Title>
129+ <A .Description>Based on your answer about your security policy in the Guided start, no new namespaces are required.</A .Description>
130+ </Hds::Alert >
100131 {{ /if }}
101- </ListView >
132+
133+ <Hds::Card::Container @hasBorder ={{ true }} class =" has-padding-l top-margin-32" >
134+ <Hds::ApplicationState @align =" left" class =" is-marginless" as |A|>
135+ <A .Header
136+ @title =" No namespaces yet"
137+ @titleTag =" h2"
138+ @icon =" skip"
139+ class =" align-items-end"
140+ data-test-empty-state-title
141+ />
142+ <A .Body @text =" Your namespaces will be listed here. Add a namespace to get started." />
143+ <A .Footer as |F|>
144+ <F .Button
145+ @color =" secondary"
146+ @icon =" reload"
147+ @text =" Refresh"
148+ {{ on " click" this.refreshNamespaceList }}
149+ data-test-button =" refresh-namespace-list"
150+ />
151+ <F .LinkStandalone
152+ @icon =" learn-link"
153+ @text =" Secure multi-tenancy with namespaces tutorial"
154+ @href ={{ doc-link " /vault/tutorials/enterprise/namespaces" }}
155+ />
156+ </A .Footer>
157+ </Hds::ApplicationState >
158+ </Hds::Card::Container >
159+ {{ /if }}
160+
102161 {{ /if }}
162+
103163{{ else }}
104164 <UpgradePage @title =" Namespaces" @minimumEdition =" Vault Enterprise Pro" />
105165{{ /if }}
0 commit comments