mirror of https://github.com/apache/druid.git
Web-console: add hostname to tasks view (#7758)
* add host name * change to location * remove space
This commit is contained in:
parent
2b7bb064b5
commit
7eac685e47
|
@ -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;
|
||||
|
|
|
@ -362,6 +362,7 @@ exports[`describe tasks view tasks view snapshot 1`] = `
|
|||
"Task ID",
|
||||
"Type",
|
||||
"Datasource",
|
||||
"Location",
|
||||
"Created time",
|
||||
"Status",
|
||||
"Duration",
|
||||
|
@ -446,6 +447,13 @@ exports[`describe tasks view tasks view snapshot 1`] = `
|
|||
"accessor": "datasource",
|
||||
"show": true,
|
||||
},
|
||||
Object {
|
||||
"Aggregated": [Function],
|
||||
"Header": "Location",
|
||||
"accessor": "location",
|
||||
"filterMethod": [Function],
|
||||
"show": true,
|
||||
},
|
||||
Object {
|
||||
"Aggregated": [Function],
|
||||
"Header": "Created time",
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue