Remove accounts route in favour of members
This commit is contained in:
1 parent
23c461fd3e
commit
9e005a73bb
4 files changed
-105
No files matched your search
@@ -60,7 +60,6 @@ Router.map(function () {
|
||||
'managed-group',
|
||||
{ path: ':managed_group_id' },
|
||||
function () {
|
||||
this.route('accounts');
|
||||
this.route('members');
|
||||
}
|
||||
);
|
||||
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsManagedGroupAccountsRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service resourceFilterStore;
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Returns the previously loaded managed group instances accounts.
|
||||
* @return {Promise{[AccountModel]}}
|
||||
*/
|
||||
model() {
|
||||
const { auth_method_id, member_ids } = this.modelFor(
|
||||
'scopes.scope.auth-methods.auth-method.managed-groups.managed-group'
|
||||
);
|
||||
|
||||
return this.resourceFilterStore.queryBy(
|
||||
'account',
|
||||
{ id: member_ids },
|
||||
{ auth_method_id }
|
||||
);
|
||||
}
|
||||
}
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
{{page-title (t 'resources.account.title_plural')}}
|
||||
|
||||
{{#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.issuer.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.subject.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.email.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.full_name.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 |account|}}
|
||||
<body.row as |row|>
|
||||
<row.headerCell scope='row'>
|
||||
{{account.accountName}}
|
||||
<p>{{account.description}}</p>
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<code>{{account.attributes.issuer}}</code>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{account.attributes.subject}}</code>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{account.attributes.email}}</code>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
{{account.attributes.full_name}}
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Badge>{{account.type}}</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Copyable
|
||||
@text={{account.id}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{account.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
{{else}}
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message
|
||||
@title={{t 'resources.managed-group.messages.accounts.title'}}
|
||||
as |message|
|
||||
>
|
||||
<message.description>
|
||||
{{t 'resources.managed-group.messages.accounts.description'}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
{{/if}}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Route | scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
Reference in new issue
Block a user