This is an automated email from the ASF dual-hosted git repository.
cwylie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push:
new 0763585 Web-console: update supervisors table (#7799)
0763585 is described below
commit 0763585208a68a673bf9515c44fbbb65c8b51371
Author: mcbrewster <[email protected]>
AuthorDate: Tue Jun 11 13:06:35 2019 -0700
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
---
.../supervisor-table-action-dialog.spec.tsx.snap | 0
web-console/src/utils/general.tsx | 2 +-
.../__snapshots__/datasource-view.spec.tsx.snap | 0
.../__snapshots__/lookups-view.spec.tsx.snap | 0
.../__snapshots__/segments-view.spec.tsx.snap | 0
.../__snapshots__/servers-view.spec.tsx.snap | 0
.../sql-view/__snapshots__/sql-view.spec.tsx.snap | 0
.../__snapshots__/tasks-view.spec.tsx.snap | 1 +
web-console/src/views/task-view/tasks-view.tsx | 21 +++++++++++++++++----
9 files changed, 19 insertions(+), 5 deletions(-)
diff --git
a/web-console/src/dialogs/supervisor-table-action-dialog/__snapshots__/supervisor-table-action-dialog.spec.tsx.snap
b/web-console/src/dialogs/supervisor-table-action-dialog/__snapshots__/supervisor-table-action-dialog.spec.tsx.snap
old mode 100644
new mode 100755
diff --git a/web-console/src/utils/general.tsx
b/web-console/src/utils/general.tsx
index 438fc9d..9037832 100644
--- a/web-console/src/utils/general.tsx
+++ b/web-console/src/utils/general.tsx
@@ -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') {
diff --git
a/web-console/src/views/datasource-view/__snapshots__/datasource-view.spec.tsx.snap
b/web-console/src/views/datasource-view/__snapshots__/datasource-view.spec.tsx.snap
old mode 100644
new mode 100755
diff --git
a/web-console/src/views/lookups-view/__snapshots__/lookups-view.spec.tsx.snap
b/web-console/src/views/lookups-view/__snapshots__/lookups-view.spec.tsx.snap
old mode 100644
new mode 100755
diff --git
a/web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap
b/web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap
old mode 100644
new mode 100755
diff --git
a/web-console/src/views/servers-view/__snapshots__/servers-view.spec.tsx.snap
b/web-console/src/views/servers-view/__snapshots__/servers-view.spec.tsx.snap
old mode 100644
new mode 100755
diff --git
a/web-console/src/views/sql-view/__snapshots__/sql-view.spec.tsx.snap
b/web-console/src/views/sql-view/__snapshots__/sql-view.spec.tsx.snap
old mode 100644
new mode 100755
diff --git
a/web-console/src/views/task-view/__snapshots__/tasks-view.spec.tsx.snap
b/web-console/src/views/task-view/__snapshots__/tasks-view.spec.tsx.snap
index a14c656..a01963f 100644
--- a/web-console/src/views/task-view/__snapshots__/tasks-view.spec.tsx.snap
+++ b/web-console/src/views/task-view/__snapshots__/tasks-view.spec.tsx.snap
@@ -126,6 +126,7 @@ exports[`tasks view matches snapshot 1`] = `
"accessor": [Function],
"id": "status",
"show": true,
+ "width": 300,
},
Object {
"Cell": [Function],
diff --git a/web-console/src/views/task-view/tasks-view.tsx
b/web-console/src/views/task-view/tasks-view.tsx
index d8fa4eb..768a686 100644
--- a/web-console/src/views/task-view/tasks-view.tsx
+++ b/web-console/src/views/task-view/tasks-view.tsx
@@ -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>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]