44}}
55
66{{ #if (has-feature " Namespaces" )}}
7- <Page::Header @title =" Namespaces" >
8- <:breadcrumbs >
9- <Page::Breadcrumbs
10- @breadcrumbs ={{ array (hash label =" Vault" route =" vault.cluster.dashboard" icon =" vault" ) (hash label =" Namespaces" )}}
11- />
12- </:breadcrumbs >
13- </Page::Header >
14-
15- <Toolbar >
16- <ToolbarFilters >
17- <FilterInputExplicit
18- @query ={{ @model.pageFilter }}
19- @placeholder =" Search"
20- @handleSearch ={{ this.handleSearch }}
21- @handleInput ={{ this.handleInput }}
22- @handleKeyDown ={{ this.handleKeyDown }}
23- />
24- </ToolbarFilters >
25- <ToolbarActions >
26- <Hds::Button
27- class =" has-right-margin-4"
28- @color =" secondary"
29- @icon =" reload"
30- @iconPosition =" trailing"
31- @text =" Refresh list"
32- {{ on " click" this.refreshNamespaceList }}
33- data-test-button =" refresh-namespace-list"
34- />
35- <ToolbarLink @route =" vault.cluster.access.namespaces.create" @type =" add" data-test-link-to =" create-namespace" >
36- Create namespace
37- </ToolbarLink >
38- </ToolbarActions >
39- </Toolbar >
7+ {{ #if this.showWizard }}
8+ <Wizard::Namespaces::NamespaceWizard
9+ @onDismiss ={{ fn (mut this.hasDismissedWizard ) true }}
10+ @onRefresh ={{ this.refreshNamespaceList }}
11+ />
12+ {{ else }}
13+ <Page::Header @title =" Namespaces" >
14+ <:breadcrumbs >
15+ <Page::Breadcrumbs
16+ @breadcrumbs ={{ array (hash label =" Vault" route =" vault.cluster.dashboard" icon =" vault" ) (hash label =" Namespaces" )}}
17+ />
18+ </:breadcrumbs >
19+ </Page::Header >
4020
41- <ListView
42- @items ={{ @model.namespaces }}
43- @itemNoun =" namespace"
44- @paginationRouteName =" vault.cluster.access.namespaces"
45- @onPageChange ={{ this.handlePageChange }}
46- as |list|
47- >
48- {{ #if @model.namespaces.length }}
49- <ListItem as |Item|>
50- <Item .content>
51- {{ list.item.id }}
52- </Item .content>
53- <Item .menu>
54- <Hds::Dropdown @isInline ={{ true }} @listPosition =" bottom-right" as |dd|>
55- <dd .ToggleIcon @icon =" more-horizontal" @text =" More options" @hasChevron ={{ false }} data-test-popup-menu-trigger />
56- {{ #let (concat this.namespace.path (if this.namespace.path " /" ) list.item.id ) as |targetNamespace |}}
57- {{ #if (includes targetNamespace this.namespace.accessibleNamespaces )}}
58- <dd .Interactive {{ on " click" (fn this.switchNamespace targetNamespace )}} data-test-popup-menu =" switch" >Switch
59- to namespace</dd .Interactive>
60- {{ /if }}
61- {{ /let }}
62- <dd .Interactive
63- @color =" critical"
64- {{ on " click" (fn (mut this.nsToDelete ) list.item )}}
65- data-test-popup-menu =" delete"
66- >Delete</dd .Interactive>
67- </Hds::Dropdown >
68- {{ #if (eq this.nsToDelete list.item )}}
69- <ConfirmModal
70- @color =" critical"
71- @onClose ={{ fn (mut this.nsToDelete ) null }}
72- @onConfirm ={{ fn this.deleteNamespace list.item }}
73- @confirmTitle =" Delete this namespace?"
74- @confirmMessage =" Any engines or mounts in this namespace will also be removed."
75- />
76- {{ /if }}
77- </Item .menu>
78- </ListItem >
79- {{ else }}
80- <list .empty>
81- <Hds::Link::Standalone
82- @icon =" learn-link"
83- @text =" Secure multi-tenancy with namespaces tutorial"
84- @href ={{ doc-link " /vault/tutorials/enterprise/namespaces" }}
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 }}
8529 />
86- </list .empty>
87- {{ /if }}
88- </ListView >
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" }}
98+ />
99+ </list .empty>
100+ {{ /if }}
101+ </ListView >
102+ {{ /if }}
89103{{ else }}
90104 <UpgradePage @title =" Namespaces" @minimumEdition =" Vault Enterprise Pro" />
91105{{ /if }}
0 commit comments