Web: show requested worker state transition

This commit is contained in:
Sybren A. Stüvel 2022-05-31 15:50:59 +02:00
parent e18dab5c82
commit 1510489f4d
2 changed files with 7 additions and 4 deletions

View File

@ -12,7 +12,7 @@
<dt class="field-status">Status</dt> <dt class="field-status">Status</dt>
<dd>{{ workerData.status }} <dd>{{ workerData.status }}
<template v-if="workerData.status_requested"> <template v-if="workerData.status_requested">
<span class='state-transition-arrow'></span> {{ workerData.status_requested }} {{ workerData.status_requested }}
</template> </template>
</dd> </dd>

View File

@ -44,9 +44,12 @@ export default {
{ {
title: 'Status', field: 'status', sorter: 'string', title: 'Status', field: 'status', sorter: 'string',
formatter: (cell) => { formatter: (cell) => {
const status = cell.getData().status; const data = cell.getData();
const dot = indicator(status, 'worker-'); const dot = indicator(data.status, 'worker-');
return `${dot} ${status}`; if (data.status_requested) {
return `${dot} ${data.status} <span class='state-transition-arrow'>➜</span> ${data.status_requested}`;
}
return `${dot} ${data.status}`;
}, },
}, },
{ title: 'Name', field: 'nickname', sorter: 'string' }, { title: 'Name', field: 'nickname', sorter: 'string' },