zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjf...@apache.org
Subject zeppelin git commit: ZEPPELIN-2486. AngularElem's onChange is only invoked once
Date Thu, 04 May 2017 04:02:52 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master 08a981403 -> 92e3abc9d


ZEPPELIN-2486. AngularElem's onChange is only invoked once

### What is this PR for?
`ng-change` can not capture event, so that means `$event.timeStamp` is undefined. https://github.com/angular/angular.js/issues/6370
This cause AngularElem's onChange is only invoked once. This PR use another approach to update
the angularObject.

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

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-2486

### How should this be tested?
Tested manually

### Screenshots (if appropriate)

Before
![zeppelin_before](https://cloud.githubusercontent.com/assets/164491/25662178/227ec2ec-3046-11e7-9852-9e041d008698.gif)
After
![zeppelin_after](https://cloud.githubusercontent.com/assets/164491/25662177/2108e898-3046-11e7-816f-7685480df83e.gif)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang <zjffdu@apache.org>

Closes #2312 from zjffdu/ZEPPELIN-2486 and squashes the following commits:

4039d6b [Jeff Zhang] ZEPPELIN-2486. AngularElem's onChange is only invoked once


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

Branch: refs/heads/master
Commit: 92e3abc9d4a6a95da8440c6a4985234190741aae
Parents: 08a9814
Author: Jeff Zhang <zjffdu@apache.org>
Authored: Wed May 3 20:42:34 2017 +0800
Committer: Jeff Zhang <zjffdu@apache.org>
Committed: Thu May 4 12:02:47 2017 +0800

----------------------------------------------------------------------
 .../apache/zeppelin/display/angular/AbstractAngularElem.scala    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/92e3abc9/zeppelin-display/src/main/scala/org/apache/zeppelin/display/angular/AbstractAngularElem.scala
----------------------------------------------------------------------
diff --git a/zeppelin-display/src/main/scala/org/apache/zeppelin/display/angular/AbstractAngularElem.scala
b/zeppelin-display/src/main/scala/org/apache/zeppelin/display/angular/AbstractAngularElem.scala
index cb6a567..7049e7a 100644
--- a/zeppelin-display/src/main/scala/org/apache/zeppelin/display/angular/AbstractAngularElem.scala
+++ b/zeppelin-display/src/main/scala/org/apache/zeppelin/display/angular/AbstractAngularElem.scala
@@ -131,10 +131,10 @@ abstract class AbstractAngularElem(val interpreterContext: InterpreterContext,
     // create AngularFunction in current paragraph
     val functionName = eventName.replaceAll("-", "_") + "_" + uniqueId
     val elem = this % Attribute(None, eventName,
-      Text(s"${functionName}=$$event.timeStamp"),
+      Text(s"${functionName}=${functionName} + 1"),
       Null)
 
-    val angularObject = addAngularObject(functionName, "")
+    val angularObject = addAngularObject(functionName, 0)
 
     angularObject.addWatcher(new AngularObjectWatcher(interpreterContext) {
       override def watch(oldObject: scala.Any, newObject: scala.Any, context: InterpreterContext)


Mime
View raw message