open-nomad/ui/app/templates/components/gutter-menu.hbs
Buck Doyle 2998deac50
Convert to angle bracket invocation (#8075)
This is mostly a direct application of the ember-angle-brackets-codemod.
I manually restored newlines in multi-line component invocations, usually
preserving file line length except for now-non-positional link-to @route.

I needed to rename task to taskState in some cases to avoid Ember
Concurrency naming conflicts.
2020-06-01 14:03:56 -05:00

92 lines
3 KiB
Handlebars

<div data-test-gutter-menu class="page-column is-left {{if isOpen "is-open"}}">
<div class="gutter {{if isOpen "is-open"}}">
<header class="collapsed-menu {{if isOpen "is-open"}}">
<span data-test-gutter-gutter-toggle class="gutter-toggle" aria-label="menu" onclick={{action onHamburgerClick}}>
{{partial "partials/hamburger-menu"}}
</span>
<span class="logo-container">
{{partial "partials/nomad-logo"}}
</span>
</header>
<aside class="menu">
{{#if system.shouldShowRegions}}
<div class="collapsed-only">
<p class="menu-label">
Region {{if system.shouldShowNamespaces "& Namespace"}}
</p>
<ul class="menu-list">
<li>
<div class="menu-item is-wide">
<RegionSwitcher />
</div>
</li>
</ul>
</div>
{{/if}}
{{#if system.shouldShowNamespaces}}
<ul class="menu-list">
<li>
<div class="menu-item is-wide">
<PowerSelect
data-test-namespace-switcher
@options={{sortedNamespaces}}
@selected={{system.activeNamespace}}
@searchField="name"
@searchEnabled={{gt sortedNamespaces.length 10}}
@onChange={{action gotoJobsForNamespace}}
@tagName="div"
@class="namespace-switcher"
as |namespace|>
{{#if (eq namespace.name "default")}}
Default Namespace
{{else}}
{{namespace.name}}
{{/if}}
</PowerSelect>
</div>
</li>
</ul>
{{/if}}
<p class="menu-label">
Workload
</p>
<ul class="menu-list">
<li>
<LinkTo
@route="jobs"
@query={{hash jobNamespace=system.activeNamespace.id}}
@activeClass="is-active"
data-test-gutter-link="jobs">
Jobs
</LinkTo>
</li>
</ul>
<p class="menu-label is-minor">
Integrations
</p>
<ul class="menu-list">
<li>
<LinkTo
@route="csi"
@query={{hash volumeNamespace=system.activeNamespace.id}}
@activeClass="is-active"
data-test-gutter-link="storage">
Storage <span class="tag is-small">Beta</span>
</LinkTo>
</li>
</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>
</ul>
</aside>
</div>
</div>
<div data-test-page-content class="page-column is-right">
{{yield}}
</div>
<div data-test-gutter-backdrop class="gutter-backdrop {{if isOpen "is-open"}}" onclick={{action onHamburgerClick}}></div>