From de11867d212d47953f73df378be7c785dd239afc Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Wed, 18 May 2022 22:48:23 -0700 Subject: [PATCH 1/2] use correct filter syntax --- .../src/views/datasources-view/datasources-view.tsx | 2 +- web-console/src/views/ingestion-view/ingestion-view.tsx | 7 ++++--- web-console/src/views/segments-view/segments-view.tsx | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/web-console/src/views/datasources-view/datasources-view.tsx b/web-console/src/views/datasources-view/datasources-view.tsx index 6e28bb62db9f..e91b0934cc9d 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/ingestion-view.tsx b/web-console/src/views/ingestion-view/ingestion-view.tsx index 743850117588..5d01991173b5 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/segments-view.tsx b/web-console/src/views/segments-view/segments-view.tsx index 75bee7aedc58..648c1bef4a9b 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 = { From afecb554b0e72d320537fe975d116cb3ae8743ab Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Thu, 19 May 2022 09:07:24 -0700 Subject: [PATCH 2/2] fix tests --- .../__snapshots__/ingestion-view.spec.tsx.snap | 6 +++--- .../segments-view/__snapshots__/segments-view.spec.tsx.snap | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 41bf8fb33c30..2f14d5912fce 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/segments-view/__snapshots__/segments-view.spec.tsx.snap b/web-console/src/views/segments-view/__snapshots__/segments-view.spec.tsx.snap index ad14545735f5..6ac125bfdf43 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", }, ] }