浏览代码

HUE-4979 [editor] Add column count on the context popover

Romain Rigaux 9 年之前
父节点
当前提交
3eab32f9d4

+ 2 - 2
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -590,13 +590,13 @@
 <script type="text/html" id="common-fs-link">
  <!-- ko if: $data.path.length > 0 -->
    <!-- ko if: with_label -->
-     <a data-bind="attr: {href: '/filebrowser/view=' + ($data.path[0] != '/' && ! $data.path.startsWith('s3a://') ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path , title: '${ _ko('Open') } '+ $data.path }" target="_blank">
+     <a data-bind="attr: {href: '/filebrowser/view=' + ($data.path[0] != '/' && $data.path.indexOf('s3a://') !== 0 ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path , title: '${ _ko('Open') } '+ $data.path }" target="_blank">
       <span data-bind="text: $data.path.lastIndexOf('/') == $data.path.length - 1 ? $data.path : $data.path.split('/').pop()"></span>
      </a>
    <!-- /ko -->
 
    <!-- ko if: ! with_label -->
-     <a data-bind="attr: {href: '/filebrowser/view=' + ($data.path[0] != '/' && ! $data.path.startsWith('s3a://') ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path }" target="_blank" title="${ _('Open') }">
+     <a data-bind="attr: {href: '/filebrowser/view=' + ($data.path[0] != '/' && $data.path.indexOf('s3a://') !== 0 ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path }" target="_blank" title="${ _('Open') }">
        <i class="fa fa-external-link-square"></i>
      </a>
    <!-- /ko -->

+ 5 - 1
desktop/core/src/desktop/templates/assist.mako

@@ -926,8 +926,12 @@ from metadata.conf import has_navigator
           <!-- ko if: type === 'DATABASE' -->
           <div class="doc-desc" data-bind="text: originalDescription"></div>
           <!-- /ko -->
-          <!-- ko if: type === 'TABLE' || type === 'VIEW' -->
+          <!-- ko if: type === 'TABLE' -->
+          <div class="doc-desc" data-bind="text: originalDescription"></div>
+          <!-- /ko -->
+          <!-- ko if:  type === 'VIEW' -->
           <div class="doc-desc" data-bind="text: originalDescription"></div>
+          <div class="doc-desc" data-bind="text: queryText.substring(0, 150)"></div>
           <!-- /ko -->
           <!-- ko if: type === 'FIELD' -->
           <div class="doc-desc" data-bind="text: originalDescription"></div>

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

@@ -1109,7 +1109,7 @@ from metadata.conf import has_navigator
     <div class="sql-context-flex">
       <div class="sql-context-flex-header">
         <div style="margin: 10px 5px 0 10px;">
-          <span style="font-size: 15px; font-weight: 300;">${_('Columns')}</span>
+          <span style="font-size: 15px; font-weight: 300;">${_('Columns')} (<span data-bind="text: filteredColumns().length"></span>)</span>
           <a href="#" data-bind="toggle: searchVisible"><i class="snippet-icon fa fa-search inactive-action margin-left-10" data-bind="css: { 'blue': searchVisible }"></i></a>
           <input class="input-large sql-context-inline-search" type="text" data-bind="visible: searchVisible, hasFocus: searchFocus, clearable: searchInput, valueUpdate:'afterkeydown'" placeholder="${ _('Filter columns...') }">
         </div>