Sfoglia il codice sorgente

HUE-7556 [assist] Improve icons and i18n for the collections panel

Enrico Berti 8 anni fa
parent
commit
bcfdcfb447
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 7 3
      desktop/core/src/desktop/templates/assist.mako

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

@@ -201,7 +201,7 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, get_ord
         <a class="inactive-action" href="javascript:void(0)" data-bind="visible: navigationSettings.openItem, click: openItem"><i class="fa fa-long-arrow-right" title="${_('Open')}"></i></a>
       </div>
       <a class="assist-entry assist-table-link" href="javascript:void(0)" data-bind="click: toggleOpen, attr: {'title': definition.title }, draggableText: { text: editorText,  meta: {'type': 'sql', 'table': tableName, 'database': databaseName} }">
-        <i class="fa fa-fw fa-table muted valign-middle" data-bind="css: { 'fa-eye': definition.isView && !navigationSettings.rightAssist, 'fa-table': definition.isTable && !navigationSettings.rightAssist }"></i>
+        <i class="fa fa-fw fa-table muted valign-middle" data-bind="css: { 'fa-eye': definition.isView && !navigationSettings.rightAssist, 'fa-table': definition.isTable && sourceType !== 'solr' && !navigationSettings.rightAssist, 'fa-search': sourceType === 'solr' }"></i>
         <span class="highlightable" data-bind="text: definition.displayName, css: { 'highlight': highlight }"></span> <!-- ko if: assistDbSource.activeSort() === 'popular' && popularity() > 0 --><i title="${ _('Popular') }" class="fa fa-star-o top-star"></i> <!-- /ko -->
       </a>
       <div class="center assist-spinner" data-bind="visible: loading() && open()"><i class="fa fa-spinner fa-spin"></i></div>
@@ -1733,7 +1733,11 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, get_ord
         var self = this;
         var i18n = {
           errorLoadingDatabases: "${ _('There was a problem loading the databases') }",
-          errorLoadingTablePreview: "${ _('There was a problem loading the table preview.') }"
+          errorLoadingTablePreview: "${ _('There was a problem loading the table preview') }"
+        };
+        var i18nCollections = {
+          errorLoadingDatabases: "${ _('There was a problem loading the collections') }",
+          errorLoadingTablePreview: "${ _('There was a problem loading the collection preview') }"
         };
 
         self.apiHelper = ApiHelper.getInstance();
@@ -1818,7 +1822,7 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, get_ord
                 panels.push(new AssistInnerPanel({
                   panelData: new AssistDbPanel($.extend({
                     apiHelper: self.apiHelper,
-                    i18n: i18n,
+                    i18n: i18nCollections,
                     isSolr: true
                   }, params.sql)),
                   apiHelper: self.apiHelper,