asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AsterixDB Code Review <do-not-re...@asterix-gerrit.ics.uci.edu>
Subject Change in asterixdb[master]: [NO ISSUE][DASHBOARD] Fix for visual deselect of dataverses on refres...
Date Sat, 05 Jun 2021 23:28:58 GMT
>From <milesh1@uci.edu>:

milesh1@uci.edu has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11783
)


Change subject: [NO ISSUE][DASHBOARD] Fix for visual deselect of dataverses on refresh click
......................................................................

[NO ISSUE][DASHBOARD] Fix for visual deselect of dataverses on refresh
click

-user model changes: no
-storage format changes: no
-interface changes: yes

Details:
-Implements a fix that remembers the selection of dataverses when user
clicks the Refresh button

Change-Id: I7d65996fb09f2c14668f13f880960000a27f12af
---
M asterixdb/asterix-dashboard/src/node/src/app/dashboard/query/metadata.component.ts
1 file changed, 19 insertions(+), 4 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/83/11783/1

diff --git a/asterixdb/asterix-dashboard/src/node/src/app/dashboard/query/metadata.component.ts
b/asterixdb/asterix-dashboard/src/node/src/app/dashboard/query/metadata.component.ts
index 835eeb8..3de1555 100755
--- a/asterixdb/asterix-dashboard/src/node/src/app/dashboard/query/metadata.component.ts
+++ b/asterixdb/asterix-dashboard/src/node/src/app/dashboard/query/metadata.component.ts
@@ -83,9 +83,7 @@
     sampleDataset$: Observable<any>;
     sampleDataset: any;
 
-    //variables for counting
-    countDataset$:Observable<any>;
-    countDataset: number;
+    checkedDataverses: any = {};
 
     //added variables for flattening
     datatypesDict: Object;
@@ -104,6 +102,16 @@
          this.dataverses$ = this.store.select(s => s.dataverse.dataverses.results);
          this.dataverses$.subscribe((data: any[]) => {
              this.dataverses = data;
+
+             if (Object.keys(this.checkedDataverses).length > 0) {
+               for (let dataverse of this.dataverses) {
+                 if (this.checkedDataverses[dataverse.DataverseName]) {
+                   dataverse.active = true;
+                 }
+               }
+
+               this.checkedDataverses = {};
+             }
          });
 
          // Watching for Datasets
@@ -140,6 +148,14 @@
     }
 
     refreshMetadata() {
+        if (this.dataverses) {
+          for (let dataverse of this.dataverses) {
+            if (dataverse.active) {
+              this.checkedDataverses[dataverse.DataverseName] = true;
+            }
+          }
+        }
+
         this.store.dispatch(new dataverseActions.SelectDataverses('-'));
         this.store.dispatch(new datasetActions.SelectDatasets('-'));
         this.store.dispatch(new datatypesActions.SelectDatatypes('-'));
@@ -183,7 +199,6 @@
 
     checkStatus = [];
     generateFilter(dataverse, event, i) {
-
         if (this.checkStatus[i] == undefined) {
             this.checkStatus.push(event.checked);
         } else {

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11783
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I7d65996fb09f2c14668f13f880960000a27f12af
Gerrit-Change-Number: 11783
Gerrit-PatchSet: 1
Gerrit-Owner: milesh1@uci.edu
Gerrit-MessageType: newchange

Mime
View raw message