da4cb6422e
* Recursive trie-building with variable paths * tree structure applied to new path routes and a new util class * Breadcrumbs for SV paths and prompt when nothing exists at a path * Lint and test cleanup * Pre-review cleanup * lintfix * Abstracted pathtree each-ins into a new component class * Path tree component styles * Types added and PR feedback addressed * Path tree to variable paths * Slightly simpler path QP mods * More pr feedback handling * Trim moved into a function on variable model * Traversal and compaction tests for PathTree * Trim Path tests * Variable-paths component tests * Lint fixup for tests
52 lines
1.4 KiB
Handlebars
52 lines
1.4 KiB
Handlebars
{{page-title "Secure Variables"}}
|
||
<section class="section">
|
||
<div class="toolbar">
|
||
<div class="toolbar-item">
|
||
{{#if this.variables.length}}
|
||
<SearchBox
|
||
@searchTerm={{mut this.searchTerm}}
|
||
@onChange={{action this.resetPagination}}
|
||
@placeholder="Search variables..."
|
||
/>
|
||
{{/if}}
|
||
</div>
|
||
<div class="toolbar-item is-right-aligned is-mobile-full-width">
|
||
<div class="button-bar">
|
||
{{#if (can "create variable" namespace=this.qpNamespace)}}
|
||
<LinkTo
|
||
@route="variables.new"
|
||
@query={{hash namespace=this.qpNamespace}}
|
||
class="button is-primary"
|
||
>
|
||
Create Secure Variable
|
||
</LinkTo>
|
||
{{else}}
|
||
<button
|
||
class="button is-primary is-disabled tooltip is-right-aligned"
|
||
aria-label="You don’t have sufficient permissions"
|
||
disabled
|
||
type="button"
|
||
>
|
||
Create Secure Variable
|
||
</button>
|
||
{{/if}}
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{{#if @model.variables.length}}
|
||
<VariablePaths
|
||
@branch={{this.model.pathTree.paths.root}}
|
||
/>
|
||
{{else}}
|
||
<div class="empty-message">
|
||
<h3 data-test-empty-volumes-list-headline class="empty-message-headline">
|
||
No Secure Variables
|
||
</h3>
|
||
<p class="empty-message-body">
|
||
Get started by <LinkTo @route="variables.new">creating a new secure variable</LinkTo>
|
||
</p>
|
||
</div>
|
||
{{/if}}
|
||
</section>
|