fix(editor): Remove 'crashed' status from filter (#5524)
* fix(editor): remove 'crashed' status from filter * fix(editor): remove 'crashed' and 'new' status from filter * fix(editor): add 'status' to response * fix(editor): create request filter for workflow level execution filtering * fix(editor): update filters * fix(editor): simplify condition * fix(editor): update filters * fix(editor): optimizing data loading flow * fix(editor): always load past executions
This commit is contained in:
@@ -43,13 +43,19 @@ export const executionHelpers = mixins(genericHelpers).extend({
|
||||
if (execution.status === 'waiting' || execution.waitTill) {
|
||||
status.name = 'waiting';
|
||||
status.label = this.$locale.baseText('executionsList.waiting');
|
||||
} else if (execution.status === 'running' || execution.stoppedAt === undefined) {
|
||||
} else if (
|
||||
execution.status === 'running' ||
|
||||
execution.status === 'new' ||
|
||||
execution.stoppedAt === undefined
|
||||
) {
|
||||
status.name = 'running';
|
||||
status.label = this.$locale.baseText('executionsList.running');
|
||||
status.runningTime = this.displayTimer(
|
||||
new Date().getTime() - new Date(execution.startedAt).getTime(),
|
||||
true,
|
||||
);
|
||||
if (execution.startedAt) {
|
||||
status.runningTime = this.displayTimer(
|
||||
new Date().getTime() - new Date(execution.startedAt).getTime(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
} else if (execution.status === 'success' || execution.finished) {
|
||||
status.name = 'success';
|
||||
status.label = this.$locale.baseText('executionsList.succeeded');
|
||||
@@ -59,21 +65,9 @@ export const executionHelpers = mixins(genericHelpers).extend({
|
||||
true,
|
||||
);
|
||||
}
|
||||
} else if (execution.status === 'crashed') {
|
||||
status.name = 'crashed';
|
||||
status.label = this.$locale.baseText('executionsList.error');
|
||||
if (execution.stoppedAt) {
|
||||
status.runningTime = this.displayTimer(
|
||||
new Date(execution.stoppedAt).getTime() - new Date(execution.startedAt).getTime(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
} else if (execution.status === 'new') {
|
||||
status.name = 'new';
|
||||
status.label = this.$locale.baseText('executionsList.new');
|
||||
} else if (
|
||||
execution.status === 'error' ||
|
||||
execution.status === 'failed' ||
|
||||
execution.status === 'crashed' ||
|
||||
execution.stoppedAt !== null
|
||||
) {
|
||||
status.name = 'error';
|
||||
|
||||
@@ -77,7 +77,9 @@ export const restApi = Vue.extend({
|
||||
getActivationError: (id: string): Promise<IActivationError | undefined> => {
|
||||
return self.restApi().makeRestApiRequest('GET', `/active/error/${id}`);
|
||||
},
|
||||
getCurrentExecutions: (filter: object): Promise<IExecutionsCurrentSummaryExtended[]> => {
|
||||
getCurrentExecutions: (
|
||||
filter: IDataObject,
|
||||
): Promise<IExecutionsCurrentSummaryExtended[]> => {
|
||||
let sendData = {};
|
||||
if (filter) {
|
||||
sendData = {
|
||||
@@ -179,7 +181,7 @@ export const restApi = Vue.extend({
|
||||
// Returns all saved executions
|
||||
// TODO: For sure needs some kind of default filter like last day, with max 10 results, ...
|
||||
getPastExecutions: (
|
||||
filter: object,
|
||||
filter: IDataObject,
|
||||
limit: number,
|
||||
lastId?: string,
|
||||
firstId?: string,
|
||||
|
||||
Reference in New Issue
Block a user