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
47 lines
1.6 KiB
Handlebars
47 lines
1.6 KiB
Handlebars
{{page-title "Secure Variables: " this.model.absolutePath}}
|
||
{{#each this.breadcrumbs as |crumb|}}
|
||
<Breadcrumb @crumb={{crumb}} />
|
||
{{/each}}
|
||
<section class="section">
|
||
<div class="toolbar">
|
||
<div class="toolbar-item is-right-aligned is-mobile-full-width">
|
||
<div class="button-bar">
|
||
{{!-- TODO: make sure qpNamespace persists to here --}}
|
||
{{#if (can "create variable" namespace=this.qpNamespace)}}
|
||
<LinkTo
|
||
@route="variables.new"
|
||
@query={{hash namespace=this.qpNamespace path=(concat this.model.absolutePath "/")}}
|
||
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 this.model.treeAtPath}}
|
||
<VariablePaths
|
||
@branch={{this.model.treeAtPath}}
|
||
/>
|
||
{{else}}
|
||
<div class="empty-message">
|
||
<h3 data-test-empty-volumes-list-headline class="empty-message-headline">
|
||
Path /{{this.model.absolutePath}} contains no variables
|
||
</h3>
|
||
<p class="empty-message-body">
|
||
To get started, <LinkTo @route="variables.new" @query={{hash path=(concat this.model.absolutePath "/")}}>create a new secure variable here</LinkTo>, or <LinkTo @route="variables">go back to the Secure Variables root directory</LinkTo>.
|
||
</p>
|
||
</div>
|
||
{{/if}}
|
||
</section>
|