feat: 🎸 List managed groups
This commit is contained in:
1 parent
288b32f862
commit
ff88e97bfe
6 files changed
+64
-3
No files matched your search
@@ -55,7 +55,7 @@ Router.map(function () {
|
||||
});
|
||||
this.route('new');
|
||||
});
|
||||
this.route('managed-groups');
|
||||
this.route('managed-groups', function () {});
|
||||
});
|
||||
this.route('new');
|
||||
});
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends Route {}
|
||||
export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends Route {
|
||||
/**
|
||||
*
|
||||
* @returns {Promise{[ManagedGroupsModel]}}
|
||||
*/
|
||||
model() {
|
||||
const authMethod = this.modelFor('scopes.scope.auth-methods.auth-method');
|
||||
const { id: auth_method_id } = authMethod;
|
||||
return this.store.query('managed-group', { auth_method_id });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsIndexRoute extends Route {}
|
||||
@@ -1,5 +1,4 @@
|
||||
{{#if @model}}
|
||||
|
||||
{{! OIDC accounts display more fields }}
|
||||
{{#if @model.firstObject.isOIDC}}
|
||||
<Rose::Table as |table|>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{{#if @model}}
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.headerCell>{{t 'form.name.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.description.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.type.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
|
||||
<table.body as |body|>
|
||||
{{#each @model as |managed-group|}}
|
||||
<body.row as |row|>
|
||||
<row.headerCell>{{managed-group.name}}</row.headerCell>
|
||||
<row.cell>{{managed-group.description}}</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Badge>{{managed-group.type}}</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Copyable
|
||||
@text={{managed-group.id}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{managed-group.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
{{/if}}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Route | scopes/scope/auth-methods/auth-method/managed-groups/index',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/auth-methods/auth-method/managed-groups/index'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
Reference in new issue
Block a user