You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by vo...@apache.org on 2024/11/18 23:28:54 UTC
(druid) 19/42: fixes
This is an automated email from the ASF dual-hosted git repository.
vogievetsky pushed a commit to branch segment_timeline2
in repository https://gitbox.apache.org/repos/asf/druid.git
commit f33a31aff4f7d269bf254c61f04329a94f64b2e6
Author: Vadim Ogievetsky <va...@ogievetsky.com>
AuthorDate: Fri Nov 1 14:10:45 2024 -0700
fixes
---
web-console/src/utils/query-manager/query-manager.ts | 2 +-
web-console/src/views/datasources-view/datasources-view.tsx | 4 ++--
web-console/src/views/segments-view/segments-view.tsx | 4 ++--
web-console/src/views/supervisors-view/supervisors-view.tsx | 10 +++++++++-
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/web-console/src/utils/query-manager/query-manager.ts b/web-console/src/utils/query-manager/query-manager.ts
index 5b141c7c89d..1023b23412a 100644
--- a/web-console/src/utils/query-manager/query-manager.ts
+++ b/web-console/src/utils/query-manager/query-manager.ts
@@ -288,7 +288,7 @@ export class QueryManager<Q, R, I = never, E extends Error = Error> {
return this.lastQuery;
}
- public getLastIntermediateQuery(): any {
+ public getLastIntermediateQuery(): unknown {
return this.lastIntermediateQuery;
}
diff --git a/web-console/src/views/datasources-view/datasources-view.tsx b/web-console/src/views/datasources-view/datasources-view.tsx
index f58caee1ae8..3d0e6799af6 100644
--- a/web-console/src/views/datasources-view/datasources-view.tsx
+++ b/web-console/src/views/datasources-view/datasources-view.tsx
@@ -852,9 +852,9 @@ GROUP BY 1, 2`;
<MenuItem
icon={IconNames.APPLICATION}
text="View SQL query for table"
- disabled={!lastDatasourcesQuery}
+ disabled={typeof lastDatasourcesQuery !== 'string'}
onClick={() => {
- if (!lastDatasourcesQuery) return;
+ if (typeof lastDatasourcesQuery !== 'string') return;
goToQuery({ queryString: lastDatasourcesQuery });
}}
/>
diff --git a/web-console/src/views/segments-view/segments-view.tsx b/web-console/src/views/segments-view/segments-view.tsx
index 0f7751bf76c..90cb9311391 100644
--- a/web-console/src/views/segments-view/segments-view.tsx
+++ b/web-console/src/views/segments-view/segments-view.tsx
@@ -965,9 +965,9 @@ export class SegmentsView extends React.PureComponent<SegmentsViewProps, Segment
<MenuItem
icon={IconNames.APPLICATION}
text="View SQL query for table"
- disabled={!lastSegmentsQuery}
+ disabled={typeof lastSegmentsQuery !== 'string'}
onClick={() => {
- if (!lastSegmentsQuery) return;
+ if (typeof lastSegmentsQuery !== 'string') return;
goToQuery({ queryString: lastSegmentsQuery });
}}
/>
diff --git a/web-console/src/views/supervisors-view/supervisors-view.tsx b/web-console/src/views/supervisors-view/supervisors-view.tsx
index 8c557fe3c54..c9d75af9680 100644
--- a/web-console/src/views/supervisors-view/supervisors-view.tsx
+++ b/web-console/src/views/supervisors-view/supervisors-view.tsx
@@ -361,6 +361,10 @@ export class SupervisorsView extends React.PureComponent<
});
}
+ componentDidMount() {
+ this.fetchData();
+ }
+
componentWillUnmount(): void {
this.supervisorQueryManager.terminate();
}
@@ -968,7 +972,11 @@ export class SupervisorsView extends React.PureComponent<
<MenuItem
icon={IconNames.APPLICATION}
text="View SQL query for table"
- onClick={() => goToQuery({ queryString: lastSupervisorQuery })}
+ disabled={typeof lastSupervisorQuery !== 'string'}
+ onClick={() => {
+ if (typeof lastSupervisorQuery !== 'string') return;
+ goToQuery({ queryString: lastSupervisorQuery });
+ }}
/>
)}
<MenuItem
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org