vogievetsky commented on a change in pull request #7493: No SQL mode in web
console
URL: https://github.com/apache/incubator-druid/pull/7493#discussion_r276870759
##########
File path: web-console/src/console-application.tsx
##########
@@ -62,28 +63,34 @@ export class ConsoleApplication extends
React.Component<ConsoleApplicationProps,
} catch (e) {
return true; // total failure
}
-
// Status works but SQL 405s => the SQL endpoint is disabled
- AppToaster.show({
- icon: IconNames.ERROR,
- intent: Intent.DANGER,
- timeout: 120000,
- /* tslint:disable:jsx-alignment */
- message: <>
- It appears that the SQL endpoint is disabled. Either <a
- href={DRUID_DOCS_SQL}>enable the SQL endpoint</a> or use the old <a
- href={LEGACY_COORDINATOR_CONSOLE}>coordinator</a> and <a
- href={LEGACY_OVERLORD_CONSOLE}>overlord</a> consoles that do not
rely on the SQL endpoint.
- </>
- /* tslint:enable:jsx-alignment */
- });
return false;
}
return true;
}
- static async shownNotifications() {
- await ConsoleApplication.ensureSql();
+ static shownNotifications() {
+ AppToaster.show({
+ icon: IconNames.ERROR,
+ intent: Intent.DANGER,
+ timeout: 120000,
+ /* tslint:disable:jsx-alignment */
+ message: <>
+ It appears that the SQL endpoint is disabled. No SQL endpoint is
+ used and all requests rely on <a href={DRUID_DOCS_API}>native Druid
query API</a>,
+ but you may still <a href={DRUID_DOCS_SQL}>enable the SQL endpoint</a>
+ </>
+ /* tslint:enable:jsx-alignment */
+ });
+ }
+
+ private async setSqlMode() {
+ if (!(await ConsoleApplication.ensureSql())) {
+ ConsoleApplication.shownNotifications();
+ this.setState({
+ noSqlMode: true
+ });
Review comment:
You can not just set noSqlMode like this, you need to also have a flag like
`capabilitiesLoading` and you need to block the entire UI (show a loader) until
this call returns. (I would wrap it in a QueryManager).
The first view will not know if it needs to use sql or not until this call
completes
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]