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 2016/12/17 13:04:36 UTC
zeppelin git commit: [MINOR] Set default interpreter \w first intp
Repository: zeppelin
Updated Branches:
refs/heads/master c854fda93 -> dc3d383cc
[MINOR] Set default interpreter \w first intp
### What is this PR for?
Currently we can select default interpreter when we create a new note like below.

However, even if we don't set the default interpreter(don't select any interpreters) in this dialog and just create new note, the default interpreter is automatically set as `Spark` interpreter. This can be checked in the interpreter binding page. It doesn't make sense I think.
So I removed `--select--` and set the default option in the select box with `Spark` as the interpreter binding page does.
### What type of PR is it?
Bug Fix
### What is the Jira issue?
N/A
### How should this be tested?
1. Build only web \w `npm run build` under `zeppelin-web/` and run `npm run start` for dev mode.
2. Create a new note and see the select box
or just see the below screenshots :)
### 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: AhyoungRyu <fb...@hanmail.net>
Closes #1766 from AhyoungRyu/fix-default-intp and squashes the following commits:
569e63b [AhyoungRyu] Set default interpreter \w first intp
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/dc3d383c
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/dc3d383c
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/dc3d383c
Branch: refs/heads/master
Commit: dc3d383cc95dfbf46298e1854507d0f88932229d
Parents: c854fda
Author: AhyoungRyu <fb...@hanmail.net>
Authored: Thu Dec 15 16:32:13 2016 +0900
Committer: ahyoungryu <ah...@apache.org>
Committed: Sat Dec 17 22:04:30 2016 +0900
----------------------------------------------------------------------
.../src/components/noteName-create/note-name-dialog.html | 1 -
.../src/components/noteName-create/notename.controller.js | 5 ++++-
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dc3d383c/zeppelin-web/src/components/noteName-create/note-name-dialog.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/noteName-create/note-name-dialog.html b/zeppelin-web/src/components/noteName-create/note-name-dialog.html
index 0bb599c..44d1c01 100644
--- a/zeppelin-web/src/components/noteName-create/note-name-dialog.html
+++ b/zeppelin-web/src/components/noteName-create/note-name-dialog.html
@@ -34,7 +34,6 @@ limitations under the License.
name="defaultInterpreter"
id="defaultInterpreter"
ng-options="option.name for option in interpreterSettings">
- <option value="">--Select--</option>
</select>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/dc3d383c/zeppelin-web/src/components/noteName-create/notename.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/noteName-create/notename.controller.js b/zeppelin-web/src/components/noteName-create/notename.controller.js
index 2936fad..29c6557 100644
--- a/zeppelin-web/src/components/noteName-create/notename.controller.js
+++ b/zeppelin-web/src/components/noteName-create/notename.controller.js
@@ -39,7 +39,7 @@
defaultInterpreterId = $scope.note.defaultInterpreter.id;
}
vm.websocketMsgSrv.createNotebook($scope.note.notename, defaultInterpreterId);
- $scope.note.defaultInterpreter = null;
+ $scope.note.defaultInterpreter = $scope.interpreterSettings[0];
} else {
var noteId = $routeParams.noteId;
vm.websocketMsgSrv.cloneNote(noteId, $scope.note.notename);
@@ -104,6 +104,9 @@
$scope.$on('interpreterSettings', function(event, data) {
$scope.interpreterSettings = data.interpreterSettings;
+
+ //initialize default interpreter with Spark interpreter
+ $scope.note.defaultInterpreter = data.interpreterSettings[0];
});
var init = function() {