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

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