Icu 13357 create loading screen for admin UI list routes (#2231)

* test: 💍 fix failing tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* feat: 🎸 add generic loading indicator for admin ui

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* feat: 🎸 add custom loading logic for search and filtering

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* chore: 🤖 fix lint error

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* refactor: 💡 remove commented helper for sessions list

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* style: 💄 update loading indicator margin to relative unit

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* refactor: 💡 remove unneeded custom loading action

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357
This commit is contained in:
Cameron Perera authored and Zhihe Li committed 2024-04-12 14:55:34 -04:00
1 parent d52957d87b
commit 13da35c06b
4 files changed
+12 -10

No files matched your search

@@ -44,6 +44,8 @@ export default class ScopesScopeSessionsIndexRoute extends Route {
associatedUsers = [];
associatedTargets = [];
// =methods
/**
* Loads all sessions under the current scope and encapsulates them into
* an array of objects containing their associated users and targets.
@@ -116,16 +118,6 @@ export default class ScopesScopeSessionsIndexRoute extends Route {
});
}
// async canListUsers(orgId) {
// const orgScope = await this.store.findRecord('scope', orgId);
// const globalScope = await this.store.findRecord('scope', 'global');
// return (
// this.can.can('list model', globalScope, { collection: 'users' }) &&
// this.can.can('list model', orgScope, { collection: 'users' })
// );
// }
/**
* Get all the users but only load them once when entering the route.
* @param scope
+5
View File
@@ -1005,3 +1005,8 @@
.add-policy-link {
margin-bottom: 1.5rem;
}
// generic loading indicator
.loading-indicator {
margin-top: 20%;
}
@@ -0,0 +1,4 @@
<Hds::ApplicationState class='loading-indicator' as |A|>
<A.Header @title={{t 'states.loading.title'}} @icon='loading' />
<A.Body @text={{t 'states.loading.generic-description'}} />
</Hds::ApplicationState>