From 8c77f769826d239bcfaf2ddf1ed6cf4771347b63 Mon Sep 17 00:00:00 2001 From: CloverHearts Date: Wed, 26 Apr 2017 18:10:18 +0900 Subject: [PATCH 1/2] fix call geteditorsetting --- .../notebook/paragraph/paragraph.controller.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 1a921769f49..dca6aa0d450 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -839,14 +839,16 @@ function ParagraphCtrl ($scope, $rootScope, $route, $window, $routeParams, $loca let getEditorSetting = function (paragraph, interpreterName) { let deferred = $q.defer() - websocketMsgSrv.getEditorSetting(paragraph.id, interpreterName) - $timeout( - $scope.$on('editorSetting', function (event, data) { - if (paragraph.id === data.paragraphId) { - deferred.resolve(data) - } - } - ), 1000) + if (!$scope.revisionView) { + websocketMsgSrv.getEditorSetting(paragraph.id, interpreterName) + $timeout( + $scope.$on('editorSetting', function (event, data) { + if (paragraph.id === data.paragraphId) { + deferred.resolve(data) + } + } + ), 1000) + } return deferred.promise } From 4b19fb0d2c446b6971036ab569b891c710c252e9 Mon Sep 17 00:00:00 2001 From: CloverHearts Date: Fri, 28 Apr 2017 12:01:54 +0900 Subject: [PATCH 2/2] fix indent --- .../src/app/notebook/paragraph/paragraph.controller.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index dca6aa0d450..515c7de090a 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -843,11 +843,11 @@ function ParagraphCtrl ($scope, $rootScope, $route, $window, $routeParams, $loca websocketMsgSrv.getEditorSetting(paragraph.id, interpreterName) $timeout( $scope.$on('editorSetting', function (event, data) { - if (paragraph.id === data.paragraphId) { - deferred.resolve(data) - } + if (paragraph.id === data.paragraphId) { + deferred.resolve(data) } - ), 1000) + } + ), 1000) } return deferred.promise }