Browse Source

HUE-5332 [assist] Fix context popover for databases

Johan Ahlen 9 years ago
parent
commit
c497518
1 changed files with 3 additions and 3 deletions
  1. 3 3
      desktop/core/src/desktop/templates/sql_context_popover.mako

+ 3 - 3
desktop/core/src/desktop/templates/sql_context_popover.mako

@@ -790,10 +790,10 @@ from metadata.conf import has_navigator
         }, 0);
         }, 0);
       };
       };
 
 
-      function DatabaseContextTabs(data, sourceType) {
+      function DatabaseContextTabs(data, sourceType, defaultDatabase) {
         var self = this;
         var self = this;
         self.tabs = [
         self.tabs = [
-          { id: 'tags', label: '${ _("Tags") }', template: 'sql-context-database-details', templateData: new TagsTab(data.identifierChain, sourceType, data.identifierChain[0].name) }
+          { id: 'tags', label: '${ _("Tags") }', template: 'sql-context-database-details', templateData: new GenericTabContents(data.identifierChain, sourceType, defaultDatabase, ApiHelper.getInstance().fetchAutocomplete) }
         ];
         ];
         self.activeTab = ko.observable('tags');
         self.activeTab = ko.observable('tags');
       }
       }
@@ -1188,7 +1188,7 @@ from metadata.conf import has_navigator
         self.isView = params.data.type === 'view';
         self.isView = params.data.type === 'view';
 
 
         if (self.isDatabase) {
         if (self.isDatabase) {
-          self.contents = new DatabaseContextTabs(self.data, self.sourceType);
+          self.contents = new DatabaseContextTabs(self.data, self.sourceType, self.defaultDatabase);
           self.title = self.data.identifierChain[self.data.identifierChain.length - 1].name;
           self.title = self.data.identifierChain[self.data.identifierChain.length - 1].name;
           self.iconClass = 'fa-database';
           self.iconClass = 'fa-database';
         } else if (self.isTable) {
         } else if (self.isTable) {