mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Adds Namespace UI to Access Control - Also adds two step buttons to other Access Control pages --------- Co-authored-by: Phil Renaud <phil@riotindustries.com>
40 lines
813 B
JavaScript
40 lines
813 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Controller from '@ember/controller';
|
|
import { action } from '@ember/object';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class AccessControlNamespacesIndexController extends Controller {
|
|
@service router;
|
|
@service notifications;
|
|
@service can;
|
|
|
|
@action openNamespace(namespace) {
|
|
this.router.transitionTo(
|
|
'access-control.namespaces.acl-namespace',
|
|
namespace.name
|
|
);
|
|
}
|
|
|
|
@action goToNewNamespace() {
|
|
this.router.transitionTo('access-control.namespaces.new');
|
|
}
|
|
|
|
get columns() {
|
|
return [
|
|
{
|
|
key: 'name',
|
|
label: 'Name',
|
|
isSortable: true,
|
|
},
|
|
{
|
|
key: 'description',
|
|
label: 'Description',
|
|
},
|
|
];
|
|
}
|
|
}
|