[ZEPPELIN-693] Add AngularJS z.angularUnbind()#741
Closed
doanduyhai wants to merge 1 commit into
Closed
Conversation
ef8b9c0 to
c96f001
Compare
3 tasks
c96f001 to
03ed2b1
Compare
ac1d08b to
09631ba
Compare
09631ba to
3f01b04
Compare
Contributor
Author
|
@Leemoonsoo |
Member
|
LGTM and merge if there're no more discussions |
prabhjyotsingh
pushed a commit
to prabhjyotsingh/zeppelin
that referenced
this pull request
Mar 23, 2016
### What is this PR for?
Add AngularJS `z.angularUnbind()` method
The signature of the method is `angularUnbind(varName, paragraphId)`.
_This is a sub-task of epic **[ZEPPELIN-635]**_
### What type of PR is it?
[Improvement]
### Todos
* [ ] - Code review
* [ ] - Simple test
### Is there a relevant Jira issue?
**[ZEPPELIN-693]**
### How should this be tested?
* `git fetch origin pull/741/head:AngularJSUnbind`
* `git checkout AngularJSUnbind`
* `mvn clean package -DskipTests`
* `bin/zeppelin-daemon.sh restart`
* Create a new note
* In the first paragraph, put the following code
```html
%angular
<form class="form-inline">
<div class="form-group">
<label for="superheroId">Super Hero: </label>
<input type="text" class="form-control" id="superheroId" placeholder="Superhero name ..." ng-model="superhero"></input>
</div>
<button type="submit" class="btn btn-primary" ng-click="z.angularBind('superhero', superhero, PUT_HERE_PARAGRAPH_ID')"> Angular Bind</button>
<button type="submit" class="btn btn-primary" ng-click="z.angularUnbind('superhero', 'PUT_HERE_PARAGRAPH_ID')"> Angular UnBind</button>
</form>
```
* Create a second paragraph with the following code:
```scala
z.angular("superhero")
```
* Retrieve the paragraph id of the second paragraph
* In the first paragraph, replace the text PUT_HERE_PARAGRAPH_ID by the correct paragraph id
* In the input text, put "Superman" and click on the **Bind Angular** button
* Execute the second paragraph to see that the superhero variable is now set to Superman
* Now click on the **Unbind Angular** button from the first paragraph
* Refresh the second paragraph to check that the _superhero_ variable has been removed
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? --> **No**
* Is there breaking changes for older versions? --> **No**
* Does this needs documentation? --> **Yes**
[ZEPPELIN-635]: https://issues.apache.org/jira/browse/ZEPPELIN-635
[ZEPPELIN-693]: https://issues.apache.org/jira/browse/ZEPPELIN-693
Author: DuyHai DOAN <doanduyhai@gmail.com>
Closes apache#741 from doanduyhai/ZEPPELIN-693 and squashes the following commits:
3f01b04 [DuyHai DOAN] [ZEPPELIN-693] Add AngularJS z.angularUnbind()
onkarshedge
pushed a commit
to onkarshedge/incubator-zeppelin
that referenced
this pull request
May 11, 2016
### What is this PR for?
Add AngularJS `z.angularUnbind()` method
The signature of the method is `angularUnbind(varName, paragraphId)`.
_This is a sub-task of epic **[ZEPPELIN-635]**_
### What type of PR is it?
[Improvement]
### Todos
* [ ] - Code review
* [ ] - Simple test
### Is there a relevant Jira issue?
**[ZEPPELIN-693]**
### How should this be tested?
* `git fetch origin pull/741/head:AngularJSUnbind`
* `git checkout AngularJSUnbind`
* `mvn clean package -DskipTests`
* `bin/zeppelin-daemon.sh restart`
* Create a new note
* In the first paragraph, put the following code
```html
%angular
<form class="form-inline">
<div class="form-group">
<label for="superheroId">Super Hero: </label>
<input type="text" class="form-control" id="superheroId" placeholder="Superhero name ..." ng-model="superhero"></input>
</div>
<button type="submit" class="btn btn-primary" ng-click="z.angularBind('superhero', superhero, PUT_HERE_PARAGRAPH_ID')"> Angular Bind</button>
<button type="submit" class="btn btn-primary" ng-click="z.angularUnbind('superhero', 'PUT_HERE_PARAGRAPH_ID')"> Angular UnBind</button>
</form>
```
* Create a second paragraph with the following code:
```scala
z.angular("superhero")
```
* Retrieve the paragraph id of the second paragraph
* In the first paragraph, replace the text PUT_HERE_PARAGRAPH_ID by the correct paragraph id
* In the input text, put "Superman" and click on the **Bind Angular** button
* Execute the second paragraph to see that the superhero variable is now set to Superman
* Now click on the **Unbind Angular** button from the first paragraph
* Refresh the second paragraph to check that the _superhero_ variable has been removed
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? --> **No**
* Is there breaking changes for older versions? --> **No**
* Does this needs documentation? --> **Yes**
[ZEPPELIN-635]: https://issues.apache.org/jira/browse/ZEPPELIN-635
[ZEPPELIN-693]: https://issues.apache.org/jira/browse/ZEPPELIN-693
Author: DuyHai DOAN <doanduyhai@gmail.com>
Closes apache#741 from doanduyhai/ZEPPELIN-693 and squashes the following commits:
3f01b04 [DuyHai DOAN] [ZEPPELIN-693] Add AngularJS z.angularUnbind()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
Add AngularJS
z.angularUnbind()methodThe signature of the method is
angularUnbind(varName, paragraphId).This is a sub-task of epic ZEPPELIN-635
What type of PR is it?
[Improvement]
Todos
Is there a relevant Jira issue?
ZEPPELIN-693
How should this be tested?
git fetch origin pull/741/head:AngularJSUnbindgit checkout AngularJSUnbindmvn clean package -DskipTestsbin/zeppelin-daemon.sh restartz.angular("superhero")Screenshots (if appropriate)
Questions: