You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by cw...@apache.org on 2019/05/25 06:18:24 UTC
[incubator-druid] branch master updated: Web-console: add hostname
to tasks view (#7758)
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 7eac685 Web-console: add hostname to tasks view (#7758)
7eac685 is described below
commit 7eac685e47e2eadbaf2ad0fe83ed42e399e4796f
Author: mcbrewster <37...@users.noreply.github.com>
AuthorDate: Fri May 24 23:18:18 2019 -0700
Web-console: add hostname to tasks view (#7758)
* add host name
* change to location
* remove space
---
web-console/src/utils/general.tsx | 3 ++-
.../views/task-view/__snapshots__/tasks-view.spec.tsx.snap | 8 ++++++++
web-console/src/views/task-view/tasks-view.tsx | 14 ++++++++++++--
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/web-console/src/utils/general.tsx b/web-console/src/utils/general.tsx
index 52aff78..87d5e24 100644
--- a/web-console/src/utils/general.tsx
+++ b/web-console/src/utils/general.tsx
@@ -88,9 +88,10 @@ function getNeedleAndMode(input: string): NeedleAndMode {
}
export function booleanCustomTableFilter(filter: Filter, value: any): boolean {
- if (value === undefined) {
+ if (value === undefined ) {
return true;
}
+ if (value === null) return false;
const haystack = String(value.toLowerCase());
const needleAndMode: NeedleAndMode = getNeedleAndMode(filter.value.toLowerCase());
const needle = needleAndMode.needle;
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 5ef95b5..16b7b90 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
@@ -362,6 +362,7 @@ exports[`describe tasks view tasks view snapshot 1`] = `
"Task ID",
"Type",
"Datasource",
+ "Location",
"Created time",
"Status",
"Duration",
@@ -448,6 +449,13 @@ exports[`describe tasks view tasks view snapshot 1`] = `
},
Object {
"Aggregated": [Function],
+ "Header": "Location",
+ "accessor": "location",
+ "filterMethod": [Function],
+ "show": true,
+ },
+ Object {
+ "Aggregated": [Function],
"Header": "Created time",
"accessor": "created_time",
"show": true,
diff --git a/web-console/src/views/task-view/tasks-view.tsx b/web-console/src/views/task-view/tasks-view.tsx
index da4f3ae..442317f 100644
--- a/web-console/src/views/task-view/tasks-view.tsx
+++ b/web-console/src/views/task-view/tasks-view.tsx
@@ -41,7 +41,7 @@ import { BasicAction, basicActionsToMenu } from '../../utils/basic-action';
import './tasks-view.scss';
const supervisorTableColumns: string[] = ['Datasource', 'Type', 'Topic/Stream', 'Status', 'Actions'];
-const taskTableColumns: string[] = ['Task ID', 'Type', 'Datasource', 'Created time', 'Status', 'Duration', 'Actions'];
+const taskTableColumns: string[] = ['Task ID', 'Type', 'Datasource', 'Location', 'Created time', 'Status', 'Duration', 'Actions'];
export interface TasksViewProps extends React.Props<any> {
taskId: string | null;
@@ -231,7 +231,7 @@ export class TasksView extends React.Component<TasksViewProps, TasksViewState> {
CASE WHEN "status" = 'RUNNING' THEN
(CASE WHEN "runner_status" = 'RUNNING' THEN 4 WHEN "runner_status" = 'PENDING' THEN 3 ELSE 2 END)
ELSE 1 END AS "rank",
- "location", "duration", "error_msg"
+ "location", "duration", "error_msg"
FROM sys.tasks
ORDER BY "rank" DESC, "created_time" DESC`);
@@ -608,6 +608,16 @@ ORDER BY "rank" DESC, "created_time" DESC`);
},
show: taskTableColumnSelectionHandler.showColumn('Datasource')
},
+
+ {
+ Header: 'Location',
+ accessor: 'location',
+ Aggregated: row => '',
+ filterMethod: (filter: Filter, row: any) => {
+ return booleanCustomTableFilter(filter, row.location);
+ },
+ show: taskTableColumnSelectionHandler.showColumn('Location')
+ },
{
Header: 'Created time',
accessor: 'created_time',
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org