github.com/hernad/nomad@v1.6.112/ui/app/templates/variables/path.hbs (about)

     1  {{!
     2    Copyright (c) HashiCorp, Inc.
     3    SPDX-License-Identifier: MPL-2.0
     4  ~}}
     5  
     6  {{page-title "Variables: " this.absolutePath}}
     7  {{#each this.breadcrumbs as |crumb|}}
     8    <Breadcrumb @crumb={{crumb}} />
     9  {{/each}}
    10    <section class="section">
    11      <div class="toolbar">
    12        <div class="toolbar-item is-right-aligned is-mobile-full-width">
    13          {{#if this.namespaceOptions}}
    14            <SingleSelectDropdown
    15              data-test-variable-namespace-filter
    16              @label="Namespace"
    17              @options={{this.namespaceOptions}}
    18              @selection={{this.namespaceSelection}}
    19              @onSelect={{this.setNamespace}}
    20            />
    21          {{/if}}
    22          <div class="button-bar">
    23            {{#if (can "write variable" path=(concat this.absolutePath "/") namespace=this.namespaceSelection)}}
    24              <LinkTo
    25                @route="variables.new"
    26                @query={{hash path=(concat this.absolutePath "/")}}
    27                class="button is-primary"
    28                {{keyboard-shortcut
    29                  pattern=(array "n" "v")
    30                  action=(action this.goToNewVariable)
    31                  label="Create Variable"
    32                }}
    33              >
    34                Create Variable
    35              </LinkTo>
    36            {{else}}
    37              <button
    38                class="button is-primary is-disabled tooltip is-right-aligned"
    39                aria-label="You don’t have sufficient permissions"
    40                disabled
    41                type="button"
    42              >
    43                Create Variable
    44              </button>
    45            {{/if}}
    46          </div>
    47        </div>
    48      </div>
    49      {{#if this.isForbidden}}
    50        <ForbiddenMessage />
    51      {{else}}
    52        {{#if this.model.treeAtPath}}
    53          <VariablePaths
    54            @branch={{this.model.treeAtPath}}
    55          />
    56        {{else}}
    57          <div class="empty-message">
    58            {{#if (eq this.namespaceSelection "*")}}
    59              <h3 data-test-empty-variables-list-headline class="empty-message-headline">
    60                Path /{{this.absolutePath}} contains no variables
    61              </h3>
    62              <p class="empty-message-body">
    63                To get started, <LinkTo @route="variables.new" @query={{hash path=(concat this.absolutePath "/")}}>create a new variable here</LinkTo>, or <LinkTo @route="variables">go back to the Variables root directory</LinkTo>.
    64              </p>
    65            {{else}}
    66              <h3 data-test-no-matching-variables-list-headline class="empty-message-headline">
    67                No Matches
    68              </h3>
    69              <p class="empty-message-body">
    70                No paths or variables match the namespace 
    71                <strong>
    72                  {{this.namespaceSelection}}
    73                </strong>
    74              </p>
    75            {{/if}}
    76          </div>
    77        {{/if}}
    78      {{/if}}
    79    </section>