Repository: zeppelin
Updated Branches:
  refs/heads/master 4178089a0 -> 7e491f8da


[ZEPPELIN-1304] Show popup when interpreter name is empty

### What is this PR for?
Prevent creating interpreter with empty name.

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

### What is the Jira issue?
[ZEPPELIN-1304](https://issues.apache.org/jira/browse/ZEPPELIN-1304)

### How should this be tested?
Try to create interpreter name with empty string or white spaces.

### Screenshots (if appropriate)
**Before**
![aug-07-2016 
17-21-45](https://cloud.githubusercontent.com/assets/8503346/17461324/8a087ac2-5cc3-11e6-8a3e-244e87d4cf55.gif)

**After**
![aug-07-2016 
17-19-43](https://cloud.githubusercontent.com/assets/8503346/17461326/8eeddae6-5cc3-11e6-9c26-61c1bf651c0b.gif)

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

Author: Mina Lee <[email protected]>

Closes #1299 from minahlee/ZEPPELIN-1304 and squashes the following commits:

59ce0b0 [Mina Lee] Show popup when interpreter name is empty


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

Branch: refs/heads/master
Commit: 7e491f8daca55c8b958ee1ac8284e7a97a99c086
Parents: 4178089
Author: Mina Lee <[email protected]>
Authored: Sun Aug 7 17:16:33 2016 +0900
Committer: Mina Lee <[email protected]>
Committed: Tue Aug 9 19:25:26 2016 +0900

----------------------------------------------------------------------
 zeppelin-web/src/app/interpreter/interpreter.controller.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7e491f8d/zeppelin-web/src/app/interpreter/interpreter.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.controller.js 
b/zeppelin-web/src/app/interpreter/interpreter.controller.js
index d1e8889..a04b376 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.controller.js
+++ b/zeppelin-web/src/app/interpreter/interpreter.controller.js
@@ -249,8 +249,8 @@ 
angular.module('zeppelinWebApp').controller('InterpreterCtrl',
 
     $scope.addNewInterpreterSetting = function() {
       //user input validation on interpreter creation
-      if ($scope.newInterpreterSetting.name &&
-        !$scope.newInterpreterSetting.name.trim() || 
!$scope.newInterpreterSetting.group) {
+      if (!$scope.newInterpreterSetting.name ||
+          !$scope.newInterpreterSetting.name.trim() || 
!$scope.newInterpreterSetting.group) {
         BootstrapDialog.alert({
           closable: true,
           title: 'Add interpreter',

Reply via email to