You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/19 00:05:38 UTC

[GitHub] [incubator-druid] vogievetsky commented on a change in pull request #7493: No SQL mode in web console

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_r276868993
 
 

 ##########
 File path: web-console/src/views/home-view.tsx
 ##########
 @@ -160,33 +187,31 @@ export class HomeView extends React.Component<HomeViewProps, HomeViewState> {
       }
     });
 
-    this.segmentQueryManager.runQuery(`SELECT COUNT(*) as "count" FROM sys.segments`);
+    this.segmentQueryManager.runQuery(`SELECT COUNT (*) as "count" FROM sys.segments`);
 
     // -------------------------
 
     this.taskQueryManager = new QueryManager({
       processQuery: async (query) => {
-        const taskCountsFromSql = await queryDruidSql({ query });
-        const taskCounts = {
-          successTaskCount: 0,
-          failedTaskCount: 0,
-          runningTaskCount: 0,
-          waitingTaskCount: 0,
-          pendingTaskCount: 0
-        };
-        for (const dataStatus of taskCountsFromSql) {
-          if (dataStatus.status === 'SUCCESS') {
-            taskCounts.successTaskCount = dataStatus.count;
-          } else if (dataStatus.status === 'FAILED') {
-            taskCounts.failedTaskCount = dataStatus.count;
-          } else if (dataStatus.status === 'RUNNING') {
-            taskCounts.runningTaskCount = dataStatus.count;
-          } else if (dataStatus.status === 'WAITING') {
-            taskCounts.waitingTaskCount = dataStatus.count;
-          } else {
-            taskCounts.pendingTaskCount = dataStatus.count;
-          }
+        let taskCountsFromQuery: any[] = [];
 
 Review comment:
   Can you provided a better type here?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org