This is an automated email from the ASF dual-hosted git repository.
abhishek pushed a commit to branch 0.23.0
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/0.23.0 by this push:
new d19fd67f7a Web console: fix go to segments not working (#12541)
(#12554)
d19fd67f7a is described below
commit d19fd67f7af42855b29cf238eabb6a134b1dbc18
Author: Vadim Ogievetsky <[email protected]>
AuthorDate: Fri May 20 21:27:09 2022 -0700
Web console: fix go to segments not working (#12541) (#12554)
* use correct filter syntax
* fix tests
---
web-console/src/views/datasources-view/datasources-view.tsx | 2 +-
.../ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap | 6 +++---
web-console/src/views/ingestion-view/ingestion-view.tsx | 7 ++++---
.../views/segments-view/__snapshots__/segments-view.spec.tsx.snap | 2 +-
web-console/src/views/segments-view/segments-view.tsx | 2 +-
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/web-console/src/views/datasources-view/datasources-view.tsx
b/web-console/src/views/datasources-view/datasources-view.tsx
index 6e28bb62db..e91b0934cc 100644
--- a/web-console/src/views/datasources-view/datasources-view.tsx
+++ b/web-console/src/views/datasources-view/datasources-view.tsx
@@ -349,7 +349,7 @@ ORDER BY 1`;
const datasourceFilter: Filter[] = [];
if (props.initDatasource) {
- datasourceFilter.push({ id: 'datasource', value:
`"${props.initDatasource}"` });
+ datasourceFilter.push({ id: 'datasource', value:
`=${props.initDatasource}` });
}
this.state = {
diff --git
a/web-console/src/views/ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap
b/web-console/src/views/ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap
index 41bf8fb33c..2f14d5912f 100644
---
a/web-console/src/views/ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap
+++
b/web-console/src/views/ingestion-view/__snapshots__/ingestion-view.spec.tsx.snap
@@ -217,7 +217,7 @@ exports[`IngestionView matches snapshot 1`] = `
Array [
Object {
"id": "datasource",
- "value": "datasource",
+ "value": "=datasource",
},
]
}
@@ -536,11 +536,11 @@ exports[`IngestionView matches snapshot 1`] = `
Array [
Object {
"id": "group_id",
- "value": "test",
+ "value": "=test",
},
Object {
"id": "datasource",
- "value": "datasource",
+ "value": "=datasource",
},
]
}
diff --git a/web-console/src/views/ingestion-view/ingestion-view.tsx
b/web-console/src/views/ingestion-view/ingestion-view.tsx
index 7438501175..5d01991173 100644
--- a/web-console/src/views/ingestion-view/ingestion-view.tsx
+++ b/web-console/src/views/ingestion-view/ingestion-view.tsx
@@ -219,11 +219,12 @@ ORDER BY "rank" DESC, "created_time" DESC`;
super(props, context);
const taskFilter: Filter[] = [];
- if (props.taskGroupId) taskFilter.push({ id: 'group_id', value:
props.taskGroupId });
- if (props.datasourceId) taskFilter.push({ id: 'datasource', value:
props.datasourceId });
+ if (props.taskGroupId) taskFilter.push({ id: 'group_id', value:
`=${props.taskGroupId}` });
+ if (props.datasourceId) taskFilter.push({ id: 'datasource', value:
`=${props.datasourceId}` });
const supervisorFilter: Filter[] = [];
- if (props.datasourceId) supervisorFilter.push({ id: 'datasource', value:
props.datasourceId });
+ if (props.datasourceId)
+ supervisorFilter.push({ id: 'datasource', value:
`=${props.datasourceId}` });
this.state = {
supervisorsState: QueryState.INIT,
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
index ad14545735..6ac125bfdf 100755
---
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
@@ -352,7 +352,7 @@ exports[`SegmentsView matches snapshot 1`] = `
Array [
Object {
"id": "datasource",
- "value": "\\"test\\"",
+ "value": "=test",
},
]
}
diff --git a/web-console/src/views/segments-view/segments-view.tsx
b/web-console/src/views/segments-view/segments-view.tsx
index 75bee7aedc..648c1bef4a 100644
--- a/web-console/src/views/segments-view/segments-view.tsx
+++ b/web-console/src/views/segments-view/segments-view.tsx
@@ -252,7 +252,7 @@ END AS "time_span"`,
super(props, context);
const segmentFilter: Filter[] = [];
- if (props.datasource) segmentFilter.push({ id: 'datasource', value:
`"${props.datasource}"` });
+ if (props.datasource) segmentFilter.push({ id: 'datasource', value:
`=${props.datasource}` });
if (props.onlyUnavailable) segmentFilter.push({ id: 'is_available', value:
'false' });
this.state = {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]