github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/templates/variables/path.hbs (about)

     1  {{page-title "Variables: " this.absolutePath}}
     2  {{#each this.breadcrumbs as |crumb|}}
     3    <Breadcrumb @crumb={{crumb}} />
     4  {{/each}}
     5    <section class="section">
     6      <div class="toolbar">
     7        <div class="toolbar-item is-right-aligned is-mobile-full-width">
     8          {{#if this.namespaceOptions}}
     9            <SingleSelectDropdown
    10              data-test-variable-namespace-filter
    11              @label="Namespace"
    12              @options={{this.namespaceOptions}}
    13              @selection={{this.namespaceSelection}}
    14              @onSelect={{this.setNamespace}}
    15            />
    16          {{/if}}
    17          <div class="button-bar">
    18            {{#if (can "write variable" path=(concat this.absolutePath "/") namespace=this.namespaceSelection)}}
    19              <LinkTo
    20                @route="variables.new"
    21                @query={{hash path=(concat this.absolutePath "/")}}
    22                class="button is-primary"
    23              >
    24                Create Variable
    25              </LinkTo>
    26            {{else}}
    27              <button
    28                class="button is-primary is-disabled tooltip is-right-aligned"
    29                aria-label="You don’t have sufficient permissions"
    30                disabled
    31                type="button"
    32              >
    33                Create Variable
    34              </button>
    35            {{/if}}
    36          </div>
    37        </div>
    38      </div>
    39      {{#if this.isForbidden}}
    40        <ForbiddenMessage />
    41      {{else}}
    42        {{#if this.model.treeAtPath}}
    43          <VariablePaths
    44            @branch={{this.model.treeAtPath}}
    45          />
    46        {{else}}
    47          <div class="empty-message">
    48            {{#if (eq this.namespaceSelection "*")}}
    49              <h3 data-test-empty-variables-list-headline class="empty-message-headline">
    50                Path /{{this.absolutePath}} contains no variables
    51              </h3>
    52              <p class="empty-message-body">
    53                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>.
    54              </p>
    55            {{else}}
    56              <h3 data-test-no-matching-variables-list-headline class="empty-message-headline">
    57                No Matches
    58              </h3>
    59              <p class="empty-message-body">
    60                No paths or variables match the namespace 
    61                <strong>
    62                  {{this.namespaceSelection}}
    63                </strong>
    64              </p>
    65            {{/if}}
    66          </div>
    67        {{/if}}
    68      {{/if}}
    69    </section>