You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2015/08/07 00:16:32 UTC

incubator-zeppelin git commit: ZEPPELIN-196: fix the auto-completion issue

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 3a42a28b0 -> 9186b2186


ZEPPELIN-196: fix the auto-completion issue

The existing code  ($rootScope.$emit('sendNewEvent',...)) emits events to the  "sendNewEvent" channel but apparently there are no listener listening to it!

The websocketMsgSrv service exposes a completion() method that is not used. The WS communication goes through this webscket service so it seemed natural to use it for the completion method as well.

This change fixes the event flow problem. You can trace that COMPLETION events go down to the Interceptor's compete method and back to the completers $scope.$on('completionList') handler.

It seems though that the SparkInteprteer's completer doesn't work. It never returns completion suggestions. But this is would be a different issue.

Author: tzolov <ch...@gmail.com>

Closes #180 from tzolov/ZEPPELIN-196 and squashes the following commits:

e73223f [tzolov] ZEPPELIN-196: fix the autocompletion issue


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

Branch: refs/heads/master
Commit: 9186b2186de157e2ac4d9ff13ebfc23c979b9c51
Parents: 3a42a28
Author: tzolov <ch...@gmail.com>
Authored: Tue Aug 4 14:19:53 2015 +0200
Committer: Lee moon soo <mo...@apache.org>
Committed: Thu Aug 6 15:16:24 2015 -0700

----------------------------------------------------------------------
 .../src/app/notebook/paragraph/paragraph.controller.js  | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/9186b218/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 21e022a..afa3dbf 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -426,15 +426,9 @@ angular.module('zeppelinWebApp')
 
               var pos = session.getTextRange(new Range(0, 0, pos.row, pos.column)).length;
               var buf = session.getValue();
-              $rootScope.$emit('sendNewEvent', {
-                  op : 'COMPLETION',
-                  data : {
-                      id : $scope.paragraph.id,
-                      buf : buf,
-                      cursor : pos
-                  }
-              });
-
+              
+              websocketMsgSrv.completion($scope.paragraph.id, buf, pos);
+              
               $scope.$on('completionList', function(event, data) {
                   if (data.completions) {
                       var completions = [];