Repository: zeppelin Updated Branches: refs/heads/master be9c1e84d -> 21e702c65
[ZEPPELIN-2519] Disable watchers not in viewport ### What is this PR for? Currently all the watchers are enabled by default. I came across this github project https://github.com/wix/angular-viewport-watch to disable watchers not in viewport. This reduces number of watchers in notebooks with large number of paragraphs. ### What type of PR is it? [Improvement] ### Todos ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-2519 ### How should this be tested? Outline the steps to test the PR here. ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? Not sure of this part. This is under MIT license. [Project link](https://github.com/wix/angular-viewport-watch) * Is there breaking changes for older versions? No * Does this needs documentation? No Author: vipulm <[email protected]> Closes #2326 from vipul1409/ZEPPELIN-2519 and squashes the following commits: 497413b [vipulm] Fixing build issues 21c03d6 [vipulm] Merging master and resolving conflicts b982db4 [vipulm] Trigger build 175dd17 [vipulm] Merge master 99b19a5 [vipulm] Move pacakg to npm d698d06 [vipulm] Add license file 7142578 [vipulm] Trigger notification 329e33a [vipulm] Disable watchers not in viewport Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/21e702c6 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/21e702c6 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/21e702c6 Branch: refs/heads/master Commit: 21e702c657d0dc84a8cdf52b34084d11452a5def Parents: be9c1e8 Author: vipulm <[email protected]> Authored: Sun May 21 09:56:57 2017 +0530 Committer: Lee moon soo <[email protected]> Committed: Thu May 25 15:58:05 2017 +0900 ---------------------------------------------------------------------- zeppelin-distribution/src/bin_license/LICENSE | 1 + zeppelin-web/package.json | 1 + zeppelin-web/src/app/app.js | 2 ++ zeppelin-web/src/app/notebook/notebook.html | 3 ++- 4 files changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/21e702c6/zeppelin-distribution/src/bin_license/LICENSE ---------------------------------------------------------------------- diff --git a/zeppelin-distribution/src/bin_license/LICENSE b/zeppelin-distribution/src/bin_license/LICENSE index 7dd1fb3..32822c5 100644 --- a/zeppelin-distribution/src/bin_license/LICENSE +++ b/zeppelin-distribution/src/bin_license/LICENSE @@ -271,6 +271,7 @@ The text of each license is also included at licenses/LICENSE-[project]-[version (The MIT License) Unirest 1.4.9 (com.mashape.unirest:unirest-java:1.4.9 - https://github.com/Mashape/unirest-java) (The MIT License) ngclipboard v1.1.1 (https://github.com/sachinchoolur/ngclipboard) - https://github.com/sachinchoolur/ngclipboard/blob/1.1.1/LICENSE (The MIT License) headroom.js 0.9.3 (https://github.com/WickyNilliams/headroom.js) - https://github.com/WickyNilliams/headroom.js/blob/master/LICENSE + (The MIT License) angular-viewport-watch 0.135 (https://github.com/wix/angular-viewport-watch) - https://github.com/wix/angular-viewport-watch/blob/master/LICENSE ======================================================================== BSD-style licenses http://git-wip-us.apache.org/repos/asf/zeppelin/blob/21e702c6/zeppelin-web/package.json ---------------------------------------------------------------------- diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json index 39b230a..74e3d4d 100644 --- a/zeppelin-web/package.json +++ b/zeppelin-web/package.json @@ -21,6 +21,7 @@ "test": "karma start karma.conf.js" }, "dependencies": { + "angular-viewport-watch": "github:shahata/angular-viewport-watch", "github-markdown-css": "2.6.0", "angular-ui-grid": "^4.0.4", "grunt-angular-templates": "^0.5.7", http://git-wip-us.apache.org/repos/asf/zeppelin/blob/21e702c6/zeppelin-web/src/app/app.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/app.js b/zeppelin-web/src/app/app.js index 427d340..f14766b 100644 --- a/zeppelin-web/src/app/app.js +++ b/zeppelin-web/src/app/app.js @@ -17,6 +17,7 @@ import 'headroom.js' import 'headroom.js/dist/angular.headroom' +import 'angular-viewport-watch/angular-viewport-watch.js' import 'angular-ui-grid/ui-grid.css' import 'angular-ui-grid' @@ -40,6 +41,7 @@ const requiredModules = [ 'focus-if', 'ngResource', 'ngclipboard', + 'angularViewportWatch', 'ui.grid', 'ui.grid.exporter', 'ui.grid.edit', 'ui.grid.rowEdit', http://git-wip-us.apache.org/repos/asf/zeppelin/blob/21e702c6/zeppelin-web/src/app/notebook/notebook.html ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/notebook.html b/zeppelin-web/src/app/notebook/notebook.html index 293e2c2..63ef98b 100644 --- a/zeppelin-web/src/app/notebook/notebook.html +++ b/zeppelin-web/src/app/notebook/notebook.html @@ -112,7 +112,8 @@ limitations under the License. ng-controller="ParagraphCtrl" ng-init="init(currentParagraph, note)" ng-class="columnWidthClass(currentParagraph.config.colWidth)" - style="margin: 0; padding: 0;"> + style="margin: 0; padding: 0;" + viewport-watch> <div class="new-paragraph" ng-click="insertNew('above')" ng-hide="viewOnly || asIframe || revisionView"> <h4 class="plus-sign">+</h4> </div>
