mirror of https://github.com/apache/druid.git
Web-console: update supervisors table (#7799)
* add new columns * fix syling * fix spaces * update snapshots * fix Spelling * fix capitalization * reorder action dialog * set color using state * fix snapshots * fix array * update snapshots * remove extra columns * update snapshots * update snapshots * fixes * update snapshots * use cell * fix spacing * update snapshot
This commit is contained in:
parent
8117222da3
commit
0763585208
0
web-console/src/dialogs/supervisor-table-action-dialog/__snapshots__/supervisor-table-action-dialog.spec.tsx.snap
Normal file → Executable file
0
web-console/src/dialogs/supervisor-table-action-dialog/__snapshots__/supervisor-table-action-dialog.spec.tsx.snap
Normal file → Executable file
|
@ -92,7 +92,7 @@ export function booleanCustomTableFilter(filter: Filter, value: any): boolean {
|
|||
return true;
|
||||
}
|
||||
if (value === null) return false;
|
||||
const haystack = String(value.toLowerCase());
|
||||
const haystack = String(value).toLowerCase();
|
||||
const needleAndMode: NeedleAndMode = getNeedleAndMode(filter.value.toLowerCase());
|
||||
const needle = needleAndMode.needle;
|
||||
if (needleAndMode.mode === 'exact') {
|
||||
|
|
0
web-console/src/views/datasource-view/__snapshots__/datasource-view.spec.tsx.snap
Normal file → Executable file
0
web-console/src/views/datasource-view/__snapshots__/datasource-view.spec.tsx.snap
Normal file → Executable file
0
web-console/src/views/lookups-view/__snapshots__/lookups-view.spec.tsx.snap
Normal file → Executable file
0
web-console/src/views/lookups-view/__snapshots__/lookups-view.spec.tsx.snap
Normal file → Executable file
0
web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap
Normal file → Executable file
0
web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap
Normal file → Executable file
0
web-console/src/views/servers-view/__snapshots__/servers-view.spec.tsx.snap
Normal file → Executable file
0
web-console/src/views/servers-view/__snapshots__/servers-view.spec.tsx.snap
Normal file → Executable file
|
@ -126,6 +126,7 @@ exports[`tasks view matches snapshot 1`] = `
|
|||
"accessor": [Function],
|
||||
"id": "status",
|
||||
"show": true,
|
||||
"width": 300,
|
||||
},
|
||||
Object {
|
||||
"Cell": [Function],
|
||||
|
|
|
@ -109,6 +109,18 @@ function statusToColor(status: string): string {
|
|||
}
|
||||
}
|
||||
|
||||
function stateToColor(status: string): string {
|
||||
switch (status) {
|
||||
case 'UNHEALTHY_SUPERVISOR': return '#d5100a';
|
||||
case 'UNHEALTHY_TASKS': return '#d5100a';
|
||||
case 'PENDING': return '#ffbf00';
|
||||
case `SUSPENDED`: return '#ffbf00';
|
||||
case 'STOPPING': return '#d5100a';
|
||||
case 'RUNNING': return '#2167d5';
|
||||
default: return '#0a1500';
|
||||
}
|
||||
}
|
||||
|
||||
export class TasksView extends React.PureComponent<TasksViewProps, TasksViewState> {
|
||||
private supervisorQueryManager: QueryManager<string, SupervisorQueryResultRow[]>;
|
||||
private taskQueryManager: QueryManager<string, TaskQueryResultRow[]>;
|
||||
|
@ -464,12 +476,13 @@ ORDER BY "rank" DESC, "created_time" DESC`);
|
|||
{
|
||||
Header: 'Status',
|
||||
id: 'status',
|
||||
accessor: (row) => row.spec.suspended ? 'Suspended' : 'Running',
|
||||
Cell: row => {
|
||||
const value = row.value;
|
||||
width: 300,
|
||||
accessor: (row) => { return row.detailedState; },
|
||||
Cell: (row) => {
|
||||
const value = row.original.detailedState;
|
||||
return <span>
|
||||
<span
|
||||
style={{ color: value === 'Suspended' ? '#d58512' : '#2167d5' }}
|
||||
style={{ color: stateToColor(row.original.state)}}
|
||||
>
|
||||
●
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue