|
@@ -1415,9 +1415,26 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, get_ord
|
|
|
self.selectedHBaseEntry = ko.observable();
|
|
self.selectedHBaseEntry = ko.observable();
|
|
|
self.reload = function () {
|
|
self.reload = function () {
|
|
|
self.selectedHBaseEntry(root);
|
|
self.selectedHBaseEntry(root);
|
|
|
- root.loadEntries();
|
|
|
|
|
|
|
+ root.loadEntries(function () {
|
|
|
|
|
+ var lastOpenendPath = self.apiHelper.getFromTotalStorage('assist', 'last.opened.hbase.entry', null);
|
|
|
|
|
+ if (lastOpenendPath) {
|
|
|
|
|
+ root.entries().every(function (entry) {
|
|
|
|
|
+ if (entry.path === lastOpenendPath) {
|
|
|
|
|
+ entry.open();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ self.selectedHBaseEntry.subscribe(function (newEntry) {
|
|
|
|
|
+ if (newEntry !== root || (newEntry === root && newEntry.loaded)) {
|
|
|
|
|
+ self.apiHelper.setInTotalStorage('assist', 'last.opened.hbase.entry', newEntry.path);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
huePubSub.subscribe('assist.clickHBaseItem', function (entry) {
|
|
huePubSub.subscribe('assist.clickHBaseItem', function (entry) {
|
|
|
if (entry.definition.host) {
|
|
if (entry.definition.host) {
|
|
|
entry.loadEntries();
|
|
entry.loadEntries();
|