You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by co...@apache.org on 2015/11/19 04:50:52 UTC
incubator-zeppelin git commit: ZEPPELIN-426 - Allowing new paragraph
under the last one
Repository: incubator-zeppelin
Updated Branches:
refs/heads/master c7cf115dd -> 0c50712e3
ZEPPELIN-426 - Allowing new paragraph under the last one
Adding a paragraph under the last one of the notebook was not allowed.
I tested a lot of different cases:
* While running the full note
* With or Without content in the last paragraph
* with or Without saved content in the last paragraph
And didn't find any issue to allow that feature on that last paragraph
Author: Damien CORNEAU <co...@gmail.com>
Closes #440 from corneadoug/fix/ZEPPELIN-426 and squashes the following commits:
2e168c4 [Damien CORNEAU] Remove jshint global
8bf82a5 [Damien CORNEAU] Remove alert on insert paragraph from last one
Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/0c50712e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/0c50712e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/0c50712e
Branch: refs/heads/master
Commit: 0c50712e3ea4bac0bd9daaa10a53351c35b3a4a0
Parents: c7cf115
Author: Damien CORNEAU <co...@gmail.com>
Authored: Tue Nov 17 13:00:12 2015 +0900
Committer: Damien CORNEAU <co...@gmail.com>
Committed: Thu Nov 19 12:50:41 2015 +0900
----------------------------------------------------------------------
zeppelin-web/.jshintrc | 8 +++++++-
zeppelin-web/src/app/interpreter/interpreter.controller.js | 7 +++----
zeppelin-web/src/app/notebook/notebook.controller.js | 5 -----
.../src/app/notebook/paragraph/paragraph.controller.js | 3 +--
zeppelin-web/src/components/navbar/navbar.controller.js | 5 ++---
5 files changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0c50712e/zeppelin-web/.jshintrc
----------------------------------------------------------------------
diff --git a/zeppelin-web/.jshintrc b/zeppelin-web/.jshintrc
index bb27950..06f72cc 100644
--- a/zeppelin-web/.jshintrc
+++ b/zeppelin-web/.jshintrc
@@ -25,6 +25,12 @@
"angular": false,
"_": false,
"jQuery": false,
- "hljs": false
+ "hljs": false,
+ "confirm": false,
+ "alert": false,
+ "nv": false,
+ "$": false,
+ "ace": false,
+ "d3": false
}
}
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0c50712e/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 e531181..c363115 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.controller.js
+++ b/zeppelin-web/src/app/interpreter/interpreter.controller.js
@@ -1,4 +1,3 @@
-/* global confirm:false, alert:false, _:false */
/* jshint loopfunc: true */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -105,7 +104,7 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', function($scope,
$scope.newInterpreterGroupChange = function() {
var el = _.pluck(_.filter($scope.availableInterpreters, { 'group': $scope.newInterpreterSetting.group }), 'properties');
-
+
var properties = {};
for (var i=0; i < el.length; i++) {
var intpInfo = el[i];
@@ -116,7 +115,7 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', function($scope,
};
}
}
-
+
$scope.newInterpreterSetting.properties = properties;
};
@@ -189,7 +188,7 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', function($scope,
if (!$scope.newInterpreterSetting.propertyKey || $scope.newInterpreterSetting.propertyKey === '') {
return;
}
-
+
$scope.newInterpreterSetting.properties[$scope.newInterpreterSetting.propertyKey] = {
value: $scope.newInterpreterSetting.propertyValue
};
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0c50712e/zeppelin-web/src/app/notebook/notebook.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js
index 848d66d..74bc4f4 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -1,4 +1,3 @@
-/* global confirm:false, alert:false */
/* jshint loopfunc: true */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -298,10 +297,6 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', function($scope, $ro
}
}
- if (newIndex === $scope.note.paragraphs.length) {
- alert('Cannot insert after the last paragraph.');
- return;
- }
if (newIndex < 0 || newIndex > $scope.note.paragraphs.length) {
return;
}
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0c50712e/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 57c432d..2fea151 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -1,4 +1,3 @@
-/* global $:false, jQuery:false, ace:false, confirm:false, d3:false, nv:false*/
/*jshint loopfunc: true, unused:false */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -649,7 +648,7 @@ angular.module('zeppelinWebApp')
var lineHeight = $scope.editor.renderer.lineHeight;
var headerHeight = 103; // menubar, notebook titlebar
var scrollTriggerEdgeMargin = 50;
-
+
var documentHeight = angular.element(document).height();
var windowHeight = angular.element(window).height(); // actual viewport height
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0c50712e/zeppelin-web/src/components/navbar/navbar.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/navbar/navbar.controller.js b/zeppelin-web/src/components/navbar/navbar.controller.js
index 620e075..3294164 100644
--- a/zeppelin-web/src/components/navbar/navbar.controller.js
+++ b/zeppelin-web/src/components/navbar/navbar.controller.js
@@ -1,4 +1,3 @@
-/* global $:false */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,9 +22,9 @@ angular.module('zeppelinWebApp').controller('NavCtrl', function($scope, $rootSco
vm.connected = websocketMsgSrv.isConnected();
vm.websocketMsgSrv = websocketMsgSrv;
vm.arrayOrderingSrv = arrayOrderingSrv;
-
+
$('#notebook-list').perfectScrollbar({suppressScrollX: true});
-
+
$scope.$on('setNoteMenu', function(event, notes) {
notebookListDataFactory.setNotes(notes);
});