瀏覽代碼

HUE-8629 [assist] Don't show a database icon in the breadcrumb of non sql type assist panels

Johan Ahlen 7 年之前
父節點
當前提交
28d5c869e8
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      desktop/core/src/desktop/templates/assist.mako

+ 3 - 2
desktop/core/src/desktop/templates/assist.mako

@@ -295,8 +295,8 @@ from desktop.views import _ko
       <!-- ko if: selectedSource().selectedNamespace().selectedDatabase() -->
       <a data-bind="click: back, appAwareTemplateContextMenu: { template: 'sql-context-items', viewModel: selectedSource().selectedNamespace().selectedDatabase() }">
         <i class="fa fa-chevron-left assist-breadcrumb-back" ></i>
-        <i class="fa fa-database assist-breadcrumb-text"></i>
-        <span class="assist-breadcrumb-text" data-bind="text: breadcrumb, attr: {'title': breadcrumb() + ' (' + selectedSource().sourceType + ' ' + selectedSource().selectedNamespace().name + ')' }"></span>
+        <i class="fa assist-breadcrumb-text" data-bind="css: { 'fa-server': nonSqlType, 'fa-database': !nonSqlType }"></i>
+        <span class="assist-breadcrumb-text" data-bind="text: breadcrumb, attr: {'title': breadcrumb() +  (nonSqlType ? '' : ' (' + selectedSource().sourceType + ' ' + selectedSource().selectedNamespace().name + ')') }"></span>
       </a>
       <!-- /ko -->
       <!-- ko ifnot: selectedSource().selectedNamespace().selectedDatabase() -->
@@ -1232,6 +1232,7 @@ from desktop.views import _ko
 
         self.isStreams = options.isStreams;
         self.isSolr = options.isSolr;
+        self.nonSqlType = self.isSolr || self.isStreams;
 
         if (typeof options.sourceTypes === 'undefined') {
           options.sourceTypes = [];