Jelajahi Sumber

HUE-4326 [editor] Keep snippet DB list in sync like the assist

Johan Ahlen 9 tahun lalu
induk
melakukan
53b2793

+ 6 - 0
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -258,6 +258,12 @@
       }
       }
     };
     };
 
 
+    huePubSub.subscribe('assist.db.refresh', function (type) {
+      if (self.type() == type) {
+        updateDatabases();
+      }
+    });
+
     // History is currently in Notebook, same with saved queries by snippets, might be better in assist
     // History is currently in Notebook, same with saved queries by snippets, might be better in assist
     self.currentQueryTab = ko.observable(typeof snippet.currentQueryTab != "undefined" && snippet.currentQueryTab != null ? snippet.currentQueryTab : 'queryHistory');
     self.currentQueryTab = ko.observable(typeof snippet.currentQueryTab != "undefined" && snippet.currentQueryTab != null ? snippet.currentQueryTab : 'queryHistory');