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_r266719253
 
 

 ##########
 File path: web-console/src/views/segments-view.tsx
 ##########
 @@ -133,8 +138,26 @@ export class SegmentsView extends 
React.Component<SegmentsViewProps, SegmentsVie
     });
   }
 
+  private initTableColumnSelection() {
+    if (localStorage.getItem(segmentTableColumnSelection) == null) {
+      const columns: string[] = ["Segment ID", "Datasource", "Start", "End", 
"Version", "Partition",
+        "Size", "Num rows", "Replicas", "Is published", "Is realtime", "Is 
available"];
+      const defaultSetting: any = {};
+      columns.forEach(column => defaultSetting[column] = true);
+      localStorage.setItem(segmentTableColumnSelection, 
JSON.stringify(defaultSetting));
 
 Review comment:
   Do not write to localStorage unless the user actually hides some columns.

----------------------------------------------------------------
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