feat: 🎸 show session status in list

This commit is contained in:
Randall Morey committed 2020-09-18 15:59:42 -04:00
1 parent 2aa330fd36
commit 5fb1b14658
4 files changed
+13 -1

No files matched your search

@@ -19,6 +19,7 @@
<row.headerCell>{{t "resources.user"}}</row.headerCell>
<row.headerCell>{{t "resources.target"}}</row.headerCell>
<row.headerCell>{{t "form.label.started"}}</row.headerCell>
<row.headerCell>{{t "form.label.status"}}</row.headerCell>
<row.headerCell>{{t "titles.actions"}}</row.headerCell>
</header.row>
</table.header>
@@ -35,6 +36,9 @@
{{format-date-iso-human sessionAggregate.session.created_time}}
</time>
</row.cell>
<row.cell>
<Rose::Badge>{{sessionAggregate.session.status}}</Rose::Badge>
</row.cell>
<row.cell>
<Rose::Button @style="secondary" {{on "click" (route-action "cancelSession" sessionAggregate.session)}}>
{{t "actions.cancel"}}
+1 -1
View File
@@ -308,7 +308,7 @@ export default function() {
version: attrs.version
};
if (method === 'cancel') {
updatedAttrs.status = 'canceled';
updatedAttrs.status = 'canceling';
}
return session.update(updatedAttrs);
});
+7
View File
@@ -1,9 +1,16 @@
import factory from '../generated/factories/target';
import { trait } from 'ember-cli-mirage';
import { random } from 'faker';
export default factory.extend({
id: (i) => `session-id-${i}`,
status: () => random.arrayElement([
'pending',
'active',
'canceling',
'terminated'
]),
/**
* Sessions generated with this trait will automatically form
+1
View File
@@ -163,6 +163,7 @@ form:
current_password: Current Password
new_password: New Password
started: Started
status: Status
errors:
titles:
unauthenticated-error: You are not signed in