[ZEPPELIN-696] Add notification system for AngularJS z functions#744
Closed
doanduyhai wants to merge 1 commit into
Closed
[ZEPPELIN-696] Add notification system for AngularJS z functions#744doanduyhai wants to merge 1 commit into
doanduyhai wants to merge 1 commit into
Conversation
3 tasks
Contributor
|
We already have ngtoast for that |
Contributor
Author
|
Right, didn't know that we had ngToast. I never see it in action. Will remove angular-growl-2 |
ce6cd54 to
e9510e9
Compare
e9510e9 to
f8877c1
Compare
1cd7912 to
9d8800f
Compare
9d8800f to
0f7bff4
Compare
Contributor
Author
|
Rebased from master, only JS change, can be reviewed and merged quickly. Do you want me to add also a test in |
Member
|
I have tested and working well. @corneadoug Can you take a look, too? |
Member
|
@corneadoug ping |
Contributor
Author
|
Can we merge this PR so I can move to the next sub-task ? |
Contributor
Author
|
ping @Leemoonsoo @corneadoug |
Contributor
|
@doanduyhai LGTM |
onkarshedge
pushed a commit
to onkarshedge/incubator-zeppelin
that referenced
this pull request
May 11, 2016
### What is this PR for?
Add notification system for AngularJS z functions. Now that we expose the `z` Angular object, we should also catch error/exceptions and display error messages properly to the user.
I changed a little bit the default settings for **ngToast**. Instead of having notifications on **bottom right**, I let the default value undefined.
For **Interpreter** page notification, I force the position to **bottom right** as before when using default config.
For `z` functions error messages, I choose to display notifications on **top right** corner because it's clearer. See screen capture
_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-696]**
### How should this be tested?
* `git fetch origin pull/744/head:AngularJSNotification`
* `git checkout AngularJSNotification`
* `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">
<button type="submit" class="btn btn-primary" ng-click="z.runParagraph()"> Run Paragraph Without Id</button>
<button type="submit" class="btn btn-primary" ng-click="z.runParagraph('20160223-141919_305734436')"> Run Paragraph Without Wrong Id</button>
<button type="submit" class="btn btn-primary" ng-click="z.angularBind('superhero', superhero)"> Angular Bind Without Paragraph Id</button>
<button type="submit" class="btn btn-primary" ng-click="z.angularUnbind('superhero')"> Angular UnBind Without Paragraph Id</button>
</form>
```
* Click on each button to see the appropriate error message
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? --> **No**
* Is there breaking changes for older versions? --> **No**
* Does this needs documentation? --> **Yes**
[angular-growl-2]: http://janstevens.github.io/angular-growl-2/
[ZEPPELIN-635]: https://issues.apache.org/jira/browse/ZEPPELIN-635
[ZEPPELIN-696]: https://issues.apache.org/jira/browse/ZEPPELIN-696
Author: DuyHai DOAN <doanduyhai@gmail.com>
Closes apache#744 from doanduyhai/ZEPPELIN-696 and squashes the following commits:
0f7bff4 [DuyHai DOAN] [ZEPPELIN-696] Add notification system for AngularJS z functions
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 notification system for AngularJS z functions. Now that we expose the
zAngular object, we should also catch error/exceptions and display error messages properly to the user.I changed a little bit the default settings for ngToast. Instead of having notifications on bottom right, I let the default value undefined.
For Interpreter page notification, I force the position to bottom right as before when using default config.
For
zfunctions error messages, I choose to display notifications on top right corner because it's clearer. See screen captureThis is a sub-task of epic ZEPPELIN-635
What type of PR is it?
[Improvement]
Todos
Is there a relevant Jira issue?
ZEPPELIN-696
How should this be tested?
git fetch origin pull/744/head:AngularJSNotificationgit checkout AngularJSNotificationmvn clean package -DskipTestsbin/zeppelin-daemon.sh restartScreenshots (if appropriate)
Questions: