Repository: zeppelin Updated Branches: refs/heads/master f46244d32 -> 38ee0c4ba
[ZEPPELIN-2919] fix: Fallback to table when vis is not available ### What is this PR for? fallback to table when vis is not available. The erroneous situation can happen when - user enabled helium visualization - and open the visualization in paragraph - and disabled the helium visualization - and open again the paragraph. - then you will see the empty paragraph because the specific visualization is now not available ### What type of PR is it? [Bug Fix] ### What is the Jira issue? [ZEPPELIN-2919](https://issues.apache.org/jira/browse/ZEPPELIN-2919) ### How should this be tested? - user enabled helium visualization - and open the visualization in paragraph - and disabled the helium visualization - and open again the paragraph with **refresh** ### Screenshots (if appropriate) #### Before  #### After  ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - NO Author: 1ambda <[email protected]> Closes #2572 from 1ambda/ZEPPELIN-2919/fallback-to-table-when-vis-is-not-available and squashes the following commits: e9ca08d3d [1ambda] fix: Fallback to table when helium is not avaiable Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/38ee0c4b Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/38ee0c4b Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/38ee0c4b Branch: refs/heads/master Commit: 38ee0c4ba4581c63c1bdeb53ac3c8d001b8e7dfd Parents: f46244d Author: 1ambda <[email protected]> Authored: Fri Sep 8 13:19:35 2017 +0900 Committer: 1ambda <[email protected]> Committed: Mon Sep 11 11:18:07 2017 +0900 ---------------------------------------------------------------------- .../src/app/notebook/paragraph/result/result.controller.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/38ee0c4b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js ---------------------------------------------------------------------- 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 5c26c51..646d09d 100644 --- a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js @@ -529,8 +529,13 @@ function ResultCtrl ($scope, $rootScope, $route, $window, $routeParams, $locatio if (!graphMode) { graphMode = 'table' } - const builtInViz = builtInVisualizations[graphMode] - if (!builtInViz) { return } + let builtInViz = builtInVisualizations[graphMode] + if (!builtInViz) { + /** helium package is not available, fallback to table vis */ + graphMode = 'table' + $scope.graphMode = graphMode /** html depends on this scope value */ + builtInViz = builtInVisualizations[graphMode] + } // deactive previsouly active visualization for (let t in builtInVisualizations) {
