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:
@@ -335,14 +335,6 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
id: 'error',
|
||||
name: this.$locale.baseText('executionsList.error'),
|
||||
},
|
||||
{
|
||||
id: 'crashed',
|
||||
name: this.$locale.baseText('executionsList.error'),
|
||||
},
|
||||
{
|
||||
id: 'new',
|
||||
name: this.$locale.baseText('executionsList.new'),
|
||||
},
|
||||
{
|
||||
id: 'running',
|
||||
name: this.$locale.baseText('executionsList.running'),
|
||||
@@ -363,10 +355,10 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
combinedExecutions(): IExecutionsSummary[] {
|
||||
const returnData: IExecutionsSummary[] = [];
|
||||
|
||||
if (['ALL', 'running', 'new'].includes(this.filter.status)) {
|
||||
if (['ALL', 'running'].includes(this.filter.status)) {
|
||||
returnData.push(...this.activeExecutions);
|
||||
}
|
||||
if (['ALL', 'error', 'crashed', 'success', 'waiting'].includes(this.filter.status)) {
|
||||
if (['ALL', 'error', 'success', 'waiting'].includes(this.filter.status)) {
|
||||
returnData.push(...this.finishedExecutions);
|
||||
}
|
||||
return returnData;
|
||||
@@ -404,14 +396,8 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
case 'waiting':
|
||||
queryFilter.status = ['waiting'];
|
||||
break;
|
||||
case 'crashed':
|
||||
queryFilter.status = ['crashed'];
|
||||
break;
|
||||
case 'new':
|
||||
queryFilter.status = ['new'];
|
||||
break;
|
||||
case 'error':
|
||||
queryFilter.status = ['failed', 'crashed', 'error'];
|
||||
queryFilter.status = ['failed', 'crashed'];
|
||||
break;
|
||||
case 'success':
|
||||
queryFilter.status = ['success'];
|
||||
@@ -813,8 +799,9 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
this.isDataLoading = false;
|
||||
},
|
||||
getStatus(execution: IExecutionsSummary): ExecutionStatus {
|
||||
if (execution.status) return execution.status;
|
||||
else {
|
||||
if (execution.status) {
|
||||
return execution.status;
|
||||
} else {
|
||||
// this should not happen but just in case
|
||||
let status: ExecutionStatus = 'unknown';
|
||||
if (execution.waitTill) {
|
||||
@@ -843,7 +830,7 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
} else if (status === 'crashed') {
|
||||
text = this.$locale.baseText('executionsList.error');
|
||||
} else if (status === 'new') {
|
||||
text = this.$locale.baseText('executionsList.new');
|
||||
text = this.$locale.baseText('executionsList.running');
|
||||
} else if (status === 'running') {
|
||||
text = this.$locale.baseText('executionsList.running');
|
||||
} else if (status === 'success') {
|
||||
@@ -865,7 +852,7 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
} else if (status === 'crashed') {
|
||||
path = 'executionsList.statusText';
|
||||
} else if (status === 'new') {
|
||||
path = 'executionsList.statusNew';
|
||||
path = 'executionsList.statusRunning';
|
||||
} else if (status === 'running') {
|
||||
path = 'executionsList.statusRunning';
|
||||
} else if (status === 'success') {
|
||||
@@ -1018,14 +1005,11 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
font-size: var(--font-size-s);
|
||||
font-weight: var(--font-weight-bold);
|
||||
|
||||
.crashed &,
|
||||
.failed & {
|
||||
color: var(--color-danger);
|
||||
}
|
||||
|
||||
.crashed & {
|
||||
color: var(--color-danger);
|
||||
}
|
||||
|
||||
.waiting & {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
@@ -1034,6 +1018,7 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
font-weight: var(--font-weight-normal);
|
||||
}
|
||||
|
||||
.new &,
|
||||
.running & {
|
||||
color: var(--color-warning);
|
||||
}
|
||||
@@ -1131,18 +1116,16 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
||||
background: var(--color-primary-tint-3);
|
||||
}
|
||||
|
||||
&.crashed td:first-child::before,
|
||||
&.failed td:first-child::before {
|
||||
background: var(--color-danger);
|
||||
}
|
||||
|
||||
&.crashed td:first-child::before {
|
||||
background: var(--color-danger);
|
||||
}
|
||||
|
||||
&.success td:first-child::before {
|
||||
background: var(--color-success);
|
||||
}
|
||||
|
||||
&.new td:first-child::before,
|
||||
&.running td:first-child::before {
|
||||
background: var(--color-warning);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user