2019-06-23 03:35:23 -07:00
|
|
|
<template>
|
|
|
|
<span>
|
2021-11-10 10:41:40 -08:00
|
|
|
<el-dialog :visible="dialogVisible" append-to-body width="80%" :title="`${$baseText('executionsList.workflowExecutions')} ${combinedExecutions.length}/${finishedExecutionsCountEstimated === true ? '~' : ''}${combinedExecutionsCount}`" :before-close="closeDialog">
|
2019-06-23 03:35:23 -07:00
|
|
|
<div class="filters">
|
|
|
|
<el-row>
|
2021-08-29 04:36:17 -07:00
|
|
|
<el-col :span="2" class="filter-headline">
|
2021-11-10 10:41:40 -08:00
|
|
|
{{ $baseText('executionsList.filters') }}:
|
2019-06-23 03:35:23 -07:00
|
|
|
</el-col>
|
2021-08-29 04:36:17 -07:00
|
|
|
<el-col :span="7">
|
2021-11-10 10:41:40 -08:00
|
|
|
<n8n-select v-model="filter.workflowId" :placeholder="$baseText('executionsList.selectWorkflow')" size="medium" filterable @change="handleFilterChanged">
|
2021-08-29 04:36:17 -07:00
|
|
|
<n8n-option
|
2019-06-23 03:35:23 -07:00
|
|
|
v-for="item in workflows"
|
|
|
|
:key="item.id"
|
|
|
|
:label="item.name"
|
|
|
|
:value="item.id">
|
2021-08-29 04:36:17 -07:00
|
|
|
</n8n-option>
|
|
|
|
</n8n-select>
|
2019-06-23 03:35:23 -07:00
|
|
|
</el-col>
|
2021-08-29 04:36:17 -07:00
|
|
|
<el-col :span="5" :offset="1">
|
2021-11-10 10:41:40 -08:00
|
|
|
<n8n-select v-model="filter.status" :placeholder="$baseText('executionsList.selectStatus')" size="medium" filterable @change="handleFilterChanged">
|
2021-08-29 04:36:17 -07:00
|
|
|
<n8n-option
|
2019-12-12 15:39:56 -08:00
|
|
|
v-for="item in statuses"
|
|
|
|
:key="item.id"
|
|
|
|
:label="item.name"
|
|
|
|
:value="item.id">
|
2021-08-29 04:36:17 -07:00
|
|
|
</n8n-option>
|
|
|
|
</n8n-select>
|
2021-02-09 14:32:40 -08:00
|
|
|
</el-col>
|
2021-08-29 04:36:17 -07:00
|
|
|
<el-col :span="4" :offset="5" class="autorefresh">
|
2021-11-10 10:41:40 -08:00
|
|
|
<el-checkbox v-model="autoRefresh" @change="handleAutoRefreshToggle">{{ $baseText('executionsList.autoRefresh') }}</el-checkbox>
|
2019-06-23 03:35:23 -07:00
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="selection-options">
|
|
|
|
<span v-if="checkAll === true || isIndeterminate === true">
|
2021-11-10 10:41:40 -08:00
|
|
|
{{ $baseText('executionsList.selected') }}: {{numSelected}} / <span v-if="finishedExecutionsCountEstimated === true">~</span>{{finishedExecutionsCount}}
|
|
|
|
<n8n-icon-button :title="$baseText('executionsList.deleteSelected')" icon="trash" size="mini" @click="handleDeleteSelected" />
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
2019-07-24 05:25:30 -07:00
|
|
|
<el-table :data="combinedExecutions" stripe v-loading="isDataLoading" :row-class-name="getRowClass">
|
2019-06-23 03:35:23 -07:00
|
|
|
<el-table-column label="" width="30">
|
|
|
|
<!-- eslint-disable-next-line vue/no-unused-vars -->
|
|
|
|
<template slot="header" slot-scope="scope">
|
2021-09-10 08:05:05 -07:00
|
|
|
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange" label=" "></el-checkbox>
|
2019-06-23 03:35:23 -07:00
|
|
|
</template>
|
|
|
|
<template slot-scope="scope">
|
2021-09-10 08:05:05 -07:00
|
|
|
<el-checkbox v-if="scope.row.stoppedAt !== undefined && scope.row.id" :value="selectedItems[scope.row.id.toString()] || checkAll" @change="handleCheckboxChanged(scope.row.id)" label=" "></el-checkbox>
|
2019-06-23 03:35:23 -07:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2021-11-10 10:41:40 -08:00
|
|
|
<el-table-column property="startedAt" :label="$baseText('executionsList.startedAtId')" width="205">
|
2019-06-23 03:35:23 -07:00
|
|
|
<template slot-scope="scope">
|
|
|
|
{{convertToDisplayDate(scope.row.startedAt)}}<br />
|
2019-07-24 05:25:30 -07:00
|
|
|
<small v-if="scope.row.id">ID: {{scope.row.id}}</small>
|
2019-06-23 03:35:23 -07:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2021-11-10 10:41:40 -08:00
|
|
|
<el-table-column property="workflowName" :label="$baseText('executionsList.name')">
|
2019-06-23 03:35:23 -07:00
|
|
|
<template slot-scope="scope">
|
|
|
|
<span class="workflow-name">
|
2021-11-10 10:41:40 -08:00
|
|
|
{{ scope.row.workflowName || $baseText('executionsList.unsavedWorkflow') }}
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
|
|
|
|
|
|
|
<span v-if="scope.row.stoppedAt === undefined">
|
2021-11-10 10:41:40 -08:00
|
|
|
({{ $baseText('executionsList.running') }})
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
|
|
|
<span v-if="scope.row.retryOf !== undefined">
|
2021-11-10 10:41:40 -08:00
|
|
|
<br /><small>{{ $baseText('executionsList.retryOf') }} "{{scope.row.retryOf}}"</small>
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
|
|
|
<span v-else-if="scope.row.retrySuccessId !== undefined">
|
2021-11-10 10:41:40 -08:00
|
|
|
<br /><small>{{ $baseText('executionsList.successRetry') }} "{{scope.row.retrySuccessId}}"</small>
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2021-11-10 10:41:40 -08:00
|
|
|
<el-table-column :label="$baseText('executionsList.status')" width="122" align="center">
|
2019-10-06 02:09:01 -07:00
|
|
|
<template slot-scope="scope" align="center">
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-08-29 04:36:17 -07:00
|
|
|
<n8n-tooltip placement="top" >
|
2019-06-23 03:35:23 -07:00
|
|
|
<div slot="content" v-html="statusTooltipText(scope.row)"></div>
|
2021-11-10 10:41:40 -08:00
|
|
|
<span class="status-badge running" v-if="scope.row.stoppedAt === undefined">
|
|
|
|
{{ $baseText('executionsList.running') }}
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
|
|
|
<span class="status-badge success" v-else-if="scope.row.finished">
|
2021-11-10 10:41:40 -08:00
|
|
|
{{ $baseText('executionsList.success') }}
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
2021-03-02 23:31:55 -08:00
|
|
|
<span class="status-badge error" v-else-if="scope.row.stoppedAt !== null">
|
2021-11-10 10:41:40 -08:00
|
|
|
{{ $baseText('executionsList.error') }}
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
2021-03-02 23:31:55 -08:00
|
|
|
<span class="status-badge warning" v-else>
|
2021-11-10 10:41:40 -08:00
|
|
|
{{ $baseText('executionsList.unknown') }}
|
2021-03-02 23:31:55 -08:00
|
|
|
</span>
|
2021-08-29 04:36:17 -07:00
|
|
|
</n8n-tooltip>
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2019-12-12 16:12:38 -08:00
|
|
|
<el-dropdown trigger="click" @command="handleRetryClick">
|
2021-08-29 04:36:17 -07:00
|
|
|
<span class="retry-button">
|
|
|
|
<n8n-icon-button
|
|
|
|
v-if="scope.row.stoppedAt !== undefined && !scope.row.finished && scope.row.retryOf === undefined && scope.row.retrySuccessId === undefined && !scope.row.waitTill"
|
|
|
|
type="light"
|
|
|
|
:theme="scope.row.stoppedAt === null ? 'warning': 'danger'"
|
2021-10-27 12:55:37 -07:00
|
|
|
size="mini"
|
2021-11-10 10:41:40 -08:00
|
|
|
:title="$baseText('executionsList.retryExecution')"
|
2021-08-29 04:36:17 -07:00
|
|
|
icon="redo"
|
|
|
|
/>
|
2019-12-12 16:12:38 -08:00
|
|
|
</span>
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
2021-11-10 10:41:40 -08:00
|
|
|
<el-dropdown-item :command="{command: 'currentlySaved', row: scope.row}">
|
|
|
|
{{ $baseText('executionsList.retryWithCurrentlySavedWorkflow') }}
|
|
|
|
</el-dropdown-item>
|
|
|
|
<el-dropdown-item :command="{command: 'original', row: scope.row}">
|
|
|
|
{{ $baseText('executionsList.retryWithOriginalworkflow') }}
|
|
|
|
</el-dropdown-item>
|
2019-12-12 16:12:38 -08:00
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown>
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2021-11-18 02:32:13 -08:00
|
|
|
<el-table-column property="mode" :label="$baseText('executionsList.mode')" width="100" align="center">
|
|
|
|
<!-- TODO i18n <template slot-scope="scope">
|
|
|
|
{{convertToDisplayDate(scope.row.startedAt)}}<br />
|
|
|
|
<small v-if="scope.row.id">ID: {{scope.row.id}}</small>
|
|
|
|
</template> -->
|
|
|
|
</el-table-column>
|
2021-11-10 10:41:40 -08:00
|
|
|
<el-table-column :label="$baseText('executionsList.runningTime')" width="150" align="center">
|
2019-06-23 03:35:23 -07:00
|
|
|
<template slot-scope="scope">
|
|
|
|
<span v-if="scope.row.stoppedAt === undefined">
|
|
|
|
<font-awesome-icon icon="spinner" spin />
|
2019-07-24 05:25:30 -07:00
|
|
|
<execution-time :start-time="scope.row.startedAt"/>
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
2021-02-08 23:59:32 -08:00
|
|
|
<!-- stoppedAt will be null if process crashed -->
|
|
|
|
<span v-else-if="scope.row.stoppedAt === null">
|
|
|
|
--
|
|
|
|
</span>
|
2019-06-23 03:35:23 -07:00
|
|
|
<span v-else>
|
2019-07-24 05:25:30 -07:00
|
|
|
{{ displayTimer(new Date(scope.row.stoppedAt).getTime() - new Date(scope.row.startedAt).getTime(), true) }}
|
2019-06-23 03:35:23 -07:00
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="" width="100" align="center">
|
|
|
|
<template slot-scope="scope">
|
2021-08-29 04:36:17 -07:00
|
|
|
<div class="actions-container">
|
|
|
|
<span v-if="scope.row.stoppedAt === undefined || scope.row.waitTill">
|
2021-11-10 10:41:40 -08:00
|
|
|
<n8n-icon-button icon="stop" size="small" :title="$baseText('executionsList.stopExecution')" @click.stop="stopExecution(scope.row.id)" :loading="stoppingExecutions.includes(scope.row.id)" />
|
2021-08-29 04:36:17 -07:00
|
|
|
</span>
|
|
|
|
<span v-if="scope.row.stoppedAt !== undefined && scope.row.id" >
|
2021-11-10 10:41:40 -08:00
|
|
|
<n8n-icon-button icon="folder-open" size="small" :title="$baseText('executionsList.openPastExecution')" @click.stop="displayExecution(scope.row)" />
|
2021-08-29 04:36:17 -07:00
|
|
|
</span>
|
|
|
|
</div>
|
2019-06-23 03:35:23 -07:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
|
2021-07-06 14:25:25 -07:00
|
|
|
<div class="load-more" v-if="finishedExecutionsCount > finishedExecutions.length || finishedExecutionsCountEstimated === true">
|
2021-11-10 10:41:40 -08:00
|
|
|
<n8n-button icon="sync" :title="$baseText('executionsList.loadMore')" :label="$baseText('executionsList.loadMore')" @click="loadMore()" :loading="isDataLoading" />
|
2019-06-23 03:35:23 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
2019-07-24 05:25:30 -07:00
|
|
|
import ExecutionTime from '@/components/ExecutionTime.vue';
|
2019-06-23 03:35:23 -07:00
|
|
|
import WorkflowActivator from '@/components/WorkflowActivator.vue';
|
|
|
|
|
2021-05-05 17:46:33 -07:00
|
|
|
import { externalHooks } from '@/components/mixins/externalHooks';
|
2021-08-21 05:11:32 -07:00
|
|
|
import { WAIT_TIME_UNLIMITED } from '@/constants';
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
import { restApi } from '@/components/mixins/restApi';
|
|
|
|
import { genericHelpers } from '@/components/mixins/genericHelpers';
|
|
|
|
import { showMessage } from '@/components/mixins/showMessage';
|
|
|
|
import {
|
|
|
|
IExecutionsCurrentSummaryExtended,
|
|
|
|
IExecutionDeleteFilter,
|
|
|
|
IExecutionsListResponse,
|
|
|
|
IExecutionShortResponse,
|
|
|
|
IExecutionsSummary,
|
|
|
|
IWorkflowShortResponse,
|
|
|
|
} from '@/Interface';
|
|
|
|
|
2021-09-11 01:15:36 -07:00
|
|
|
import {
|
|
|
|
convertToDisplayDate,
|
|
|
|
} from './helpers';
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
import {
|
|
|
|
IDataObject,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
2021-03-10 06:51:18 -08:00
|
|
|
import {
|
|
|
|
range as _range,
|
|
|
|
} from 'lodash';
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
import mixins from 'vue-typed-mixins';
|
|
|
|
|
|
|
|
export default mixins(
|
2021-05-05 17:46:33 -07:00
|
|
|
externalHooks,
|
2019-06-23 03:35:23 -07:00
|
|
|
genericHelpers,
|
|
|
|
restApi,
|
|
|
|
showMessage,
|
|
|
|
).extend({
|
|
|
|
name: 'ExecutionsList',
|
|
|
|
props: [
|
|
|
|
'dialogVisible',
|
|
|
|
],
|
|
|
|
components: {
|
2019-07-24 05:25:30 -07:00
|
|
|
ExecutionTime,
|
2019-06-23 03:35:23 -07:00
|
|
|
WorkflowActivator,
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
finishedExecutions: [] as IExecutionsSummary[],
|
|
|
|
finishedExecutionsCount: 0,
|
2021-07-06 14:25:25 -07:00
|
|
|
finishedExecutionsCountEstimated: false,
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
checkAll: false,
|
2021-02-09 14:32:40 -08:00
|
|
|
autoRefresh: true,
|
|
|
|
autoRefreshInterval: undefined as undefined | NodeJS.Timer,
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
filter: {
|
2019-12-12 15:39:56 -08:00
|
|
|
status: 'ALL',
|
2019-06-23 03:35:23 -07:00
|
|
|
workflowId: 'ALL',
|
|
|
|
},
|
|
|
|
|
|
|
|
isDataLoading: false,
|
|
|
|
|
|
|
|
requestItemsPerRequest: 10,
|
|
|
|
|
|
|
|
selectedItems: {} as { [key: string]: boolean; },
|
|
|
|
|
|
|
|
stoppingExecutions: [] as string[],
|
|
|
|
workflows: [] as IWorkflowShortResponse[],
|
2021-11-10 10:41:40 -08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
statuses () {
|
|
|
|
return [
|
2019-12-12 15:39:56 -08:00
|
|
|
{
|
|
|
|
id: 'ALL',
|
2021-11-10 10:41:40 -08:00
|
|
|
name: this.$baseText('executionsList.anyStatus'),
|
2019-12-12 15:39:56 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'error',
|
2021-11-10 10:41:40 -08:00
|
|
|
name: this.$baseText('executionsList.error'),
|
2019-12-12 15:39:56 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'running',
|
2021-11-10 10:41:40 -08:00
|
|
|
name: this.$baseText('executionsList.running'),
|
2019-12-12 15:39:56 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'success',
|
2021-11-10 10:41:40 -08:00
|
|
|
name: this.$baseText('executionsList.success'),
|
2019-12-12 15:39:56 -08:00
|
|
|
},
|
2021-08-21 05:11:32 -07:00
|
|
|
{
|
|
|
|
id: 'waiting',
|
2021-11-10 10:41:40 -08:00
|
|
|
name: this.$baseText('executionsList.waiting'),
|
2021-08-21 05:11:32 -07:00
|
|
|
},
|
2021-11-10 10:41:40 -08:00
|
|
|
];
|
|
|
|
},
|
|
|
|
modes () {
|
|
|
|
return {
|
|
|
|
error: this.$baseText('executionsList.modes.error'),
|
|
|
|
retry: this.$baseText('executionsList.modes.retry'),
|
|
|
|
manual: this.$baseText('executionsList.modes.manual'),
|
|
|
|
trigger: this.$baseText('executionsList.modes.trigger'),
|
|
|
|
};
|
|
|
|
},
|
2019-07-24 05:25:30 -07:00
|
|
|
activeExecutions (): IExecutionsCurrentSummaryExtended[] {
|
|
|
|
return this.$store.getters.getActiveExecutions;
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
combinedExecutions (): IExecutionsSummary[] {
|
|
|
|
const returnData: IExecutionsSummary[] = [];
|
|
|
|
|
2019-12-12 15:39:56 -08:00
|
|
|
if (['ALL', 'running'].includes(this.filter.status)) {
|
|
|
|
returnData.push.apply(returnData, this.activeExecutions);
|
|
|
|
}
|
2021-08-21 05:11:32 -07:00
|
|
|
if (['ALL', 'error', 'success', 'waiting'].includes(this.filter.status)) {
|
2019-12-12 15:39:56 -08:00
|
|
|
returnData.push.apply(returnData, this.finishedExecutions);
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
return returnData;
|
|
|
|
},
|
|
|
|
combinedExecutionsCount (): number {
|
2021-07-06 14:25:25 -07:00
|
|
|
return 0 + this.activeExecutions.length + this.finishedExecutionsCount;
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
|
|
|
numSelected (): number {
|
|
|
|
if (this.checkAll === true) {
|
|
|
|
return this.finishedExecutionsCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
return Object.keys(this.selectedItems).length;
|
|
|
|
},
|
|
|
|
isIndeterminate (): boolean {
|
|
|
|
if (this.checkAll === true) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.numSelected > 0) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
2019-12-12 15:39:56 -08:00
|
|
|
workflowFilterCurrent (): IDataObject {
|
2019-06-23 03:35:23 -07:00
|
|
|
const filter: IDataObject = {};
|
|
|
|
if (this.filter.workflowId !== 'ALL') {
|
|
|
|
filter.workflowId = this.filter.workflowId;
|
|
|
|
}
|
|
|
|
return filter;
|
|
|
|
},
|
2019-12-12 15:39:56 -08:00
|
|
|
workflowFilterPast (): IDataObject {
|
|
|
|
const filter: IDataObject = {};
|
|
|
|
if (this.filter.workflowId !== 'ALL') {
|
|
|
|
filter.workflowId = this.filter.workflowId;
|
|
|
|
}
|
2021-08-21 05:11:32 -07:00
|
|
|
if (this.filter.status === 'waiting') {
|
|
|
|
filter.waitTill = true;
|
|
|
|
} else if (['error', 'success'].includes(this.filter.status)) {
|
2019-12-12 15:39:56 -08:00
|
|
|
filter.finished = this.filter.status === 'success';
|
|
|
|
}
|
|
|
|
return filter;
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
dialogVisible (newValue, oldValue) {
|
|
|
|
if (newValue) {
|
|
|
|
this.openDialog();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
closeDialog () {
|
|
|
|
// Handle the close externally as the visible parameter is an external prop
|
|
|
|
// and is so not allowed to be changed here.
|
|
|
|
this.$emit('closeDialog');
|
2021-02-09 14:32:40 -08:00
|
|
|
if (this.autoRefreshInterval) {
|
|
|
|
clearInterval(this.autoRefreshInterval);
|
|
|
|
this.autoRefreshInterval = undefined;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
return false;
|
|
|
|
},
|
2021-09-11 01:15:36 -07:00
|
|
|
convertToDisplayDate,
|
2019-06-23 03:35:23 -07:00
|
|
|
displayExecution (execution: IExecutionShortResponse) {
|
|
|
|
this.$router.push({
|
|
|
|
name: 'ExecutionById',
|
|
|
|
params: { id: execution.id },
|
|
|
|
});
|
|
|
|
this.closeDialog();
|
|
|
|
},
|
2021-02-09 14:32:40 -08:00
|
|
|
handleAutoRefreshToggle () {
|
|
|
|
if (this.autoRefreshInterval) {
|
|
|
|
// Clear any previously existing intervals (if any - there shouldn't)
|
|
|
|
clearInterval(this.autoRefreshInterval);
|
|
|
|
this.autoRefreshInterval = undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.autoRefresh) {
|
|
|
|
this.autoRefreshInterval = setInterval(this.loadAutoRefresh, 4 * 1000); // refresh data every 4 secs
|
|
|
|
}
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
handleCheckAllChange () {
|
|
|
|
if (this.checkAll === false) {
|
|
|
|
Vue.set(this, 'selectedItems', {});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleCheckboxChanged (executionId: string) {
|
|
|
|
if (this.selectedItems[executionId]) {
|
|
|
|
Vue.delete(this.selectedItems, executionId);
|
|
|
|
} else {
|
|
|
|
Vue.set(this.selectedItems, executionId, true);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
async handleDeleteSelected () {
|
2021-11-10 10:41:40 -08:00
|
|
|
const deleteExecutions = await this.confirmMessage(
|
|
|
|
this.$baseText(
|
|
|
|
'executionsList.confirmMessage.message',
|
|
|
|
{ interpolate: { numSelected: this.numSelected.toString() }},
|
|
|
|
),
|
|
|
|
this.$baseText('executionsList.confirmMessage.headline'),
|
|
|
|
'warning',
|
|
|
|
this.$baseText('executionsList.confirmMessage.confirmButtonText'),
|
|
|
|
this.$baseText('executionsList.confirmMessage.cancelButtonText'),
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
if (deleteExecutions === false) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.isDataLoading = true;
|
|
|
|
|
|
|
|
const sendData: IExecutionDeleteFilter = {};
|
|
|
|
if (this.checkAll === true) {
|
2019-07-22 11:29:06 -07:00
|
|
|
sendData.deleteBefore = this.finishedExecutions[0].startedAt as Date;
|
2019-06-23 03:35:23 -07:00
|
|
|
} else {
|
|
|
|
sendData.ids = Object.keys(this.selectedItems);
|
|
|
|
}
|
|
|
|
|
2019-12-12 15:39:56 -08:00
|
|
|
sendData.filters = this.workflowFilterPast;
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
try {
|
|
|
|
await this.restApi().deleteExecutions(sendData);
|
|
|
|
} catch (error) {
|
|
|
|
this.isDataLoading = false;
|
2021-11-10 10:41:40 -08:00
|
|
|
this.$showError(
|
|
|
|
error,
|
|
|
|
this.$baseText('executionsList.showError.handleDeleteSelected.title'),
|
|
|
|
this.$baseText('executionsList.showError.handleDeleteSelected.message'),
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.isDataLoading = false;
|
|
|
|
|
|
|
|
this.$showMessage({
|
2021-11-10 10:41:40 -08:00
|
|
|
title: this.$baseText('executionsList.showMessage.handleDeleteSelected.title'),
|
|
|
|
message: this.$baseText('executionsList.showMessage.handleDeleteSelected.message'),
|
2019-06-23 03:35:23 -07:00
|
|
|
type: 'success',
|
|
|
|
});
|
|
|
|
|
|
|
|
Vue.set(this, 'selectedItems', {});
|
|
|
|
this.checkAll = false;
|
|
|
|
|
|
|
|
this.refreshData();
|
|
|
|
},
|
|
|
|
handleFilterChanged () {
|
|
|
|
this.refreshData();
|
|
|
|
},
|
2019-12-12 16:12:38 -08:00
|
|
|
handleRetryClick (commandData: { command: string, row: IExecutionShortResponse }) {
|
|
|
|
let loadWorkflow = false;
|
|
|
|
if (commandData.command === 'currentlySaved') {
|
|
|
|
loadWorkflow = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.retryExecution(commandData.row, loadWorkflow);
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
getRowClass (data: IDataObject): string {
|
2019-07-24 05:25:30 -07:00
|
|
|
const classes: string[] = [];
|
2019-06-23 03:35:23 -07:00
|
|
|
if ((data.row as IExecutionsSummary).stoppedAt === undefined) {
|
|
|
|
classes.push('currently-running');
|
|
|
|
}
|
|
|
|
|
|
|
|
return classes.join(' ');
|
|
|
|
},
|
2019-07-24 05:25:30 -07:00
|
|
|
getWorkflowName (workflowId: string): string | undefined {
|
2019-06-23 03:35:23 -07:00
|
|
|
const workflow = this.workflows.find((data) => data.id === workflowId);
|
|
|
|
if (workflow === undefined) {
|
2019-07-24 05:25:30 -07:00
|
|
|
return undefined;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
return workflow.name;
|
|
|
|
},
|
|
|
|
async loadActiveExecutions (): Promise<void> {
|
2019-12-12 15:39:56 -08:00
|
|
|
const activeExecutions = await this.restApi().getCurrentExecutions(this.workflowFilterCurrent);
|
2019-07-24 05:25:30 -07:00
|
|
|
for (const activeExecution of activeExecutions) {
|
|
|
|
if (activeExecution.workflowId !== undefined && activeExecution.workflowName === undefined) {
|
|
|
|
activeExecution.workflowName = this.getWorkflowName(activeExecution.workflowId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$store.commit('setActiveExecutions', activeExecutions);
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2021-02-09 14:32:40 -08:00
|
|
|
async loadAutoRefresh () : Promise<void> {
|
2021-02-17 15:09:39 -08:00
|
|
|
const filter = this.workflowFilterPast;
|
2021-03-02 23:31:55 -08:00
|
|
|
// We cannot use firstId here as some executions finish out of order. Let's say
|
|
|
|
// You have execution ids 500 to 505 running.
|
|
|
|
// Suppose 504 finishes before 500, 501, 502 and 503.
|
|
|
|
// iF you use firstId, filtering id >= 504 you won't
|
|
|
|
// ever get ids 500, 501, 502 and 503 when they finish
|
|
|
|
const pastExecutionsPromise: Promise<IExecutionsListResponse> = this.restApi().getPastExecutions(filter, 30);
|
2021-02-09 14:32:40 -08:00
|
|
|
const currentExecutionsPromise: Promise<IExecutionsCurrentSummaryExtended[]> = this.restApi().getCurrentExecutions({});
|
|
|
|
|
2021-02-17 15:09:39 -08:00
|
|
|
const results = await Promise.all([pastExecutionsPromise, currentExecutionsPromise]);
|
2021-02-09 14:32:40 -08:00
|
|
|
|
|
|
|
for (const activeExecution of results[1]) {
|
|
|
|
if (activeExecution.workflowId !== undefined && activeExecution.workflowName === undefined) {
|
|
|
|
activeExecution.workflowName = this.getWorkflowName(activeExecution.workflowId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$store.commit('setActiveExecutions', results[1]);
|
|
|
|
|
2021-05-12 08:51:54 -07:00
|
|
|
// execution IDs are typed as string, int conversion is necessary so we can order.
|
|
|
|
const alreadyPresentExecutionIds = this.finishedExecutions.map(exec => parseInt(exec.id, 10));
|
2021-03-10 06:51:18 -08:00
|
|
|
let lastId = 0;
|
|
|
|
const gaps = [] as number[];
|
2021-03-02 23:31:55 -08:00
|
|
|
for(let i = results[0].results.length - 1; i >= 0; i--) {
|
|
|
|
const currentItem = results[0].results[i];
|
2021-03-10 06:51:18 -08:00
|
|
|
const currentId = parseInt(currentItem.id, 10);
|
|
|
|
if (lastId !== 0 && isNaN(currentId) === false) {
|
|
|
|
// We are doing this iteration to detect possible gaps.
|
|
|
|
// The gaps are used to remove executions that finished
|
|
|
|
// and were deleted from database but were displaying
|
|
|
|
// in this list while running.
|
|
|
|
if (currentId - lastId > 1) {
|
|
|
|
// We have some gaps.
|
|
|
|
const range = _range(lastId + 1, currentId);
|
|
|
|
gaps.push(...range);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
lastId = parseInt(currentItem.id, 10) || 0;
|
|
|
|
|
2021-03-02 23:31:55 -08:00
|
|
|
// Check new results from end to start
|
|
|
|
// Add new items accordingly.
|
2021-05-12 08:51:54 -07:00
|
|
|
const executionIndex = alreadyPresentExecutionIds.indexOf(currentId);
|
2021-03-02 23:31:55 -08:00
|
|
|
if (executionIndex !== -1) {
|
|
|
|
// Execution that we received is already present.
|
|
|
|
|
|
|
|
if (this.finishedExecutions[executionIndex].finished === false && currentItem.finished === true) {
|
|
|
|
// Concurrency stuff. This might happen if the execution finishes
|
|
|
|
// prior to saving all information to database. Somewhat rare but
|
|
|
|
// With auto refresh and several executions, it happens sometimes.
|
|
|
|
// So we replace the execution data so it displays correctly.
|
|
|
|
this.finishedExecutions[executionIndex] = currentItem;
|
|
|
|
}
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Find the correct position to place this newcomer
|
|
|
|
let j;
|
|
|
|
for (j = this.finishedExecutions.length - 1; j >= 0; j--) {
|
2021-05-12 08:51:54 -07:00
|
|
|
if (currentId < parseInt(this.finishedExecutions[j].id, 10)) {
|
2021-03-02 23:31:55 -08:00
|
|
|
this.finishedExecutions.splice(j + 1, 0, currentItem);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (j === -1) {
|
|
|
|
this.finishedExecutions.unshift(currentItem);
|
|
|
|
}
|
|
|
|
}
|
2021-03-10 06:51:18 -08:00
|
|
|
this.finishedExecutions = this.finishedExecutions.filter(execution => !gaps.includes(parseInt(execution.id, 10)) && lastId >= parseInt(execution.id, 10));
|
2021-02-09 14:32:40 -08:00
|
|
|
this.finishedExecutionsCount = results[0].count;
|
2021-07-06 14:25:25 -07:00
|
|
|
this.finishedExecutionsCountEstimated = results[0].estimated;
|
2021-02-09 14:32:40 -08:00
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
async loadFinishedExecutions (): Promise<void> {
|
2019-12-12 15:39:56 -08:00
|
|
|
if (this.filter.status === 'running') {
|
|
|
|
this.finishedExecutions = [];
|
|
|
|
this.finishedExecutionsCount = 0;
|
2021-07-06 14:25:25 -07:00
|
|
|
this.finishedExecutionsCountEstimated = false;
|
2019-12-12 15:39:56 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
const data = await this.restApi().getPastExecutions(this.workflowFilterPast, this.requestItemsPerRequest);
|
2021-11-10 10:41:40 -08:00
|
|
|
|
|
|
|
this.finishedExecutions = data.results.map((execution) => {
|
|
|
|
// @ts-ignore
|
|
|
|
return { ...execution, mode: this.modes[execution.mode] };
|
|
|
|
});
|
2019-06-23 03:35:23 -07:00
|
|
|
this.finishedExecutionsCount = data.count;
|
2021-07-06 14:25:25 -07:00
|
|
|
this.finishedExecutionsCountEstimated = data.estimated;
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
|
|
|
async loadMore () {
|
2019-12-12 15:39:56 -08:00
|
|
|
if (this.filter.status === 'running') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
this.isDataLoading = true;
|
|
|
|
|
2019-12-12 15:39:56 -08:00
|
|
|
const filter = this.workflowFilterPast;
|
2019-12-12 11:57:11 -08:00
|
|
|
let lastId: string | number | undefined;
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
if (this.finishedExecutions.length !== 0) {
|
|
|
|
const lastItem = this.finishedExecutions.slice(-1)[0];
|
2019-12-12 11:57:11 -08:00
|
|
|
lastId = lastItem.id;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
let data: IExecutionsListResponse;
|
|
|
|
try {
|
2019-12-12 11:57:11 -08:00
|
|
|
data = await this.restApi().getPastExecutions(filter, this.requestItemsPerRequest, lastId);
|
2019-06-23 03:35:23 -07:00
|
|
|
} catch (error) {
|
|
|
|
this.isDataLoading = false;
|
2021-11-10 10:41:40 -08:00
|
|
|
this.$showError(
|
|
|
|
error,
|
|
|
|
this.$baseText('executionsList.showError.loadMore.title'),
|
|
|
|
this.$baseText('executionsList.showError.loadMore.message') + ':',
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-11-10 10:41:40 -08:00
|
|
|
data.results = data.results.map((execution) => {
|
|
|
|
// @ts-ignore
|
|
|
|
return { ...execution, mode: this.modes[execution.mode] };
|
|
|
|
});
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
this.finishedExecutions.push.apply(this.finishedExecutions, data.results);
|
|
|
|
this.finishedExecutionsCount = data.count;
|
2021-07-06 14:25:25 -07:00
|
|
|
this.finishedExecutionsCountEstimated = data.estimated;
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
this.isDataLoading = false;
|
|
|
|
},
|
|
|
|
async loadWorkflows () {
|
|
|
|
try {
|
|
|
|
const workflows = await this.restApi().getWorkflows();
|
|
|
|
workflows.sort((a, b) => {
|
|
|
|
if (a.name.toLowerCase() < b.name.toLowerCase()) {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
if (a.name.toLowerCase() > b.name.toLowerCase()) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
});
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
workflows.unshift({
|
|
|
|
id: 'ALL',
|
2021-11-10 10:41:40 -08:00
|
|
|
name: this.$baseText('executionsList.allWorkflows'),
|
2019-06-23 03:35:23 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
Vue.set(this, 'workflows', workflows);
|
|
|
|
} catch (error) {
|
2021-11-10 10:41:40 -08:00
|
|
|
this.$showError(
|
|
|
|
error,
|
|
|
|
this.$baseText('executionsList.showError.loadWorkflows.title'),
|
|
|
|
this.$baseText('executionsList.showError.loadWorkflows.message') + ':',
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
},
|
2019-07-24 05:25:30 -07:00
|
|
|
async openDialog () {
|
2019-06-23 03:35:23 -07:00
|
|
|
Vue.set(this, 'selectedItems', {});
|
|
|
|
this.filter.workflowId = 'ALL';
|
|
|
|
this.checkAll = false;
|
|
|
|
|
2019-07-24 05:25:30 -07:00
|
|
|
await this.loadWorkflows();
|
|
|
|
await this.refreshData();
|
2021-02-09 14:32:40 -08:00
|
|
|
this.handleAutoRefreshToggle();
|
2021-05-05 17:46:33 -07:00
|
|
|
|
|
|
|
this.$externalHooks().run('executionsList.openDialog');
|
2021-10-18 20:57:49 -07:00
|
|
|
this.$telemetry.track('User opened Executions log', { workflow_id: this.$store.getters.workflowId });
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2019-12-12 16:12:38 -08:00
|
|
|
async retryExecution (execution: IExecutionShortResponse, loadWorkflow?: boolean) {
|
2019-06-23 03:35:23 -07:00
|
|
|
this.isDataLoading = true;
|
|
|
|
|
|
|
|
try {
|
2019-12-12 16:12:38 -08:00
|
|
|
const retrySuccessful = await this.restApi().retryExecution(execution.id, loadWorkflow);
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2019-08-08 22:37:10 -07:00
|
|
|
if (retrySuccessful === true) {
|
2019-06-23 03:35:23 -07:00
|
|
|
this.$showMessage({
|
2021-11-10 10:41:40 -08:00
|
|
|
title: this.$baseText('executionsList.showMessage.retrySuccessfulTrue.title'),
|
|
|
|
message: this.$baseText('executionsList.showMessage.retrySuccessfulTrue.message'),
|
2019-06-23 03:35:23 -07:00
|
|
|
type: 'success',
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
this.$showMessage({
|
2021-11-10 10:41:40 -08:00
|
|
|
title: this.$baseText('executionsList.showMessage.retrySuccessfulFalse.title'),
|
|
|
|
message: this.$baseText('executionsList.showMessage.retrySuccessfulFalse.message'),
|
2019-06-23 03:35:23 -07:00
|
|
|
type: 'error',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
this.isDataLoading = false;
|
|
|
|
} catch (error) {
|
2021-11-10 10:41:40 -08:00
|
|
|
this.$showError(
|
|
|
|
error,
|
|
|
|
this.$baseText('executionsList.showError.retryExecution.title'),
|
|
|
|
this.$baseText('executionsList.showError.retryExecution.message') + ':',
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
this.isDataLoading = false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
async refreshData () {
|
|
|
|
this.isDataLoading = true;
|
|
|
|
|
|
|
|
try {
|
|
|
|
const activeExecutionsPromise = this.loadActiveExecutions();
|
|
|
|
const finishedExecutionsPromise = this.loadFinishedExecutions();
|
|
|
|
await Promise.all([activeExecutionsPromise, finishedExecutionsPromise]);
|
|
|
|
} catch (error) {
|
2021-11-10 10:41:40 -08:00
|
|
|
this.$showError(
|
|
|
|
error,
|
|
|
|
this.$baseText('executionsList.showError.refreshData.title'),
|
|
|
|
this.$baseText('executionsList.showError.refreshData.message') + ':',
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
this.isDataLoading = false;
|
|
|
|
},
|
|
|
|
statusTooltipText (entry: IExecutionsSummary): string {
|
2021-08-21 05:11:32 -07:00
|
|
|
if (entry.waitTill) {
|
|
|
|
const waitDate = new Date(entry.waitTill);
|
|
|
|
if (waitDate.toISOString() === WAIT_TIME_UNLIMITED) {
|
2021-11-10 10:41:40 -08:00
|
|
|
return this.$baseText('executionsList.statusTooltipText.theWorkflowIsWaitingIndefinitely');
|
2021-08-21 05:11:32 -07:00
|
|
|
}
|
2021-11-10 10:41:40 -08:00
|
|
|
|
|
|
|
return this.$baseText(
|
|
|
|
'executionsList.statusTooltipText.theWorkflowIsWaitingTill',
|
|
|
|
{
|
|
|
|
interpolate: {
|
|
|
|
waitDateDate: waitDate.toLocaleDateString(),
|
|
|
|
waitDateTime: waitDate.toLocaleTimeString(),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
2021-08-21 05:11:32 -07:00
|
|
|
} else if (entry.stoppedAt === undefined) {
|
2021-11-10 10:41:40 -08:00
|
|
|
return this.$baseText('executionsList.statusTooltipText.theWorkflowIsCurrentlyExecuting');
|
2019-08-08 11:24:37 -07:00
|
|
|
} else if (entry.finished === true && entry.retryOf !== undefined) {
|
2021-11-10 10:41:40 -08:00
|
|
|
return this.$baseText(
|
|
|
|
'executionsList.statusTooltipText.theWorkflowExecutionWasARetryOfAndItWasSuccessful',
|
|
|
|
{ interpolate: { entryRetryOf: entry.retryOf }},
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
} else if (entry.finished === true) {
|
2021-11-10 10:41:40 -08:00
|
|
|
return this.$baseText('executionsList.statusTooltipText.theWorkflowExecutionWasSuccessful');
|
2019-06-23 03:35:23 -07:00
|
|
|
} else if (entry.retryOf !== undefined) {
|
2021-11-10 10:41:40 -08:00
|
|
|
return this.$baseText(
|
|
|
|
'executionsList.statusTooltipText.theWorkflowExecutionWasARetryOfAndFailed',
|
|
|
|
{ interpolate: { entryRetryOf: entry.retryOf }},
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
} else if (entry.retrySuccessId !== undefined) {
|
2021-11-10 10:41:40 -08:00
|
|
|
return this.$baseText(
|
|
|
|
'executionsList.statusTooltipText.theWorkflowExecutionFailedButTheRetryWasSuccessful',
|
|
|
|
{ interpolate: { entryRetrySuccessId: entry.retrySuccessId }},
|
|
|
|
);
|
2021-03-02 23:31:55 -08:00
|
|
|
} else if (entry.stoppedAt === null) {
|
2021-11-10 10:41:40 -08:00
|
|
|
return this.$baseText('executionsList.statusTooltipText.theWorkflowExecutionIsProbablyStillRunning');
|
2019-06-23 03:35:23 -07:00
|
|
|
} else {
|
2021-11-10 10:41:40 -08:00
|
|
|
return this.$baseText('executionsList.statusTooltipText.theWorkflowExecutionFailed');
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
},
|
2019-07-24 05:25:30 -07:00
|
|
|
async stopExecution (activeExecutionId: string) {
|
2019-06-23 03:35:23 -07:00
|
|
|
try {
|
|
|
|
// Add it to the list of currently stopping executions that we
|
|
|
|
// can show the user in the UI that it is in progress
|
2019-07-24 05:25:30 -07:00
|
|
|
this.stoppingExecutions.push(activeExecutionId);
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-07-23 08:50:47 -07:00
|
|
|
await this.restApi().stopCurrentExecution(activeExecutionId);
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
// Remove it from the list of currently stopping executions
|
2019-07-24 05:25:30 -07:00
|
|
|
const index = this.stoppingExecutions.indexOf(activeExecutionId);
|
2019-06-23 03:35:23 -07:00
|
|
|
this.stoppingExecutions.splice(index, 1);
|
|
|
|
|
|
|
|
this.$showMessage({
|
2021-11-10 10:41:40 -08:00
|
|
|
title: this.$baseText('executionsList.showMessage.stopExecution.title'),
|
|
|
|
message: this.$baseText(
|
|
|
|
'executionsList.showMessage.stopExecution.message',
|
|
|
|
{ interpolate: { activeExecutionId } },
|
|
|
|
),
|
2019-06-23 03:35:23 -07:00
|
|
|
type: 'success',
|
|
|
|
});
|
|
|
|
|
|
|
|
this.refreshData();
|
|
|
|
} catch (error) {
|
2021-11-10 10:41:40 -08:00
|
|
|
this.$showError(
|
|
|
|
error,
|
|
|
|
this.$baseText('executionsList.showError.stopExecution.title'),
|
|
|
|
this.$baseText('executionsList.showError.stopExecution.message'),
|
|
|
|
);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
2021-02-09 14:32:40 -08:00
|
|
|
.autorefresh {
|
|
|
|
padding-right: 0.5em;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
|
2021-08-21 05:11:32 -07:00
|
|
|
.execution-actions {
|
|
|
|
button {
|
|
|
|
margin: 0 0.25em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
.filters {
|
|
|
|
line-height: 2em;
|
|
|
|
.refresh-button {
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.load-more {
|
|
|
|
margin: 2em 0 0 0;
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.retry-button {
|
|
|
|
margin-left: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.selection-options {
|
|
|
|
height: 2em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status-badge {
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
padding: 0 10px;
|
2021-08-29 04:36:17 -07:00
|
|
|
line-height: 22.6px;
|
2019-06-23 03:35:23 -07:00
|
|
|
border-radius: 15px;
|
|
|
|
text-align: center;
|
2021-10-27 12:55:37 -07:00
|
|
|
font-size: var(--font-size-s);
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
&.error {
|
2021-08-29 04:36:17 -07:00
|
|
|
background-color: var(--color-danger-tint-1);
|
|
|
|
color: var(--color-danger);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
&.success {
|
2021-08-29 04:36:17 -07:00
|
|
|
background-color: var(--color-success-tint-1);
|
|
|
|
color: var(--color-success);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
2021-03-02 23:31:55 -08:00
|
|
|
|
2021-08-29 04:36:17 -07:00
|
|
|
&.running, &.warning {
|
|
|
|
background-color: var(--color-warning-tint-2);
|
|
|
|
color: var(--color-warning);
|
2021-03-02 23:31:55 -08:00
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
.workflow-name {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2021-08-29 04:36:17 -07:00
|
|
|
.actions-container > * {
|
|
|
|
margin-left: 5px;
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
</style>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
|
|
.currently-running {
|
|
|
|
background-color: $--color-primary-light !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-table tr:hover.currently-running td {
|
2019-10-06 02:09:01 -07:00
|
|
|
background-color: darken($--color-primary-light, 3% ) !important;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|