Files
nomad/ui/app/controllers/variables/variable.js
Phil Renaud 9b367a5f5f [ui] "Can Read" checks on individual Secure Variables (#14020)
* Changelog and lintfix

* Changelog removed

* Forbidden state on individual variables

* CanRead checked on variable path links

* Mirage fixture with lesser secure variables access, temporary fix for * namespaces

* Read flow acceptance tests

* Unit tests for variable.canRead

* lintfix

* TODO squashed, thanks Jai

* explicitly link mirage fixture vars to jobs via namespace

* Typofix; delete to read

* Linking the original alloc

* Percy snapshots uniquely named

* Guarantee that the alloc we depend on has tasks within it

* Logging variables

* Trying to skip delete

* Now without create flow either

* Dedicated cluster fixture for testing variables

* Disambiguate percy calls
2022-08-09 13:17:55 -04:00

19 lines
501 B
JavaScript

import Controller from '@ember/controller';
export default class VariablesVariableController extends Controller {
get breadcrumbs() {
let crumbs = [];
this.params.path.split('/').reduce((m, n) => {
crumbs.push({
label: n,
args:
m + n === this.params.path // If the last crumb, link to the var itself
? [`variables.variable`, m + n]
: [`variables.path`, m + n],
});
return m + n + '/';
}, []);
return crumbs;
}
}