lane-wetmore bb54062c3d
UI: Snapshots index route (#31473)
* build out snapshots index route

* add card for loaded snapshot

* add tests

* lint fix and remove logs

* use api enum

* lint fix

* remove extra imports

* tidy

* routing updates

* update tests

* update styling

* improve types

* lint

* add copyright header

* update capability check

* pull out header

* add copyright headers

* update url

* Update ui/app/routes/vault/cluster/recovery/snapshots/snapshot.ts

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* test + error handling updates

* update details route and add integration tests

* tidy tests and pull out header title

* lint

* test updates

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2025-08-13 15:07:45 -05:00

144 lines
4.5 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
<Hds::SideNav::Portal @ariaLabel="Cluster Navigation Links" data-test-sidebar-nav-panel="Cluster" as |Nav|>
<Nav.Title data-test-sidebar-nav-heading="Vault">Vault</Nav.Title>
<Nav.Link @route="vault.cluster.dashboard" @text="Dashboard" data-test-sidebar-nav-link="Dashboard" />
<Nav.Link
@route="vault.cluster.secrets"
@current-when="vault.cluster.secrets vault.cluster.settings.mount-secret-backend vault.cluster.secrets.backend.configuration.edit"
@text="Secrets Engines"
data-test-sidebar-nav-link="Secrets Engines"
/>
{{#if this.showSecretsSync}}
<Nav.Link
@route="vault.cluster.sync"
@text="Secrets Sync"
@badge={{if this.flags.isHvdManaged "Plus" ""}}
data-test-sidebar-nav-link="Secrets Sync"
/>
{{/if}}
{{#if this.isNotProduction}}
<Nav.Link
@route="vault.cluster.recovery.snapshots"
@text="Secrets Recovery"
@badge={{if this.version.isCommunity "Enterprise" ""}}
data-test-sidebar-nav-link="Secrets Recovery"
/>
{{/if}}
{{#if (has-permission "access")}}
<Nav.Link
@route={{get (route-params-for "access") "route"}}
@models={{get (route-params-for "access") "models"}}
@current-when="vault.cluster.access vault.cluster.settings.auth"
@text="Access"
@hasSubItems={{true}}
data-test-sidebar-nav-link="Access"
/>
{{/if}}
{{#if (has-permission "policies")}}
<Nav.Link
@route="vault.cluster.policies"
@models={{get (route-params-for "policies") "models"}}
@text="Policies"
@hasSubItems={{true}}
data-test-sidebar-nav-link="Policies"
/>
{{/if}}
{{#if (has-permission "tools")}}
<Nav.Link
@route="vault.cluster.tools.tool"
@models={{get (route-params-for "tools") "models"}}
@text="Tools"
@hasSubItems={{true}}
data-test-sidebar-nav-link="Tools"
/>
{{/if}}
{{#if
(or
(and this.isRootNamespace (has-permission "status" routeParams=(array "replication" "raft" "license" "seal")))
(and (has-permission "clients" routeParams="activity") (not this.hasChrootNamespace))
)
}}
<Nav.Title data-test-sidebar-nav-heading="Monitoring">Monitoring</Nav.Title>
{{/if}}
{{#if
(and
this.version.isEnterprise
this.isRootNamespace
(not this.cluster.replicationRedacted)
(has-permission "status" routeParams="replication")
)
}}
<Nav.Link
@route="vault.cluster.replication.index"
@text="Replication"
data-test-sidebar-nav-link="Replication"
@hasSubItems={{true}}
/>
{{/if}}
{{#if (and this.cluster.usingRaft this.isRootNamespace (has-permission "status" routeParams="raft"))}}
<Nav.Link
@route="vault.cluster.storage"
@model={{this.cluster.name}}
@text="Raft Storage"
data-test-sidebar-nav-link="Raft Storage"
/>
{{/if}}
{{#if
(and (has-permission "clients" routeParams="activity") (not this.cluster.dr.isSecondary) (not this.hasChrootNamespace))
}}
<Nav.Link
@route="vault.cluster.clients"
@text="Client Count"
@hasSubItems={{true}}
data-test-sidebar-nav-link="Client Count"
/>
{{/if}}
{{#if this.canAccessVaultUsageDashboard}}
<Nav.Link @route="vault.cluster.usage-reporting" @text="Vault Usage" data-test-sidebar-nav-link="Vault Usage" />
{{/if}}
{{#if
(and
this.version.features
this.isRootNamespace
(has-permission "status" routeParams="license")
(not this.cluster.dr.isSecondary)
)
}}
<Nav.Link
@route="vault.cluster.license"
@model={{this.cluster.name}}
@text="License"
data-test-sidebar-nav-link="License"
/>
{{/if}}
{{#if (and this.isRootNamespace (has-permission "status" routeParams="seal") (not this.cluster.dr.isSecondary))}}
<Nav.Link
@route="vault.cluster.settings.seal"
@model={{this.cluster.name}}
@text="Seal Vault"
data-test-sidebar-nav-link="Seal Vault"
/>
{{/if}}
{{#if (and this.version.isEnterprise (has-permission "settings"))}}
<Nav.Title data-test-sidebar-nav-heading="Settings">Settings</Nav.Title>
<Nav.Link
@route="vault.cluster.config-ui.messages"
@text="Custom Messages"
data-test-sidebar-nav-link="Custom Messages"
/>
{{#if (or this.isRootNamespace this.namespace.isHvdAdminNamespace)}}
<Nav.Link
@route="vault.cluster.config-ui.login-settings"
@text="UI Login Settings"
data-test-sidebar-nav-link="UI Login Settings"
/>
{{/if}}
{{/if}}
</Hds::SideNav::Portal>