Files
nomad/ui/app/templates/components/gutter-menu.hbs
Phil Renaud 1976202cd6 Feature: Dynamic Host Volumes in the UI (#25224)
* DHV UI init

* /csi routes to /storage routes and a routeRedirector util (#25163)

* /csi routes to /storage routes and a routeRedirector util

* Tests and routes move csi/ to storage/

* Changelog added

* [ui] Storage UI overhaul + Dynamic Host Volumes UI (#25226)

* Storage index page and DHV model properties

* Naive version of a storage overview page

* Experimental fetch of alloc data dirs

* Fetch ephemeral disks and static host volumes as an ember concurrency task and nice table stylings

* Playing nice with section header labels to make eslint happy even though wcag was already cool with it

* inlined the storage type explainers and reordered things, plus tooltips and keynav

* Bones of a dynamic host volume individual page

* Woooo dynamic host volume model, adapter, and serializer with embedded alloc relationships

* Couple test fixes

* async:false relationship for dhv.hasMany('alloc') to prevent a ton of xhr requests

* DHV request type at index routemodel and better serialization

* Pagination and searching and query params oh my

* Test retrofits for csi volumes

* Really fantastic flake gets fixed

* DHV detail page acceptance test and a bunch of mirage hooks

* Seed so that the actions test has a guaranteed task

* removed ephemeral disk and static host volume manual scanning

* CapacityBytes and capabilities table added to DHV detail page

* Debugging actions flyout test

* was becoming clear that faker.seed editing was causing havoc elsewhere so might as well not boil the ocean and just tell this test to do what I want it to

* Post-create job gets taskCount instead of count

* CSI volumes now get /csi route prefix at detail level

* lazyclick method for unused keynav removed

* keyboard nav and table-watcher for DHV added

* Addressed PR comments, changed up capabilities table and id references, etc.

* Capabilities table for DHV and ID in details header

* Testfixes for pluginID and capabilities table on DHV page
2025-03-10 14:46:02 -04:00

171 lines
4.6 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
<div
data-test-gutter-menu
class="page-column is-left {{if this.isOpen "is-open"}}"
{{did-insert this.keyboard.registerNav type="main"}}
>
<div class="gutter {{if this.isOpen "is-open"}}">
<header class="collapsed-menu {{if this.isOpen "is-open"}}">
<span
data-test-gutter-gutter-toggle
class="gutter-toggle"
aria-label="menu"
role="img"
onclick={{action this.onHamburgerClick}}
>
<HamburgerMenu />
</span>
<span class="logo-container">
<NomadLogo />
</span>
</header>
<aside class="menu">
{{#if this.system.shouldShowRegions}}
<div class="collapsed-only">
<p class="menu-label">
Region
{{if this.system.shouldShowNamespaces "& Namespace"}}
</p>
<ul class="menu-list">
<li>
<div class="menu-item is-wide">
<RegionSwitcher />
</div>
</li>
</ul>
</div>
{{/if}}
<ul class="menu-list">
<li {{keyboard-shortcut menuLevel=true pattern=(array "g" "j") }}>
<LinkTo
@route="jobs"
@activeClass="is-active"
data-test-gutter-link="jobs"
>
Jobs
</LinkTo>
</li>
{{#if (can "accept recommendation")}}
<li
{{keyboard-shortcut
menuLevel=true
pattern=(array "g" "o")
action=(action this.transitionTo 'optimize')
}}
>
<LinkTo
@route="optimize"
@activeClass="is-active"
data-test-gutter-link="optimize"
>
Optimize
</LinkTo>
</li>
{{/if}}
<li {{keyboard-shortcut menuLevel=true pattern=(array "g" "r") }}>
<LinkTo
@route="storage"
@activeClass="is-active"
data-test-gutter-link="storage"
>
Storage
</LinkTo>
</li>
{{#if (can "list variables")}}
<li {{keyboard-shortcut menuLevel=true pattern=(array "g" "v") }}>
<LinkTo
@route="variables"
@activeClass="is-active"
data-test-gutter-link="variables"
>
Variables
</LinkTo>
</li>
{{/if}}
</ul>
<p class="menu-label">
Cluster
</p>
<ul class="menu-list">
<li {{keyboard-shortcut menuLevel=true pattern=(array "g" "c") }}>
<LinkTo
@route="clients"
@activeClass="is-active"
data-test-gutter-link="clients"
>
Clients
</LinkTo>
</li>
<li {{keyboard-shortcut menuLevel=true pattern=(array "g" "s") }}>
<LinkTo
@route="servers"
@activeClass="is-active"
data-test-gutter-link="servers"
>
Servers
</LinkTo>
</li>
<li {{keyboard-shortcut menuLevel=true pattern=(array "g" "t") }}>
<LinkTo
@route="topology"
@activeClass="is-active"
data-test-gutter-link="topology"
>
Topology
</LinkTo>
</li>
</ul>
<p class="menu-label">
Operations
</p>
<ul class="menu-list">
<li {{keyboard-shortcut menuLevel=true pattern=(array "g" "e") }}>
<LinkTo
@route="evaluations"
@activeClass="is-active"
data-test-gutter-link="evaluations"
>
Evaluations
</LinkTo>
</li>
{{#if (can "list policies")}}
<li
{{keyboard-shortcut
menuLevel=true
pattern=(array "g" "a")
action=(action this.transitionTo 'administration')
}}
>
<LinkTo
@route="administration"
@activeClass="is-active"
data-test-gutter-link="administration"
>
Administration
</LinkTo>
</li>
{{/if}}
</ul>
</aside>
{{#if this.system.agent.version}}
<footer class="gutter-footer">
<span class="is-faded">
v{{this.system.agent.version}}
</span>
</footer>
{{/if}}
</div>
</div>
<div data-test-page-content class="page-column is-right">
{{yield}}
</div>
<div
data-test-gutter-backdrop
class="gutter-backdrop {{if this.isOpen "is-open"}}"
onclick={{action this.onHamburgerClick}}
></div>