Icu 10521 add route logic from sessions list to session detail screen (#1834)
* feat: 🎸 add canRead ability for session model * refactor: 💡 create constant values for session status types * feat: 🎸 add link to session detail from sessions list ✅ Closes: ICU-10521
This commit is contained in:
1 parent
0100f8b497
commit
340429fdb5
7 files changed
+254
-52
No files matched your search
@@ -10,7 +10,16 @@ import { tracked } from '@glimmer/tracking';
|
||||
import { A } from '@ember/array';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export const statusTypes = ['active', 'pending', 'canceling', 'terminated'];
|
||||
export const STATUS_SESSION_ACTIVE = 'active';
|
||||
export const STATUS_SESSION_PENDING = 'pending';
|
||||
export const STATUS_SESSION_CANCELING = 'canceling';
|
||||
export const STATUS_SESSION_TERMINATED = 'terminated';
|
||||
export const statusTypes = [
|
||||
STATUS_SESSION_ACTIVE,
|
||||
STATUS_SESSION_PENDING,
|
||||
STATUS_SESSION_CANCELING,
|
||||
STATUS_SESSION_TERMINATED,
|
||||
];
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -103,8 +112,8 @@ export default class SessionModel extends GeneratedSessionModel {
|
||||
@tracked proxy_port;
|
||||
credentials = A();
|
||||
|
||||
@equal('status', 'active') isActive;
|
||||
@equal('status', 'pending') isPending;
|
||||
@equal('status', STATUS_SESSION_ACTIVE) isActive;
|
||||
@equal('status', STATUS_SESSION_PENDING) isPending;
|
||||
|
||||
/**
|
||||
* True if status is an unknown string.
|
||||
|
||||
Reference in new issue
Block a user