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