From cabb83e82a2e77326e214a6e506e53f6fb00ff07 Mon Sep 17 00:00:00 2001 From: Sanjay Dasgupta Date: Sun, 10 Jun 2018 11:02:22 +0530 Subject: [PATCH 1/2] z3511-remove-old-download-button: Initial updates --- .../result/result-chart-selector.html | 20 --------- .../paragraph/result/result.controller.js | 41 +------------------ 2 files changed, 1 insertion(+), 60 deletions(-) diff --git a/zeppelin-web/src/app/notebook/paragraph/result/result-chart-selector.html b/zeppelin-web/src/app/notebook/paragraph/result/result-chart-selector.html index 6b34977f8f9..54b906a04e2 100644 --- a/zeppelin-web/src/app/notebook/paragraph/result/result-chart-selector.html +++ b/zeppelin-web/src/app/notebook/paragraph/result/result-chart-selector.html @@ -73,26 +73,6 @@ -
- - - -
- diff --git a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js index 98940ab2c77..47069f74f16 100644 --- a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js @@ -12,8 +12,6 @@ * limitations under the License. */ -import moment from 'moment'; - import DatasetFactory from '../../../tabledata/datasetfactory'; import TableVisualization from '../../../visualization/builtins/visualization-table'; import BarchartVisualization from '../../../visualization/builtins/visualization-barchart'; @@ -33,7 +31,7 @@ angular.module('zeppelinWebApp').controller('ResultCtrl', ResultCtrl); function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location, $timeout, $compile, $http, $q, $templateCache, $templateRequest, $sce, websocketMsgSrv, - baseUrlSrv, ngToast, saveAsService, noteVarShareService, heliumService, + baseUrlSrv, ngToast, noteVarShareService, heliumService, uiGridConstants) { 'ngInject'; @@ -848,43 +846,6 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location commitParagraphResult(paragraph.title, paragraph.text, newConfig, newParams); }; - $scope.exportToDSV = function(delimiter) { - let dsv = ''; - let dateFinished = moment(paragraph.dateFinished).format('YYYY-MM-DD hh:mm:ss A'); - let exportedFileName = paragraph.title ? paragraph.title + '_' + dateFinished : 'data_' + dateFinished; - - for (let titleIndex in tableData.columns) { - if (tableData.columns.hasOwnProperty(titleIndex)) { - dsv += tableData.columns[titleIndex].name + delimiter; - } - } - dsv = dsv.substring(0, dsv.length - 1) + '\n'; - for (let r in tableData.rows) { - if (tableData.rows.hasOwnProperty(r)) { - let row = tableData.rows[r]; - let dsvRow = ''; - for (let index in row) { - if (row.hasOwnProperty(index)) { - let stringValue = (row[index]).toString(); - if (stringValue.indexOf(delimiter) > -1) { - dsvRow += '"' + stringValue + '"' + delimiter; - } else { - dsvRow += row[index] + delimiter; - } - } - } - dsv += dsvRow.substring(0, dsvRow.length - 1) + '\n'; - } - } - let extension = ''; - if (delimiter === '\t') { - extension = 'tsv'; - } else if (delimiter === ',') { - extension = 'csv'; - } - saveAsService.saveAs(dsv, exportedFileName, extension); - }; - $scope.getBase64ImageSrc = function(base64Data) { return 'data:image/png;base64,' + base64Data; }; From bee502e0148b2c8222be6c23f157aaf45e3fb418 Mon Sep 17 00:00:00 2001 From: Sanjay Dasgupta Date: Sat, 16 Jun 2018 09:42:11 +0530 Subject: [PATCH 2/2] Transition proposal - retain button with informative tool-tip text for 1 or 2 releases --- .../paragraph/result/result-chart-selector.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zeppelin-web/src/app/notebook/paragraph/result/result-chart-selector.html b/zeppelin-web/src/app/notebook/paragraph/result/result-chart-selector.html index 54b906a04e2..638edd79f33 100644 --- a/zeppelin-web/src/app/notebook/paragraph/result/result-chart-selector.html +++ b/zeppelin-web/src/app/notebook/paragraph/result/result-chart-selector.html @@ -73,6 +73,17 @@ +
+ +
+