From 4683f350fdc5aeb49c3b39b75cffce3d0ce86224 Mon Sep 17 00:00:00 2001 From: sameer79 Date: Fri, 18 May 2018 11:36:46 +0530 Subject: [PATCH 1/2] ZEPPELIN-3472 No interpreter status is shown after restarting the individual interpreter. --- zeppelin-web/src/app/notebook/notebook.controller.js | 9 +++++++++ zeppelin-web/src/app/notebook/notebook.html | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js index 448df6ef522..97da8ae328e 100644 --- a/zeppelin-web/src/app/notebook/notebook.controller.js +++ b/zeppelin-web/src/app/notebook/notebook.controller.js @@ -1002,6 +1002,14 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, $timeout(makeSearchBoxVisible()); }); + const checkInterpreterStatus = function(interpreterObj) { + const index = _.findIndex($scope.interpreterBindings, {'id': interpreterObj.id}); + if(interpreterObj.errorReason) { + $scope.interpreterBindings[index].errorReason = interpreterObj.errorReason; + } + $scope.interpreterBindings[index].status = interpreterObj.status; + }; + $scope.restartInterpreter = function(interpreter) { const thisConfirm = BootstrapDialog.confirm({ closable: false, @@ -1023,6 +1031,7 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, .success(function(data, status, headers, config) { let index = _.findIndex($scope.interpreterSettings, {'id': interpreter.id}); $scope.interpreterSettings[index] = data.body; + checkInterpreterStatus(data.body); thisConfirm.close(); }).error(function(data, status, headers, config) { thisConfirm.close(); diff --git a/zeppelin-web/src/app/notebook/notebook.html b/zeppelin-web/src/app/notebook/notebook.html index f004e9b325f..393c295933f 100644 --- a/zeppelin-web/src/app/notebook/notebook.html +++ b/zeppelin-web/src/app/notebook/notebook.html @@ -61,6 +61,18 @@
Interpreter binding
+ + + + + + + + + + From a234150957aa222633a763e673a2c32b06d8d82e Mon Sep 17 00:00:00 2001 From: sameer79 Date: Tue, 22 May 2018 12:28:14 +0530 Subject: [PATCH 2/2] Generic error message is shown i:e (circle) color YELLOW --- zeppelin-web/src/app/notebook/notebook.controller.js | 9 +++++---- zeppelin-web/src/app/notebook/notebook.html | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js index 97da8ae328e..ef21b5d8753 100644 --- a/zeppelin-web/src/app/notebook/notebook.controller.js +++ b/zeppelin-web/src/app/notebook/notebook.controller.js @@ -1034,12 +1034,13 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, checkInterpreterStatus(data.body); thisConfirm.close(); }).error(function(data, status, headers, config) { + checkInterpreterStatus({ + id: interpreter.id, + errorReason: 'Not able to restart the interpreter.', + status: 'YELLOW', + }); thisConfirm.close(); console.log('Error %o %o', status, data.message); - BootstrapDialog.show({ - title: 'Error restart interpreter.', - message: _.escape(data.message), - }); }); return false; } diff --git a/zeppelin-web/src/app/notebook/notebook.html b/zeppelin-web/src/app/notebook/notebook.html index 393c295933f..72703f486e0 100644 --- a/zeppelin-web/src/app/notebook/notebook.html +++ b/zeppelin-web/src/app/notebook/notebook.html @@ -72,6 +72,11 @@
Interpreter binding
uib-tooltip="{{item.errorReason}}"> + + + +