diff --git a/Source/Workbench/Web/Api/Jobs/AllJobs.ts b/Source/Workbench/Web/Api/Jobs/AllJobs.ts index dec77ba0c..7de30906c 100644 --- a/Source/Workbench/Web/Api/Jobs/AllJobs.ts +++ b/Source/Workbench/Web/Api/Jobs/AllJobs.ts @@ -13,19 +13,19 @@ const routeTemplate = Handlebars.compile('/api/event-store/{{eventStore}}/{{name class AllJobsSortBy { private _id: SortingActionsForObservableQuery; - private _name: SortingActionsForObservableQuery; private _details: SortingActionsForObservableQuery; private _type: SortingActionsForObservableQuery; private _status: SortingActionsForObservableQuery; + private _created: SortingActionsForObservableQuery; private _statusChanges: SortingActionsForObservableQuery; private _progress: SortingActionsForObservableQuery; constructor(readonly query: AllJobs) { this._id = new SortingActionsForObservableQuery('id', query); - this._name = new SortingActionsForObservableQuery('name', query); this._details = new SortingActionsForObservableQuery('details', query); this._type = new SortingActionsForObservableQuery('type', query); this._status = new SortingActionsForObservableQuery('status', query); + this._created = new SortingActionsForObservableQuery('created', query); this._statusChanges = new SortingActionsForObservableQuery('statusChanges', query); this._progress = new SortingActionsForObservableQuery('progress', query); } @@ -33,9 +33,6 @@ class AllJobsSortBy { get id(): SortingActionsForObservableQuery { return this._id; } - get name(): SortingActionsForObservableQuery { - return this._name; - } get details(): SortingActionsForObservableQuery { return this._details; } @@ -45,6 +42,9 @@ class AllJobsSortBy { get status(): SortingActionsForObservableQuery { return this._status; } + get created(): SortingActionsForObservableQuery { + return this._created; + } get statusChanges(): SortingActionsForObservableQuery { return this._statusChanges; } @@ -55,19 +55,16 @@ class AllJobsSortBy { class AllJobsSortByWithoutQuery { private _id: SortingActions = new SortingActions('id'); - private _name: SortingActions = new SortingActions('name'); private _details: SortingActions = new SortingActions('details'); private _type: SortingActions = new SortingActions('type'); private _status: SortingActions = new SortingActions('status'); + private _created: SortingActions = new SortingActions('created'); private _statusChanges: SortingActions = new SortingActions('statusChanges'); private _progress: SortingActions = new SortingActions('progress'); get id(): SortingActions { return this._id; } - get name(): SortingActions { - return this._name; - } get details(): SortingActions { return this._details; } @@ -77,6 +74,9 @@ class AllJobsSortByWithoutQuery { get status(): SortingActions { return this._status; } + get created(): SortingActions { + return this._created; + } get statusChanges(): SortingActions { return this._statusChanges; } diff --git a/Source/Workbench/Web/Api/Jobs/Job.ts b/Source/Workbench/Web/Api/Jobs/Job.ts index 7033b94e1..4ca35686d 100644 --- a/Source/Workbench/Web/Api/Jobs/Job.ts +++ b/Source/Workbench/Web/Api/Jobs/Job.ts @@ -9,15 +9,13 @@ import { Guid } from '@cratis/fundamentals'; import { JobProgress } from './JobProgress'; import { JobStatus } from './JobStatus'; import { JobStatusChanged } from './JobStatusChanged'; +import { SerializableDateTimeOffset } from '../Primitives/SerializableDateTimeOffset'; export class Job { @field(Guid) id!: Guid; - @field(String) - name!: string; - @field(String) details!: string; @@ -27,6 +25,9 @@ export class Job { @field(Number) status!: JobStatus; + @field(SerializableDateTimeOffset) + created!: SerializableDateTimeOffset; + @field(JobStatusChanged, true) statusChanges!: JobStatusChanged[];