open-nomad/ui/app/templates/components/gutter-menu.hbs
Phil Renaud 7ddc4c8359 Secure Variables UI: Router setup and /variables/index route + guards (#12967)
* Route init

* Bones of a mirage-mocked secure variables policy

* Functinoing policy for list vars

* Delog and transition on route

* Basic guard test

* Page guard tests for secure variables

* Cleanup and unit tests for variables ability

* Linter cleanup

* Set expectations for test assertions

* PR feedback addressed

* Read label changed to View per suggestion
2022-07-11 13:34:03 -04:00

142 lines
3.4 KiB
Handlebars

<div
data-test-gutter-menu
class="page-column is-left {{if this.isOpen "is-open"}}"
>
<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"
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>
<LinkTo
@route="jobs"
@activeClass="is-active"
data-test-gutter-link="jobs"
>
Jobs
</LinkTo>
</li>
{{#if (can "accept recommendation")}}
<li>
<LinkTo
@route="optimize"
@activeClass="is-active"
data-test-gutter-link="optimize"
>
Optimize
</LinkTo>
</li>
{{/if}}
<li>
<LinkTo
@route="csi"
@activeClass="is-active"
data-test-gutter-link="storage"
>
Storage
</LinkTo>
</li>
{{#if (can "list variables")}}
<li>
<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>
<LinkTo
@route="clients"
@activeClass="is-active"
data-test-gutter-link="clients"
>
Clients
</LinkTo>
</li>
<li>
<LinkTo
@route="servers"
@activeClass="is-active"
data-test-gutter-link="servers"
>
Servers
</LinkTo>
</li>
<li>
<LinkTo
@route="topology"
@activeClass="is-active"
data-test-gutter-link="topology"
>
Topology
</LinkTo>
</li>
</ul>
<p class="menu-label">
Debugging
</p>
<ul class="menu-list">
<li>
<LinkTo
@route="evaluations"
@activeClass="is-active"
data-test-gutter-link="evaluations"
>
Evaluations
</LinkTo>
</li>
</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>