Files
nomad/ui/app/controllers/access-control/namespaces/index.js
Mike Nomitch bc039a7a8a Adds Namespace UI to Access Control (#19402)
Adds Namespace UI to Access Control - Also adds two step buttons to other Access Control pages

---------

Co-authored-by: Phil Renaud <phil@riotindustries.com>
2024-01-16 09:20:50 -08:00

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',
},
];
}
}