Skip to content

[ZEPPELIN-693] Add AngularJS z.angularUnbind()#741

Closed
doanduyhai wants to merge 1 commit into
apache:masterfrom
doanduyhai:ZEPPELIN-693
Closed

[ZEPPELIN-693] Add AngularJS z.angularUnbind()#741
doanduyhai wants to merge 1 commit into
apache:masterfrom
doanduyhai:ZEPPELIN-693

Conversation

@doanduyhai
Copy link
Copy Markdown
Contributor

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
%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:
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)

angularunbind

Questions:

  • Does the licenses files need update? --> No
  • Is there breaking changes for older versions? --> No
  • Does this needs documentation? --> Yes

@doanduyhai doanduyhai changed the title [Zeppelin-693] Add AngularJS z.angularUnbind() [ZEPPELIN-693] Add AngularJS z.angularUnbind() Feb 23, 2016
@doanduyhai doanduyhai force-pushed the ZEPPELIN-693 branch 4 times, most recently from ef8b9c0 to c96f001 Compare February 23, 2016 23:06
@doanduyhai doanduyhai force-pushed the ZEPPELIN-693 branch 3 times, most recently from ac1d08b to 09631ba Compare March 18, 2016 11:26
@doanduyhai
Copy link
Copy Markdown
Contributor Author

@Leemoonsoo
This PR should be straightforward

@Leemoonsoo
Copy link
Copy Markdown
Member

LGTM and merge if there're no more discussions

@asfgit asfgit closed this in 34a52ed Mar 22, 2016
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)
![angularunbind](https://cloud.githubusercontent.com/assets/1532977/13891568/30010c32-ed52-11e5-86c4-6c81efc35d27.gif)

### 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)
![angularunbind](https://cloud.githubusercontent.com/assets/1532977/13891568/30010c32-ed52-11e5-86c4-6c81efc35d27.gif)

### 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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants