vogievetsky commented on a change in pull request #7292: Add table column 
selection in druid console to allow hiding/showing of columns
URL: https://github.com/apache/incubator-druid/pull/7292#discussion_r266718274
 
 

 ##########
 File path: web-console/src/views/tasks-view.tsx
 ##########
 @@ -293,9 +298,38 @@ ORDER BY "rank" DESC, "created_time" DESC`);
     </AsyncActionDialog>;
   }
 
+  private initTableColumnSelection() {
+    if (localStorage.getItem(supervisorTableColumnSelection) == null) {
+      const columns: string[] = ["Datasource", "Type", "Topic/Stream", 
"Status", "Actions"];
+      const defaultSetting: any = {};
+      columns.forEach(column => defaultSetting[column] = true);
+      localStorage.setItem(supervisorTableColumnSelection, 
JSON.stringify(defaultSetting));
+    }
 
 Review comment:
   I see these 6 lines of code repeated a lot... really feels like you could 
make a sweet utility function 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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to