Web: update for extraction of status change requests to struct
See recent OpenAPI change.
This commit is contained in:
parent
9ed6b6d931
commit
bc33f55b3c
@ -114,14 +114,14 @@ export default {
|
||||
|
||||
let promise;
|
||||
if (existingRow) {
|
||||
// Tabbulator doesn't update ommitted fields, but if `status_requested`
|
||||
// Tabbulator doesn't update ommitted fields, but if `status_change`
|
||||
// is ommitted it means "no status change requested"; this should still
|
||||
// force an update.
|
||||
if (!workerUpdate.status_requested) {
|
||||
workerUpdate.status_requested = undefined;
|
||||
// force an update of the `status_change` field.
|
||||
if (!workerUpdate.status_change) {
|
||||
workerUpdate.status_change = null;
|
||||
}
|
||||
promise = this.tabulator.updateData([workerUpdate]);
|
||||
// Tabulator doesn't know we're using 'status_requested' in the 'status'
|
||||
// Tabulator doesn't know we're using 'status_change' in the 'status'
|
||||
// column, so it also won't know to redraw when that field changes.
|
||||
promise.then(() => existingRow.reinitialize(true));
|
||||
} else {
|
||||
|
@ -25,16 +25,16 @@ export function indicator(status, classNamePrefix) {
|
||||
* @returns the HTML for the worker status.
|
||||
*/
|
||||
export function workerStatus(worker) {
|
||||
if (!worker.status_requested) {
|
||||
if (!worker.status_change) {
|
||||
return `${worker.status}`;
|
||||
}
|
||||
|
||||
let arrow;
|
||||
if (worker.lazy_status_request) {
|
||||
if (worker.status_change.is_lazy) {
|
||||
arrow = `<span class='state-transition-arrow lazy' title='lazy status transition'>➠</span>`
|
||||
} else {
|
||||
arrow = `<span class='state-transition-arrow forced' title='forced status transition'>➜</span>`
|
||||
}
|
||||
|
||||
return `${worker.status} ${arrow} ${worker.status_requested}`;
|
||||
return `${worker.status} ${arrow} ${worker.status_change.status}`;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user