refactor: 💡 add loading indicator to connect and cancel actions (#1867)
✅ Closes: ICU-10677
This commit is contained in:
1 parent
2544493b06
commit
4dcf1675ba
2 files changed
+4
No files matched your search
@@ -8,6 +8,7 @@ import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
import { resourceFilter } from 'core/decorators/resource-filter';
|
||||
import { loading } from 'ember-loading';
|
||||
|
||||
export default class ScopesScopeProjectsSessionsRoute extends Route {
|
||||
// =services
|
||||
@@ -88,6 +89,7 @@ export default class ScopesScopeProjectsSessionsRoute extends Route {
|
||||
* @param {SessionModel}
|
||||
*/
|
||||
@action
|
||||
@loading
|
||||
@notifyError(({ message }) => message, { catch: true })
|
||||
@notifySuccess('notifications.canceled-success')
|
||||
async cancelSession(session) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
import { resourceFilter } from 'core/decorators/resource-filter';
|
||||
import { loading } from 'ember-loading';
|
||||
|
||||
export default class ScopesScopeProjectsTargetsRoute extends Route {
|
||||
// =services
|
||||
@@ -79,6 +80,7 @@ export default class ScopesScopeProjectsTargetsRoute extends Route {
|
||||
* @param {HostModel} host
|
||||
*/
|
||||
@action
|
||||
@loading
|
||||
async connect(model, host) {
|
||||
// TODO: Connect: move this logic into the target model
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user