Merge pull request #113 from hashicorp/ICU-512-list-auth-methods
List auth-methods
This commit is contained in:
9 files changed
+96
No files matched your search
@@ -36,6 +36,7 @@ Router.map(function () {
|
||||
});
|
||||
this.route('new');
|
||||
});
|
||||
this.route('auth-methods', function() {});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeAuthMethodsRoute extends Route {
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Load all auth-methods under current scope
|
||||
* @return {Promise[AuthMethodModel]}
|
||||
*/
|
||||
async model() {
|
||||
const { id: scopeID} = this.modelFor('scopes.scope');
|
||||
return this.store.findAll('auth-method', { adapterOptions: { scopeID } });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeAuthMethodsIndexRoute extends Route {
|
||||
}
|
||||
@@ -18,6 +18,9 @@
|
||||
<nav.link @route="scopes.scope.roles">
|
||||
{{t "resources.roles"}}
|
||||
</nav.link>
|
||||
<nav.link @route="scopes.scope.auth-methods">
|
||||
{{t "resources.auth-methods"}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Sidebar>
|
||||
|
||||
{{outlet "sidebar"}}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{outlet}}
|
||||
@@ -0,0 +1,48 @@
|
||||
<Rose::Layout::Page as |page|>
|
||||
<page.header>
|
||||
<h2>{{t "resources.auth-methods"}}</h2>
|
||||
</page.header>
|
||||
|
||||
<page.body>
|
||||
{{#if @model}}
|
||||
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.cell>{{t 'form.label.name'}}</row.cell>
|
||||
<row.cell>{{t 'form.label.type'}}</row.cell>
|
||||
<row.cell>{{t 'form.label.id'}}</row.cell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
|
||||
<table.body as |body|>
|
||||
{{#each @model as |authMethod|}}
|
||||
<body.row as |row|>
|
||||
<row.cell>
|
||||
{{authMethod.name}}
|
||||
{{authMethod.description}}
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Badge @style="outline">
|
||||
{{authMethod.type}}
|
||||
</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>{{authMethod.id}}</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
|
||||
{{else}}
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t 'titles.auth-methods-welcome'}} as |message|>
|
||||
<message.description>
|
||||
{{t 'descriptions.auth-methods-welcome'}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
|
||||
{{/if}}
|
||||
</page.body>
|
||||
</Rose::Layout::Page>
|
||||
@@ -0,0 +1,11 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/auth-methods', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:scopes/scope/auth-methods');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/auth-methods/index', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:scopes/scope/auth-methods/index');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
@@ -31,6 +31,7 @@ resources:
|
||||
project: Project
|
||||
host-catalog: Host Catalog
|
||||
host-catalogs: Host Catalogs
|
||||
auth-methods: Auth Methods
|
||||
titles:
|
||||
iam: IAM
|
||||
new: New
|
||||
@@ -45,6 +46,7 @@ titles:
|
||||
users-welcome: Welcome to Users
|
||||
roles-welcome: Welcome to Roles
|
||||
groups-welcome: Welcome to Groups
|
||||
auth-methods-welcome: Welcome to Auth Methods
|
||||
grants: Permissions
|
||||
new-grant: New Grant
|
||||
principals: Principals
|
||||
@@ -56,6 +58,7 @@ descriptions:
|
||||
users-welcome: Users are authorized to access Boundary.
|
||||
roles-welcome: Roles are collections of capabilities that can be granted to user and/or groups.
|
||||
groups-welcome: Groups are collections of users.
|
||||
auth-methods-welcome: Auth methods are configurations to authenticate users.
|
||||
states:
|
||||
info: Info
|
||||
success: Success
|
||||
|
||||
Reference in new issue
Block a user