github.com/hernad/nomad@v1.6.112/ui/app/components/variable-paths.hbs (about)

     1  {{!
     2    Copyright (c) HashiCorp, Inc.
     3    SPDX-License-Identifier: MPL-2.0
     4  ~}}
     5  
     6  <ListTable class="path-tree" @source={{@branch}} as |t|>
     7    <t.head>
     8      <th>
     9        Path
    10      </th>
    11      <th>
    12        Namespace
    13      </th>
    14      <th>
    15        Last Modified
    16      </th>
    17    </t.head>
    18    <tbody>
    19      {{#each this.folders as |folder|}}
    20        <tr data-test-folder-row {{on "click" (fn this.handleFolderClick folder.data.absolutePath)}}>
    21          <td colspan="3"
    22            {{keyboard-shortcut 
    23              enumerated=true
    24              action=(fn this.handleFolderClick folder.data.absolutePath)
    25            }}
    26          >
    27            <span>
    28              <FlightIcon @name="folder" />
    29              <LinkTo @route="variables.path" @model={{folder.data.absolutePath}} @query={{hash namespace="*"}}>
    30                {{trim-path folder.name}}
    31              </LinkTo>
    32            </span>
    33          </td>
    34        </tr>
    35      {{/each}}
    36  
    37      {{#each this.files as |file|}}
    38        <tr
    39          data-test-file-row
    40          {{on "click" (fn this.handleFileClick file)}}
    41          class={{if (can "read variable" path=file.absoluteFilePath namespace=file.variable.namespace) "" "inaccessible"}}
    42          {{keyboard-shortcut 
    43            enumerated=true
    44            action=(fn this.handleFileClick file)
    45          }}
    46        >
    47          <td>
    48            <FlightIcon @name="file-text" />
    49            {{#if (can "read variable" path=file.absoluteFilePath namespace=file.variable.namespace)}}
    50            <LinkTo
    51              @route="variables.variable"
    52              @model={{file.variable.id}}
    53              @query={{hash namespace="*"}}
    54            >
    55              {{file.name}}
    56            </LinkTo>
    57            {{else}}
    58              <span title="Your access policy does not allow you to view the contents of {{file.name}}">{{file.name}}</span>
    59            {{/if}}
    60          </td>
    61          <td>
    62            {{file.variable.namespace}}
    63          </td>
    64          <td>
    65            <span class="tooltip" aria-label="{{format-ts file.variable.modifyTime}}">
    66              {{moment-from-now file.variable.modifyTime}}
    67            </span>
    68          </td>
    69        </tr>
    70      {{/each}}
    71  
    72    </tbody>
    73        </ListTable>