Web: include status by name in job & task tables

Having only the status dot was hard to read. It requires you to learn &
remember the different colours, or to mouse-over and wait to see the
tooltip. For accessibility, we shouldn't be using just the colour to
convey information in the interface.
This commit is contained in:
Sybren A. Stüvel 2022-06-09 11:01:03 +02:00
parent b186ea1828
commit 7c43b9e1bc
2 changed files with 10 additions and 2 deletions

View File

@ -48,7 +48,11 @@ export default {
// { title: "ID", field: "id", headerSort: false, formatter: (cell) => cell.getData().id.substr(0, 8), }, // { title: "ID", field: "id", headerSort: false, formatter: (cell) => cell.getData().id.substr(0, 8), },
{ {
title: 'Status', field: 'status', sorter: 'string', title: 'Status', field: 'status', sorter: 'string',
formatter: (cell) => indicator(cell.getData().status), formatter: (cell) => {
const status = cell.getData().status;
const dot = indicator(status);
return `${dot} ${status}`;
},
}, },
{ title: 'Name', field: 'name', sorter: 'string' }, { title: 'Name', field: 'name', sorter: 'string' },
{ title: 'Type', field: 'type', sorter: 'string' }, { title: 'Type', field: 'type', sorter: 'string' },

View File

@ -52,7 +52,11 @@ export default {
// { title: "ID", field: "id", headerSort: false, formatter: (cell) => cell.getData().id.substr(0, 8), }, // { title: "ID", field: "id", headerSort: false, formatter: (cell) => cell.getData().id.substr(0, 8), },
{ {
title: 'Status', field: 'status', sorter: 'string', title: 'Status', field: 'status', sorter: 'string',
formatter: (cell) => indicator(cell.getData().status), formatter: (cell) => {
const status = cell.getData().status;
const dot = indicator(status);
return `${dot} ${status}`;
},
}, },
{ title: 'Name', field: 'name', sorter: 'string' }, { title: 'Name', field: 'name', sorter: 'string' },
{ {