瀏覽代碼

HUE-7397 [editor] Add number of rows in clipboard copy to warn on possible truncation

Romain Rigaux 8 年之前
父節點
當前提交
89f5600

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

@@ -216,7 +216,7 @@ from metadata.conf import has_optimizer, OPTIMIZER
     var CopyToClipboardGlobals = {
       i18n: {
         ERROR: "${ _('Error while copying results.') }",
-        SUCCESS: "${ _('Results copied successfully to the clipboard') }",
+        SUCCESS: "${ _('results copied to the clipboard') }",
       }
     }
 

+ 6 - 6
desktop/core/src/desktop/templates/common_notebook_ko_components.mako

@@ -189,6 +189,11 @@ except ImportError, e:
             <i class="fa fa-fw fa-file-excel-o"></i> ${ _('Excel') }
           </a>
         </li>
+        <li>
+          <a data-bind="css: clipboardClass" title="${ _('Copy the displayed results to your clipboard') }">
+            <i class="fa fa-fw fa-clipboard"></i> ${ _('Clipboard') }
+          </a>
+        </li>
         % if ENABLE_SQL_INDEXER.get():
         <li>
           <a class="download" href="javascript:void(0)" data-bind="click: function() { saveTarget('search-index'); savePath('__hue__'); trySaveResults(); }" title="${ _('Explore result in a dashboard') }">
@@ -196,11 +201,6 @@ except ImportError, e:
           </a>
         </li>
         % endif
-        <li>
-          <a data-bind="css: clipboardClass" title="${ _('Copy the displayed results in your clipboard') }">
-            <i class="fa fa-fw fa-clipboard"></i> ${ _('Clipboard') }
-          </a>
-        </li>
         <li>
           <a class="download" href="javascript:void(0)" data-bind="click: function() { savePath(''); $('#saveResultsModal').modal('show'); }" title="${ _('Save the result in a file, a new table...') }">
             <i class="fa fa-fw fa-save"></i> ${ _('Save') }
@@ -370,7 +370,7 @@ except ImportError, e:
         });
 
         clipboard.on('success', function (e) {
-          $.jHueNotify.info(CopyToClipboardGlobals.i18n.SUCCESS)
+          $.jHueNotify.info(self.snippet.result.data().length + ' ' + CopyToClipboardGlobals.i18n.SUCCESS)
           e.clearSelection();
         });