You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by ah...@apache.org on 2017/02/26 03:27:38 UTC

zeppelin git commit: [ZEPPELIN-1964] Layout info is lost after refresh

Repository: zeppelin
Updated Branches:
  refs/heads/master c437a1918 -> 2a4d3699a


[ZEPPELIN-1964] Layout info is lost after refresh

### What is this PR for?
This PR fixes layout info is lost after refreshing issue.

### What type of PR is it?
Bug Fix

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1964

### How should this be tested?
Please do resize paragraph and then refresh browser.

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: astroshim <hs...@zepl.com>

Closes #2053 from astroshim/ZEPPELIN-1964 and squashes the following commits:

474bdf5 [astroshim] fix layout lost problem


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/2a4d3699
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/2a4d3699
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/2a4d3699

Branch: refs/heads/master
Commit: 2a4d3699a207efa5af3004e12fb26660d7ecbb64
Parents: c437a19
Author: astroshim <hs...@zepl.com>
Authored: Wed Feb 22 11:34:50 2017 +0900
Committer: ahyoungryu <ah...@apache.org>
Committed: Sun Feb 26 12:27:26 2017 +0900

----------------------------------------------------------------------
 .../app/notebook/paragraph/paragraph.controller.js  | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2a4d3699/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index c589e37..72fe0d7 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -509,10 +509,8 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat
 
   $scope.changeColWidth = function(paragraph, width) {
     angular.element('.navbar-right.open').removeClass('open');
-    if (width !== paragraph.config.colWidth) {
-      paragraph.config.colWidth = width;
-      commitParagraph(paragraph);
-    }
+    paragraph.config.colWidth = width;
+    commitParagraph(paragraph);
   };
 
   $scope.toggleOutput = function(paragraph) {
@@ -1130,23 +1128,23 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat
        $scope.paragraph.config = newPara.config;
      }
    };
- 
+
    $scope.updateParagraph = function(oldPara, newPara, updateCallback) {
      // 1. get status, refreshed
      const statusChanged = (newPara.status !== oldPara.status);
      const resultRefreshed = (newPara.dateFinished !== oldPara.dateFinished) ||
        isEmpty(newPara.results) !== isEmpty(oldPara.results) ||
        newPara.status === 'ERROR' || (newPara.status === 'FINISHED' && statusChanged);
- 
+
      // 2. update texts managed by $scope
      $scope.updateAllScopeTexts(oldPara, newPara);
- 
+
      // 3. execute callback to update result
      updateCallback();
- 
+
      // 4. update remaining paragraph objects
      $scope.updateParagraphObjectWhenUpdated(newPara);
- 
+
      // 5. handle scroll down by key properly if new paragraph is added
      if (statusChanged || resultRefreshed) {
        // when last paragraph runs, zeppelin automatically appends new paragraph.