### What is this PR for?
Currently a paragraph can display only a single type of result.
For example
```
print("""
%text textout
%html htmlout
""")
```
will display only last display system detected, "htmlout".
This pr implements multiple results supports, so not only the last, but also all the display systems in a paragraph outputs can be displayed.
To do that, Note.json format need to be changed. from
```
paragraph : [
{
result : {
code: "",
type: "",
msg: ""
},
config : {
graph : {},
...
},
...
},
...
],
...
```
to
```
paragraph : [
{
results : {
{
code: "",
msg: [
{
type: "",
data: ""
},
{
type: "",
data: ""
},
...
]
},
config : {
results : [
{
graph : {},
},
{
graph : {},
},
...
]
},
...
},
...
],
...
```
### What type of PR is it?
Improvement
### Todos
* [x] - Make InterpreterResult and InterpreterOutput support multiple display system
* [x] - Automatic migration old format to new format
* [x] - Render multiple results in front-end
* [x] - Take care Importing old notebook format
* [x] - Make helium framework support multiple results
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-212
### How should this be tested?
run following code in a single spark paragraph.
```
%spark
// default output is text
(1 to 3).foreach{i=>
println(new java.util.Date())
Thread.sleep(1000)
}
// print something in html
println(s"""%html <h3><font style="color:blue">Some HTML</font></h3>""")
// create table
println(s"""%table key\tvalue
sun\t100
moon\t200
""")
// display text again
println("""%text""")
(1 to 3).foreach{i=>
println(new java.util.Date())
Thread.sleep(1000)
}
// another table
Thread.sleep(1000)
println(s"""%table key\tvalue
apple\t100
banana\t200
""")
```
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? yes
* Does this needs documentation? yes
Author: Lee moon soo <moon@apache.org>
Closes#1658 from Leemoonsoo/ZEPPELIN-212 and squashes the following commits:
0c6a13c [Lee moon soo] Merge remote-tracking branch 'origin/master' into ZEPPELIN-212
519cf23 [Lee moon soo] Update PythonInterpreterPandasSqlTest
e6268ac [Lee moon soo] Update PythonInterpreterMatplotlibTest.java
f5034b8 [Lee moon soo] Merge remote-tracking branch 'origin/master' into ZEPPELIN-212
d5981d5 [Lee moon soo] Merge remote-tracking branch 'origin/master' into ZEPPELIN-212
a1fe729 [Lee moon soo] document note format change
282504e [Lee moon soo] Merge remote-tracking branch 'origin/master' into ZEPPELIN-212
7ab6679 [Lee moon soo] update selenium test
6a897a5 [Lee moon soo] Update rest-api doc
cbbd58a [Lee moon soo] update unittest
e89c9b8 [Lee moon soo] restore tutoral note
3ba37b7 [Lee moon soo] Let old version import note without error
d09e03f [Lee moon soo] enable helium only in the last result
6682908 [Lee moon soo] Remove unnecessary listener method
0f1d28f [Lee moon soo] Merge branch 'master' into ZEPPELIN-212
73b3a81 [Lee moon soo] update selenium test
e69f1a1 [Lee moon soo] update test
f12230f [Lee moon soo] Remove unnecessary newline in test
26e201a [Lee moon soo] Update testcase
b01d70f [Lee moon soo] Make helium app work
0a5b4d1 [Lee moon soo] Update HeliumApplicationFactoryTest
d8ca07f [Lee moon soo] update NotebookTest
aaf9778 [Lee moon soo] fix r test
3e43df4 [Lee moon soo] make zeppelin-web test pass
1d6fd3e [Lee moon soo] fix compile errors
0156ffc [Lee moon soo] take care angular object
804768d [Lee moon soo] Take care output streaming
57d6b2f [Lee moon soo] Render multiple results
95b6037 [Lee moon soo] Multiple results
### What is this PR for?
This PR Added "Clear output" of paragraph to the keyboard shortcut.
### What type of PR is it?
Improvement
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1686
### How should this be tested?
Click in paragraph and press Ctrl+Shift+c
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: soralee <sora0728@nflabs.com>
Closes#1686 from soralee/ZEPPELIN-1686 and squashes the following commits:
e6e8d42 [soralee] changed short key from ctrl+shift+c to ctrl+alt+l
bbd96f9 [soralee] changed short key from ctrl+shift+c to ctrl+alt+l
225d18d [soralee] changed short key from ctrl+shift+c to ctrl+alt+l
d89afa1 [soralee] Added clear output to a keyboard shortcut
### What is this PR for?
This PR removes a non-standard string prototype method `contains` that can cause potential bugs in the future maintenance.
### What type of PR is it?
Bug Fix
### Todos
* [x] - remove usage of non-standard string method `contains` in favor of standard `indexOf`
### How should this be tested?
Download as `csv / tsv` (graph view) should work as expected
Author: felizbear <ilya@nflabs.com>
Closes#1701 from felizbear/front-end-do-not-modify-protoypes-please and squashes the following commits:
ae9820e [felizbear] remove usage of non-standard string method
### What is this PR for?
Enabling to change values of multiple selectboxes witout running the paragraph
### What type of PR is it?
[Bug Fix]
### Todos
No
### What is the Jira issue?
[ZEPPELIN-1013]
### How should this be tested?
1. Create a paragraph with a selectbox via z.select(...)
2. Select any value other than currently selected
Actual result: value changes and paragraph gets executed
Expected result: value changes
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update?
No
* Is there breaking changes for older versions?
No
* Does this needs documentation?
No
Author: Mleekko <mleekko@gmail.com>
Closes#1647 from Mleekko/master and squashes the following commits:
13b65a2 [Mleekko] [ZEPPELIN-1013] Don't run paragraph on selectbox change
### What is this PR for?
Skip PhatomJS installation on `mvn package -DskipTests`
### What type of PR is it?
Improvement
### What is the Jira issue?
[ZEPPELIN-1703](https://issues.apache.org/jira/browse/ZEPPELIN-1703)
### How should this be tested?
`mvn package -DskipTests -pl zeppelin-web` and see no PhantomJS mentions in output.
`mvn package -pl zeppelin-web` and see that PhantomJS is installed\run.
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Alexander Bezzubov <bzz@apache.org>
Closes#1673 from bzz/feat/skip-phantomjs-on-mvn-skip-tests and squashes the following commits:
a5355ae [Alexander Bezzubov] ZEPPELIN-1703: skip PhantomJS on -DskipTests
### What is this PR for?
This PR is for the multi-tenant of JDBC Interpreter.
User can create a user/password for JDBC account at the [Credential page](http://zeppelin.apache.org/docs/0.7.0-SNAPSHOT/security/datasource_authorization.html).
The `Entity` of `Credential` is match with JDBC interpreter group name.
If the account for JDBC is not setted in the `Interpreter property` then use `Credential`'s.
### What type of PR is it?
Improvement
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1567
### How should this be tested?
Please refer to testMultiTenant() of JDBCInterpreterTest/
### Screenshots (if appropriate)
### Questions:
- Does the licenses files need update? no
- Is there breaking changes for older versions? no
- Does this needs documentation? no
Author: astroshim <hsshim@nflabs.com>
Closes#1539 from astroshim/jdbc-impersonation and squashes the following commits:
46fce31 [astroshim] add explanation of InterpreterGroup
7a92236 [astroshim] fix doc and remove persist value.
63f5ea7 [astroshim] Merge branch 'master' into jdbc-impersonation
267277a [astroshim] rebase
649ff6e [astroshim] rebase
872fb49 [astroshim] fix ScioInterpreterTestCase
4387a5b [astroshim] Merge branch 'master' into jdbc-impersonation
47c463f [astroshim] update doc and html
d4eb178 [astroshim] fix docs
59aa9ff [astroshim] Merge branch 'master' into jdbc-impersonation
bf61afd [astroshim] fix testcase
5c0f5d7 [astroshim] rebase
79ba25b [astroshim] Merge branch 'master' into jdbc-impersonation
1f9c2c0 [astroshim] clean redundant code
a2f5687 [astroshim] fix impersonation
9962181 [astroshim] fix InterpreterOutput of PySparkInterpreterTest case
b55aceb [astroshim] Merge branch 'master' into jdbc-impersonation
24a8226 [astroshim] fix doc
086dfda [astroshim] fix testcase
34fe0a6 [astroshim] fix code for more simple.
fee7086 [astroshim] fix build error.
a305eca [astroshim] Merge branch 'master' into jdbc-impersonation
df80741 [astroshim] documentation for credential.
df1b1dc [astroshim] rebase and entity name convention.
63d6a1c [astroshim] change thrift version to 0.9.2
6573c1c [astroshim] change variable name
f311f34 [astroshim] fix typo
722e333 [astroshim] change testcase name
9161937 [astroshim] clean code
3dafdf0 [astroshim] add testcase
373d5f1 [astroshim] pass replName to Interpreter and use credential info for jdbc auth.
### What is this PR for?
This PR adds support for the current ECMAScript standard [es6](http://www.ecma-international.org/ecma-262/6.0/) via [babel](http://babeljs.io/) ([babel-grunt](https://github.com/babel/grunt-babel) plugin)
### What type of PR is it?
Improvement
### Todos
* [x] - Add babel presets for es6 (aka es2015) and object spread operator
* [x] - Add eslint rules to lint es6 correctly
* [x] - Add `babel` task to grunt and modify `serve`, `test` and `build` tasks
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1667
### How should this be tested?
1. Run `grunt serve` and make sure it works properly (including reload on change)
2. Run `grunt test` and make sure tests pass
3. Run `grunt build` and make sure it builds and runs correctly
Author: felizbear <ilya@nflabs.com>
Closes#1639 from felizbear/frontend-es2015 and squashes the following commits:
f932e1d [felizbear] add babel task to gruntfile
b058b4f [felizbear] update eslintrc to enable linting es6
7f30ce7 [felizbear] add dependencies on grunt-babel and babel presets
### What is this PR for?
A few sentences describing the overall goals of the pull request's commits.
this patch is platform independent and should not effect Intel architecture. We are simply upgrading the version of fronend-maven-plugin, nodejs, phantomjs-launcher to versions that are supported by Power architecture as well.
### What type of PR is it?
[ Feature ]
### Todos
* [ ] - Task
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1689
### How should this be tested?
should test on x86 for any regression, highly unlikely.
OpenPOWER foundation team has already verified the patch on Power as part of Apache Bigtop project.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update?
* Is there breaking changes for older versions?
* Does this needs documentation?
Author: amir sanjar <afsanjar@gmail.com>
Closes#1666 from asanjar/master and squashes the following commits:
2f92845 [amir sanjar] ZEPPELIN-1689: enable Power architecture
### What is this PR for?
When we do the following operations, the entire notebook is transmitted back to client.
1) Insert paragraph
2) Remove paragraph
3) Update paragraph
4) Paragraph status update
5) commit paragraph
When the json becomes larger(which happens when large output is stored in the json), the time to transfer the notebook to client is directly proportional.(we can check this in chrome browser-> dev console-> select ws request-> on the right pane that opens, select frames tab and observe the length column)
And since the UI update is based on this new transmitted json, the UI seems unresponsive/laggy.
In this PR, Making the updates selective.(Not sending the complete json back to client)
### What type of PR is it?
Improvement
### Todos
NA
### What is the Jira issue?
ZEPPELIN-1653
### How should this be tested?
-In chrome browser-> dev console-> select ws request-> on the right pane that opens, select frames tab and observe *NOTE* message.
We should not see the message for the above mentioned operations except when the notebook is loaded is for first time
- We should not see *GET_NOTE* log message for above operations.
### Screenshots
NA
### Questions:
* Does the licenses files need update?No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: karuppayya <karuppayya1990@gmail.com>
Author: Karup <karuppayya@outlook.com>
Closes#1624 from karup1990/ZEPPELIN-1653 and squashes the following commits:
bbdfc9a [karuppayya] Address review comments
4cd9dcd [karuppayya] fix lookandfeel config
c99383a [Karup] Refactor code , dont broadcast note
### What is this PR for?
Currently when you're trying to search some interpreters, for example "Spark", the page shows both "Livy" and "Spark". It's because Livy contains Spark related properties such as `livy.spark.driver.cores`, `livy.spark.driver.memory` and etc etc. As an user aspect, I felt a bit uncomfortable with this.
So I added one more condition so that it can search only based on interpreter name.
### What type of PR is it?
Improvement
### What is the Jira issue?
no Jira issue for this
### How should this be tested?
Outline the steps to test the PR here.
### Screenshots (if appropriate)
- Before

- After

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: AhyoungRyu <fbdkdud93@hanmail.net>
Closes#1640 from AhyoungRyu/search-basedOn-name and squashes the following commits:
7564e1c [AhyoungRyu] Search interpreter only based on interpreter name
### What is this PR for?
The list of option (Owner, Reader and Writer) doesnt look natural, it should be from the stronger to the weakest (Owner, Writer and Reader)
### What type of PR is it?
[Improvement]
### What is the Jira issue?
* [ZEPPELIN-1681](https://issues.apache.org/jira/browse/ZEPPELIN-1681)
### Screenshots (if appropriate)
**Before**
<img width="611" alt="screen shot 2016-11-17 at 9 54 41 pm" src="https://cloud.githubusercontent.com/assets/3139557/20390528/b61f8c96-ad12-11e6-800d-2393459c217a.png">
**After**
<img width="611" alt="screen shot 2016-11-17 at 9 55 29 pm" src="https://cloud.githubusercontent.com/assets/3139557/20390537/bad101e8-ad12-11e6-8e1b-15873e6b93db.png">
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Anthony Corbacho <corbacho.anthony@gmail.com>
Closes#1651 from anthonycorbacho/fix/NotePermissionOwnerReaderWriterOrder and squashes the following commits:
f647de7 [Anthony Corbacho] Fix note permission settings order
Have recreated this from https://github.com/apache/zeppelin/pull/1322
### What is this PR for?
While running a Notebook using shell, spark, python uses same user as which zeppelin server is running. Which means these interprets have same permission on file system as zeppelin server.
IMO users should be able to impersonate themselves as a complete security system.
### What type of PR is it?
[Improvement]
### Todos
- [x] - Update doc
- [x] - FIX NPEs
- [x] - FIX CI
### What is the Jira issue?
- [ZEPPELIN-1320](https://issues.apache.org/jira/browse/ZEPPELIN-1320)
### How should this be tested?
- Enable shiro auth in shiro.ini
- Add ssh key for the same user you want to try and impersonate (say user1).
```
adduser user1
ssh-keygen
ssh user1localhost mkdir -p .ssh
cat ~/.ssh/id_rsa.pub | ssh user1localhost 'cat >> .ssh/authorized_keys'
```
- Start zeppelin server, try and run following in paragraph in a notebook
- Go to interpreter setting page, and enable "User Impersonate" in any of the interpreter (in my example its shell interpreter)
```
%sh
whoami
```
Check that it should run as new user, i.e. "user1"
### Screenshots (if appropriate)

### Questions:
- Does the licenses files need update? no
- Is there breaking changes for older versions? no
- Does this needs documentation? yes
Author: Prabhjyot Singh <prabhjyotsingh@gmail.org>
Closes#1554 from prabhjyotsingh/ZEPPELIN-1320-2 and squashes the following commits:
dc69c9d [Prabhjyot Singh] @Leemoonsoo review comment: making ZEPPELIN_SSH_COMMAND configurable
1b26cc0 [Prabhjyot Singh] add doc
5a76839 [Prabhjyot Singh] show User Impersonate only when interpreter setting is "per user" and "isolated"
02c3084 [Prabhjyot Singh] Merge remote-tracking branch 'origin/master' into ZEPPELIN-1320-2
03b2f20 [Prabhjyot Singh] use user instead of ""
0ff80ec [Prabhjyot Singh] Merge remote-tracking branch 'origin/master' into ZEPPELIN-1320-2
dd0731d [Prabhjyot Singh] fix missing test cases
aff1bf0 [Prabhjyot Singh] user should have option to run these interpreters as different user.
### What is this PR for?
This PR is for preventing double click login button.
### What type of PR is it?
Bug Fix | Improvement
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1670
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: astroshim <hsshim@nflabs.com>
Closes#1644 from astroshim/ZEPPELIN-1670 and squashes the following commits:
f32d2ae [astroshim] fix variable position
0a5e992 [astroshim] represent signing
### What is this PR for?
Importing note from github doenst work, instead you will have the following error
```
XMLHttpRequest cannot load xxxx/note.json. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true.
Origin 'http://localhost:9000' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
```
### What type of PR is it?
[Bug Fix | Hot Fix ]
### Todos
* [x] - Rework how front end get json resource.
### What is the Jira issue?
* [ZEPPELIN-1672](https://issues.apache.org/jira/browse/ZEPPELIN-1672)
### How should this be tested?
Get a [note](https://raw.githubusercontent.com/apache/zeppelin/master/notebook/2C2AUG798/note.json) from github, and try to import it.
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Anthony Corbacho <corbacho.anthony@gmail.com>
Closes#1646 from anthonycorbacho/fix/ImportNotebook and squashes the following commits:
6572748 [Anthony Corbacho] ZEPPELIN-1672 - Fix import notebook front end feature
### What is this PR for?
Downloaded csv, tsv file contains only header of table after https://github.com/apache/zeppelin/pull/1529 is merged
### What type of PR is it?
Hot Fix
### Todos
* [x] - Fix csv/tsv download
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1654
### How should this be tested?
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Lee moon soo <moon@apache.org>
Closes#1643 from Leemoonsoo/ZEPPELIN-1654 and squashes the following commits:
da08714 [Lee moon soo] Fix csv/tsv download
### What is this PR for?
After https://github.com/apache/zeppelin/pull/1529, max number of rows limitation message is not displayed.
### What type of PR is it?
Hot Fix
### Todos
* [x] - display comment of tabledata
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1668
### How should this be tested?
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Lee moon soo <moon@apache.org>
Closes#1642 from Leemoonsoo/ZEPPELIN-1668 and squashes the following commits:
2d8d6ff [Lee moon soo] Display comment of table data
### What is this PR for?
Built-in chart doesn't render and resize height doesn't work
### What type of PR is it?
Hot fix
### Todos
* [x] - Fix problem
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1664
### How should this be tested?
run multiple times and see if graph is rendered correctly.
```
%spark
Thread.sleep(1000)
println(s"""%table key\tvalue\nsun\t50\nmoon\t20\n""")
```
try change height of paragraph and see if graph is updated
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Lee moon soo <moon@apache.org>
Closes#1641 from Leemoonsoo/ZEPPELIN-1664 and squashes the following commits:
6d1e2b6 [Lee moon soo] refresh graph when paragraph height change. render correctly after paragraph type change
### What is this PR for?
Make spark web UI accesible from interpreters page
### What type of PR is it?
Improvement
### Todos
NA
### What is the Jira issue?
ZEPPELIN-1643
### How should this be tested?
Start sparkcontext.
Goto interpreters page. Corresponding to the spark interpreter used in notebook, there will be *spark ui* button.
Clicking the button should open a new tab with the application's spark web UI.
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? NA
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: karuppayya <karuppayya1990@gmail.com>
Author: Karup <karuppayya@outlook.com>
Closes#1613 from karup1990/ZEPPELIN-1643 and squashes the following commits:
29e9812 [karuppayya] Fix checkstyle
350d665 [karuppayya] Fix coding err
42dde76 [Karup] Fix typo
5cfed2a [karuppayya] Fix test failure
55c45c9 [karuppayya] Address feedback
4d97196 [karuppayya] Remove comments
a1304a2 [karuppayya] Change to make spark web UI accesible from interpreters page
### What is this PR for?
Filter is cleared whenever each interpreter setting is updated.
it's sometimes annoying if an user want to debug interpreter settings (I attached GIF)
### What type of PR is it?
[Bug Fix]
### Todos
* [ ] - Task
### What is the Jira issue?
[ZEPPELIN-1659](https://issues.apache.org/jira/browse/ZEPPELIN-1659)
### How should this be tested?
1. insert interpreter filter
2. update a interpreter setting
3. check whether the filter is cleared or not
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO
Author: 1ambda <1amb4a@gmail.com>
Closes#1629 from 1ambda/fix/clear-filter-when-setting-updated and squashes the following commits:
72bac06 [1ambda] fix: DON'T reset filter
### What is this PR for?
Now users can rename a note from the main page! This new feature will improve UX.
I divided [ZEPPELIN-1598](https://issues.apache.org/jira/browse/ZEPPELIN-1598) into sub-tasks since renaming folder gonna be huge. I will open PR for [ZEPPELIN-1629](https://issues.apache.org/jira/browse/ZEPPELIN-1629) after merging this PR.
By the way, I have a question! Does a `writer` can rename a note? Currently, only an owner can rename a note.
### What type of PR is it?
[Feature]
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1628
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Jun <i2r.jun@gmail.com>
Closes#1609 from tae-jun/ZEPPELIN-1628 and squashes the following commits:
7d3f7bb [Jun] Fix factory/noteList.js test errors.
54bae60 [Jun] Add rename modal input validation
3eadcd8 [Jun] Add folder id
fb8b35f [Jun] Correct indent to pass style check
c019b9e [Jun] Rename a note from the main page
### What is this PR for?
This PR adds support for formatting math formula formatting in %html display system using MathJax library.
### What type of PR is it?
Feature
### Todos
* [x] - Format math formula with MathJax library
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-777
### How should this be tested?
try run following codes.
```
%md
When \\(a \\ne 0\\), there are two solutions to \\(ax^2 + bx + c = 0\\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
```
Note MathJax works better with `markdown.parser.type` property set `pegdown`, in markdown interpreter. With default markdown4j parser, some formula is not well displayed. (for example, ax^2) I think this will not be a big problem because of we'll remove markdown4j https://github.com/apache/zeppelin/pull/1594
```
%sh echo -e "%html \$\$a = b\$\$"
```
```
%spark println("%html $$b = c$$")
```
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? yes
* Is there breaking changes for older versions? no
* Does this needs documentation? yes
Author: Lee moon soo <moon@apache.org>
Closes#1606 from Leemoonsoo/ZEPPELIN-777 and squashes the following commits:
af8e079 [Lee moon soo] Package MathJax resources
2afedde [Lee moon soo] Fix typo
dd02bec [Lee moon soo] Add doc for mathmetical expression
174d7ad [Lee moon soo] Add license
bb762c3 [Lee moon soo] Format formula using MathJax
### What is this PR for?
As one of task of https://issues.apache.org/jira/browse/ZEPPELIN-1003, refactoring visualization code in the front-end side.
This patch try to abstract visualization in OOP style, and want to provide the same API for Helium package in the future.
Please feel free to leave any feedback about the implementation.
### What type of PR is it?
Refactoring
### Todos
- [x] - Abstract visualization
### What is the Jira issue?
this resolves part of https://issues.apache.org/jira/browse/ZEPPELIN-1003
### Questions:
- Does the licenses files need update? no
- Is there breaking changes for older versions? no
- Does this needs documentation? no
Author: Lee moon soo <moon@apache.org>
Closes#1529 from Leemoonsoo/refactoring_viz and squashes the following commits:
40f1ce8 [Lee moon soo] Fix style
bf6505b [Lee moon soo] Render visualization more efficiently
7517447 [Lee moon soo] Load zeppelin.Transformation before zeppelin.PivotTransformation on test
9367b78 [Lee moon soo] Cleanup
4e84467 [Lee moon soo] convert scatter chart
819c262 [Lee moon soo] Convert linechart
9e6e8db [Lee moon soo] Convert areachart
4d27d33 [Lee moon soo] Convert piechart
5c8d4e3 [Lee moon soo] Handle resize correclty.
c76a92b [Lee moon soo] refactor barchart
06c3e78 [Lee moon soo] Table output
80e0376 [Lee moon soo] Abstract built-in visualization via class
### What is this PR for?
- Enables removing note and clear all paragraph's output from Zeppelin main page.
- Add rest api for clearing all paragraph output
Next possible improvement can be removing notes in folder level and rename folder.
### What type of PR is it?
Improvement
### Todos
* [x] - Merge #1567 and apply security to `clearAllParagraphOutput` rest api method
### What is the Jira issue?
[ZEPPELIN-1564](https://issues.apache.org/jira/browse/ZEPPELIN-1564)
### Screenshots (if appropriate)

### Questions:
- Does the licenses files need update? no
- Is there breaking changes for older versions? no
- Does this needs documentation? yes
Author: Mina Lee <minalee@apache.org>
Closes#1565 from minahlee/ZEPPELIN-1564 and squashes the following commits:
749aebe [Mina Lee] Merge branch 'master' of https://github.com/apache/zeppelin into ZEPPELIN-1564
1393ee9 [Mina Lee] Rename class name from UnauthorizedException to ForbiddenException Update clear output rest api doc response code
2ee452e [Mina Lee] Add auth check before clearing all paragraph
fb7e6ae [Mina Lee] Merge branch 'master' of https://github.com/apache/zeppelin into ZEPPELIN-1564
f349dbf [Mina Lee] Change post to put
7eb3521 [Mina Lee] Give writer permission to clear output
dea3ef6 [Mina Lee] Remove unused import
d66600c [Mina Lee] Add rest api endpoint for clear paragraph result to document
3d19141 [Mina Lee] Add rest api for clear all paragraph result and add test
98d7604 [Mina Lee] Add clearAllParagraphOutput unit test
4adddb4 [Mina Lee] Clear all paragraphs and remove note from main page
### What is this PR for?
Current dynamic forms elements in zeppelin-web have no ordering. The ordering of the dynamic elements is random which can be annoying when you have many of them.
The root cause is that the angular frontend uses "for key in object" pattern with no sorting. I have added sorting.
### What type of PR is it?
Improvement
### What is the Jira issue?
[ZEPPELIN-1593](https://issues.apache.org/jira/browse/ZEPPELIN-1593)
### How should this be tested?
Dynamic forms should now have fields sorted by name.
```
%md
${a=1}
${b=1}
${c=1}
${d=1}
${bb=1}
${ba=1}
```
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: John Trengrove <john.trengrove@servian.com.au>
Closes#1572 from trengrj/sort-form and squashes the following commits:
7ba9a3b [John Trengrove] [ZEPPELIN-1593] Enforce sorting on dynamic form elements
### What is this PR for?
Currently, if you enabled for shiro then
not showing notebook list on navbar.
(If you refresh, it's well viewwing.)
i resolve this problem.
### What type of PR is it?
Bug Fix
### Todos
- [x] fixed a bug ( navbar.controller.js)
- [x] added testcase
### How should this be tested?
1. endabled shiro (per user login)
2. login.
3. on click to notebook menu on navbar.
### Screenshots (if appropriate)
#### before

#### resolve after (on this pr)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: CloverHearts <cloverheartsdev@gmail.com>
Closes#1586 from cloverhearts/ZEPPELIN-NOTEBOOKLIST-SHIRO and squashes the following commits:
1a9aec9 [CloverHearts] remove console log
0378d76 [CloverHearts] fixed test case throws exception
72ff950 [CloverHearts] fixed notebook list count testcase in AuthIT
27451a4 [CloverHearts] bug fixed can't load for notebook list when enabled shiro
### What is this PR for?
This handles setting the default interpreter on creating a note through the zeppelin UI.
### What type of PR is it?
Feature
### Todos
NA
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1061
### How should this be tested?
- Go to the 'Create Note' dialog and provide the name with the default interpreter selected.After clicking on the Create button, the selected interpreter should be shown properly in the interpreter binding section.
- If there is no interpreter selected, then the system default will be used.
### Screenshots (if appropriate)

### Questions:
- Does the licenses files need update? No
- Is there breaking changes for older versions? No
- Does this needs documentation? No
Author: Kavin <kavin.kumar@imaginea.com>
Closes#1520 from kavinkumarks/zeppelin-1061-create-note-default-interpreter and squashes the following commits:
adfcd85 [Kavin] Fixing the new test case failure with recent changes from master.
b086f77 [Kavin] Reset the dropdown selected value for the previous action.
a88a1d2 [Kavin] Added option to select the default interpreter on creating a note and added websocket APIs to get interpreter settings for the former.Added test cases too.
### What is this PR for?
This PR is for usability of restarting interpreter.
### What type of PR is it?
Improvement
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1306
### How should this be tested?
You can restart interpreter on the interpreter binding page on a note.
and can only restart `scoped` and `isolated` interpreter.
Please refer to screen shot.
### Screenshots (if appropriate)

### Questions:
- Does the licenses files need update? no
- Is there breaking changes for older versions? no
- Does this needs documentation? no
Author: astroshim <hsshim@nflabs.com>
Closes#1302 from astroshim/ZEPPELIN-1306 and squashes the following commits:
186a361 [astroshim] rollback noteId check null
f38231c [astroshim] noteId Preconditions
af8a2d8 [astroshim] modify null check to Preconditions
72f3e4f [astroshim] fix testcase.
4dda64b [astroshim] rebase
a626188 [astroshim] rebase and fixing testcase
fc1c819 [astroshim] Merge branch 'ZEPPELIN-1306' of https://github.com/astroshim/zeppelin into ZEPPELIN-1306
499aa6b [astroshim] add PySparkInterpreter testcase
e8e0c17 [astroshim] rebase
36f5642 [astroshim] add InterpreterForNote testcase
fa45bb5 [astroshim] remove debug log
5c4b32a [astroshim] Merge branch 'master' into ZEPPELIN-1306
4c4339f [astroshim] Merge branch 'master' into ZEPPELIN-1306
72a2259 [astroshim] add testcase and fix the doc.
3127154 [astroshim] Merge branch 'master' into ZEPPELIN-1306
0453402 [astroshim] Merge branch 'master' into ZEPPELIN-1306
ecfa7fb [astroshim] remove dud code.
78fdd74 [astroshim] update alert message.
aa30b39 [astroshim] inactive link when interpreter is not selected.
123882d [astroshim] change button to icon
a980500 [astroshim] update html
f9ea386 [astroshim] fix code style
2cea65b [astroshim] change method name
50c6acf [astroshim] delete unnecessary code
29966a0 [astroshim] change UI and restart interpreter process
322d427 [astroshim] Merge branch 'master' into ZEPPELIN-1306
e698e6f [astroshim] change method name
03bdd05 [astroshim] Merge branch 'master' into ZEPPELIN-1306
4dbe05a [astroshim] change argument string to boolean
439b361 [astroshim] fix js code style.
5ad4503 [astroshim] Interpreter restarts on a note.
### What is this PR for?
Overriding graph message 'No data available' to 'Invalid Data, check graph settings'
### What type of PR is it?
Improvement
### Todos
* For Table and Map in graphs 'No data available' message is not shown, Maybe we want to implement this.
### What is the Jira issue?
[ZEPPELIN-675] "No data available" in invalid graph types for sql queries
### How should this be tested?
Step 1: Run a sql query which will return 1 column or no records.
Step 2: Choose pie chart / bar chart
Verification: Earlier the message is "No data available", It should have been changed to 'Invalid Data, check graph settings'
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? NO
* Is there breaking changes for older versions? NO
* Does this needs documentation? NO
Author: Naveen Subramanian <naveen.subramanian@imaginea.com>
Closes#1510 from snaveenp/ZEPPELIN-675-NoDataAvailable-in-graph and squashes the following commits:
75494a1 [Naveen Subramanian] Added custom message for no data in graph
### What is this PR for?
This PR enables edit on double click for markdown/angular paragraph. Users can change `editOnDblClick` field to be `false` by editting `interpreter/md/interpreter-setting.json` or `conf/interpreter.json`. In the same context, users can set other type paragraphs to be editable on double click by setting `editOnDblClick` to be true.
This PR also fixes bug that syntax highlight doesn't work on pasted code.
### What type of PR is it?
Feature
### Todos
* [x] Create test
* [x] Update docs
### What is the Jira issue?
[ZEPPELIN-1566](https://issues.apache.org/jira/browse/ZEPPELIN-1566)
### How should this be tested?
1. Create new markdown interpreter
2. Create notebook and run markdown paragraph
3. Double click markdown paragraph to edit
### Screenshots (if appropriate)
**Edit on double click and hide editor on paragraph run**

**Syntax highlight on paste**
Before

After

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? yes
Author: Mina Lee <minalee@apache.org>
Closes#1540 from minahlee/ZEPPELIN-1566 and squashes the following commits:
89ea628 [Mina Lee] Remove redundant code
4ffc446 [Mina Lee] Enable focus first paragraph on note reload
c566706 [Mina Lee] Check null condition of editor setting and return default setting
38d5e35 [Mina Lee] Update document about how to make paragraph editable on double click
b42039e [Mina Lee] Add integration test for editOnDblClick
0a26207 [Mina Lee] Add editOnDblClick field in interpreter-setting.json
93abe6a [Mina Lee] Make paragraph editable on doubleclick if editOnDblClick set true in interpreter-setting.json
359dc0b [Mina Lee] Split getAndSetEditorSetting method into getEditorSetting and setEditorLanguage method
### What is this PR for?
The idea behind this feature is to bring flexibility to the user to let him configure his repo via UI without restarting Apache Zeppelin.
This is flexible enough to handle most of the basic needs, but more complex case can be added in the future. I will not implement all NotebookRepo, this should be done in different PR since it will depend on special needs. I will just provide a simple example with VFS notebook repo.
***NB***: this scope of the PR doesn't include save change in the configuration file of zeppelin as well as implementation of every notebook repo, git, s3 etcetc, this will be added later if needed.
### What type of PR is it?
* **Improvement**
### Todos
* [x] - Implement backend.
* [x] - Implement frontend.
* [x] - Implement LocalVFS directory change as exemple.
### What is the Jira issue?
* [ZEPPELIN-1575](https://issues.apache.org/jira/browse/ZEPPELIN-1575)
### How should this be tested?
Go to notebook repo setting page, edit the notebook path and save.
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? NO
* Is there breaking changes for older versions? NO
* Does this needs documentation? YES
Author: Anthony Corbacho <corbacho.anthony@gmail.com>
Author: Damien CORNEAU <corneadoug@gmail.com>
Closes#1553 from anthonycorbacho/feat/NotebookRepoSettings and squashes the following commits:
6d63832 [Anthony Corbacho] Fix style and rebase mistake...
6f17b18 [Anthony Corbacho] Add tests :: API and REST API
23ad18e [Anthony Corbacho] Rename NotebookRepoSettings to NotebookRepoSettingsInfo
42fd3b5 [Anthony Corbacho] Apply broadcasting note list after sucessful update for notebook repo
7fc1f37 [Anthony Corbacho] Change textarea size to 100 row
357b659 [Anthony Corbacho] Fix ASF header
d49bfe1 [Anthony Corbacho] Fix style
517ebc8 [Anthony Corbacho] Fix style
dc7fc50 [Anthony Corbacho] Fix indentation
0b4b74a [Anthony Corbacho] Add exemple of how to change local notebook repo FS
2d67bc8 [Anthony Corbacho] Added method from notebook repo interface
5a13e62 [Anthony Corbacho] Added 2 new methos in notebookRepoSync, exposed get and update notebook repo
8e890d3 [Anthony Corbacho] Add new wrapper for notebook repo PLUS settings
53346d7 [Anthony Corbacho] Add new methods in notebookRepo :: get and set settings in notebook
23912ce [Anthony Corbacho] Added new wrapper class
4d745ab [Damien CORNEAU] Improve ux
05a64de [Damien CORNEAU] Improve edit repo
9c1f999 [Damien CORNEAU] Implement edit
6a97512 [Damien CORNEAU] Get Repos from api
76479b3 [Damien CORNEAU] Change presentation of notebook settings
8075b04 [Damien CORNEAU] Render mocked list of notebook repo settings
054d2aa [Damien CORNEAU] Base structure for notebook repo ui
30d29cd [Anthony Corbacho] Update zeppelin server and add NotebookRepo rest api to the singleton
f7c7bf2 [Anthony Corbacho] Update method :: updateRepoSettings to create NotebookRepoSettingsRequest with Empty static object instead of null
a4d9749 [Anthony Corbacho] Added utility class for notebook re po payload deserialization
efe4c34 [Anthony Corbacho] Add new Rest api endpoint for notebook Repo settings
### What is this PR for?
This PR fixes wrong written NotebookID to NoteID.
### What type of PR is it?
[Improvement]
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1549
### Questions:
* Does the licenses files need update? No.
* Is there breaking changes for older versions? No.
* Does this needs documentation? No
Author: hyonzin <hyeonjin507@gmail.com>
Author: 정현진 <hyeonjin507@gmail.com>
Author: Mina Lee <minalee@apache.org>
Closes#1518 from hyonzin/ZEPPELIN-1549 and squashes the following commits:
2c5d461 [hyonzin] fix pullNoteID to pullNoteId
f843abd [hyonzin] Fix missed line
22aecb3 [hyonzin] Merge branch 'master' of https://github.com/apache/zeppelin into ZEPPELIN-1549
ac03666 [정현진] Merge pull request #1 from minahlee/ZEPPELIN-1549
8b3fffd [Mina Lee] Change notebook to note and fix indentation
000605f [hyonzin] Change clonedNotebookId to clonedNoteId
496695c [hyonzin] Change noteID to noteId
1e87463 [hyonzin] Remove tab indent
5647d37 [hyonzin] Rebase and solve conflicts
09bacd8 [hyonzin] Fix more lines unchanged
070bc2d [hyonzin] fix more in ZeppelinRestApiTest.java
24822a3 [hyonzin] Fix more code not changed (notebookIndex to noteSearchService)
4b4e1e8 [hyonzin] Fix detail (function's name) & Change some placeholder
429203d [hyonzin] Fix details & convention to camel
5fa270d [hyonzin] pull upstream master & fix some details
294bea5 [hyonzin] Fix some wrong written term: Notebook -> Note
cc0d315 [hyonzin] Change NotebookID variable name to NoteID
### What is this PR for?
Enabling each user to run same interpreter.
### What type of PR is it?
[Improvement]
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1210
### How should this be tested?
1. Enable shiro to use authentication mode
1. Check `per user` in your interpreter tab
1. Run different paragraphs with different users
1. Run `%spark sc.version`, you will see the two `res0: ...` in your paragraphs
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: CloverHearts <cloverheartsdev@gmail.com>
Author: Jongyoul Lee <jongyoul@gmail.com>
Closes#1265 from jongyoul/ZEPPELIN-1210 and squashes the following commits:
48a0d8e [Jongyoul Lee] Fixed ZEPPELIN-1542 Fixed flaky test
e84703d [Jongyoul Lee] Fixed ZEPPELIN-1542
ad80951 [Jongyoul Lee] Fixed some wrong logic of getInterpreterInstanceKey
cee39f4 [Jongyoul Lee] Fixed to pass shiro information to InterpreterFactory from ZeppelinServer
5e7da34 [Jongyoul Lee] Changed instanceKey and processKey for dealing with new UI
d201950 [CloverHearts] fix eqeqeq issue for frontweb
b18bff4 [CloverHearts] implement frontend for interpreter per user mode and misc mode
1f64e52 [CloverHearts] change default value for pernote and peruser
787a366 [CloverHearts] change Back-end test cases and member type (perNote, perUser)
8586e1f [CloverHearts] change ui for interpreter running Per x mode
0b5d671 [Jongyoul Lee] Fixed the style
960bde1 [Jongyoul Lee] Removed SecurityUtils.getPrincipal Added fromMessage.principal to get right user
01c7cf1 [Jongyoul Lee] Fixed NPE while testing ZeppelinSparkClusterTest
1fb50ab [Jongyoul Lee] Fixed NPE while testing ZeppelinSparkClusterTest
d1c4344 [Jongyoul Lee] Fixed getEditorSetting for having users' info
12a27db [Jongyoul Lee] Fixed test after rebase
510942b [Jongyoul Lee] Fixed test after rebase
cb66946 [Jongyoul Lee] Fixed test after rebase
18b39bd [Jongyoul Lee] Fixed test after rebase
daa634f [Jongyoul Lee] Fixed some tests after rebase
ed558be [Jongyoul Lee] Fixed some tests after rebase
fa7fccb [Jongyoul Lee] Fixed destroying process of remoteInterpreterProcess
0a73241 [Jongyoul Lee] Fixed conflict while rebasing.
df423d3 [Jongyoul Lee] Fixed NotebookRestApiTest
b151366 [Jongyoul Lee] Fixed some codes after rebase
a32afd7 [Jongyoul Lee] Fixed some tests
7b7eb78 [Jongyoul Lee] Fixed some tests
47cc668 [Jongyoul Lee] Fixed tests to use AuthenticationInfo
012cf99 [Jongyoul Lee] Fixed some mismatch after rebase
9a03d40 [Jongyoul Lee] Reverted some value to default ones
8589545 [Jongyoul Lee] Added option in UI
ccbedc1 [Jongyoul Lee] WIP
94dfed2 [Jongyoul Lee] WIP
6480d1d [Jongyoul Lee] resolved conflicts
### What is this PR for?
Currently, if you have a Notebook large number of,
There is a sharp decrease in performance of the Code editor.
The number and Paragraph creation of the Notebook does not have a relationship.
We are should always use the Code editor of the same performance.
I had to print a Notebook list only if there is a request.
There was quite a lot of performance improvements.
### What type of PR is it?
Improvement
### Todos
- [x] - change Notebook list render logic
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1559https://issues.apache.org/jira/browse/ZEPPELIN-1513
### How should this be tested?
1. Create a notebook over 1000. (tested 10,000)
I've used script on this. (important! please, backup for notebooks directory.)
```
#/bin/bash
idx="0"
while [ $idx -lt 1000 ] # notebooks count 1000
do
mkdir $idx
echo """
{
\"paragraphs\": [
{
\"text\": \"fsdkljfowiejfowejfoiwefiowejfiojlkdsjfklsdjflkjsdflkjwlkjefewf\",
\"dateUpdated\": \"Oct 13, 2016 5:02:44 PM\",
\"config\": {
\"colWidth\": 12.0,
\"graph\": {
\"mode\": \"table\",
\"height\": 300.0,
\"optionOpen\": false,
\"keys\": [],
\"values\": [],
\"groups\": [],
\"scatter\": {},
\"map\": {
\"baseMapType\": \"Streets\",
\"isOnline\": true,
\"pinCols\": []
}
},
\"enabled\": true,
\"editorMode\": \"ace/mode/scala\"
},
\"settings\": {
\"params\": {},
\"forms\": {}
},
\"apps\": [],
\"jobName\": \"paragraph_1476345687682_-1459653828\",
\"id\": \"20161013-170127_68316618\",
\"dateCreated\": \"Oct 13, 2016 5:01:27 PM\",
\"status\": \"READY\",
\"progressUpdateIntervalMs\": 500
}
],
\"name\": \""${idx}"\",
\"id\": \""${idx}"\",
\"angularObjects\": {
\"2BZSC9D3G:shared_process\": [],
\"2BXGWF5TF:shared_process\": [],
\"2BYKTADMA:shared_process\": [],
\"2BYFT9HTZ:shared_process\": [],
\"2BXDTJMED:shared_process\": [],
\"2BZHPZ6NS:shared_process\": [],
\"2BYKRWYB3:shared_process\": [],
\"2BZH2UAT4:shared_process\": [],
\"2BZ38J35G:shared_process\": [],
\"2BXJ2X464:shared_process\": [],
\"2BYQ57ED9:shared_process\": [],
\"2BXDSA2SN:shared_process\": [],
\"2BWZCTD2B:shared_process\": [],
\"2BWT81MNU:shared_process\": [],
\"2BWA7ZTRD:shared_process\": [],
\"2BXW6X5KN:shared_process\": [],
\"2BVWDQPXH:shared_process\": [],
\"2BZGAF8KG:shared_process\": []
},
\"config\": {},
\"info\": {}
}
""" > $idx/note.json
idx=$[$idx+1]
done
```
2. zeppelin restart or refresh notebook.
3. Try coding in any notebook. (fast)
### Screenshots (if appropriate)
#### before ( 5000 notebooks)

#### after ( 5000 notebooks)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: CloverHearts <cloverheartsdev@gmail.com>
Closes#1533 from cloverhearts/ZEPPELIN-1559-Notebook-broadcast-opti and squashes the following commits:
bd58102 [CloverHearts] id Delete unused for navbar
14e88bb [CloverHearts] selectively modified to render the Notebook list.
### What is this PR for?
According to https://developers.arcgis.com/terms/ and and http://www.esri.com/legal/software-license, current map visualization depends on an online service that has incompatible restrictions to Apache 2 license. Please see https://github.com/apache/zeppelin/pull/1210#issuecomment-252484382
Possible alternative way is explained [here](https://github.com/apache/zeppelin/pull/1210#issuecomment-252763598).
I'm very sad to remove this very good contribution. So please anyone review the license and comment here if you have other opinions, or other way around.
### What type of PR is it?
[Task]
### Todos
* [x] - remove implementation from source tree
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1532
### Questions:
* Does the licenses files need update? yes
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Lee moon soo <moon@apache.org>
Closes#1501 from Leemoonsoo/ZEPPELIN-1532 and squashes the following commits:
b5ad91a [Lee moon soo] Remove map visualization
dad81c4 [Lee moon soo] Remove map visualization from source tree
### What is this PR for?
fixed 'add from URL' button and disable backdrop function.
### What type of PR is it?
Bug Fix
### Todos
None
### What is the Jira issue?
[ZEPPELIN-1550](https://issues.apache.org/jira/browse/ZEPPELIN-1550)
### How should this be tested?
click 'Import note' -> click 'Add from URL' -> click 'x' button -> open the dialog again -> it shows the URL page not the initial page.
### Screenshots (if appropriate)
- before

- after

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Yunho Maeng <yunho.maeng.dc@gmail.com>
Closes#1523 from yunho0130/ZEPPELIN-1550 and squashes the following commits:
a045928 [Yunho Maeng] fixed 'add from URL' button and disable backdrop fuction when user use modal window
### What is this PR for?
Last profile of CI test fails after #1461. This PR fixes it.
```
Tests run: 9, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 110.883 sec <<< FAILURE! - in org.apache.zeppelin.integration.ParagraphActionsIT
testWidth(org.apache.zeppelin.integration.ParagraphActionsIT) Time elapsed: 20.055 sec <<< FAILURE!
java.lang.AssertionError: New Width is : 4
Expected: <true>
but: was <false>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.rules.ErrorCollector$1.call(ErrorCollector.java:65)
at org.junit.rules.ErrorCollector.checkSucceeds(ErrorCollector.java:78)
at org.junit.rules.ErrorCollector.checkThat(ErrorCollector.java:63)
at org.apache.zeppelin.integration.ParagraphActionsIT.testWidth(ParagraphActionsIT.java:314)
testWidth(org.apache.zeppelin.integration.ParagraphActionsIT) Time elapsed: 20.056 sec <<< FAILURE!
java.lang.AssertionError: New Width is : 8
Expected: <true>
but: was <false>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.rules.ErrorCollector$1.call(ErrorCollector.java:65)
at org.junit.rules.ErrorCollector.checkSucceeds(ErrorCollector.java:78)
at org.junit.rules.ErrorCollector.checkThat(ErrorCollector.java:63)
at org.apache.zeppelin.integration.ParagraphActionsIT.testWidth(ParagraphActionsIT.java:314)
```
### What type of PR is it?
Test fix
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Mina Lee <minalee@apache.org>
Closes#1504 from minahlee/fix/testWidth and squashes the following commits:
410bb55 [Mina Lee] Fix testWidth selnium test
### What is this PR for?
When using Zeppelin behind corporate firewall, sometimes the dependencies download just fails silently. This PR has 2 objectives:
* add proxy credentials information for dependencies repo
* raise clear error message in case of dependencies download failure
There are 3 commits.
The first one add extra inputs in the form for adding new repository

The second commit fixes some issues and display a clear and explicit error message when download of dependencies fail.
Before that, when the download fails, we can see the below behaviour

* the error message is displayed twice because the call twice the method `checkDownloadingDependencies();`. One in the success callback of:
```javascript
$scope.updateInterpreterSetting = function(form, settingId) {
...
$http.put(baseUrlSrv.getRestApiBase() + '/interpreter/setting/' + settingId, request)
.success(function(data, status, headers, config) {
$scope.interpreterSettings[index] = data.body;
removeTMPSettings(index);
thisConfirm.close();
checkDownloadingDependencies();
$route.reload();
})
.error(function(data, status, headers, config) {
...
};
```
Another call is inside success callback of `getInterpreterSettings()`
```javascript
var getInterpreterSettings = function() {
$http.get(baseUrlSrv.getRestApiBase() + '/interpreter/setting')
.success(function(data, status, headers, config) {
$scope.interpreterSettings = data.body;
checkDownloadingDependencies();
}).error(function(data, status, headers, config) {
....
```
The problem is that `$route.reload();` in the success callback of `updateInterpreterSetting()` will trigger `init()` then `getInterpreterSettings()` so `checkDownloadingDependencies()` is called twice.
I remove the call to `checkDownloadingDependencies()` from success callback of `updateInterpreterSetting()`
The second modification is on class `DependencyResolver`. In the screen capture above, we get a **cryptic** NullPointerException coming from `DefaultRepositorySystem`. I now catch this NPE to wrap it into a more sensible and clearer exception:
```java
public List<ArtifactResult> getArtifactsWithDep(String dependency,
Collection<String> excludes) throws RepositoryException {
Artifact artifact = new DefaultArtifact(dependency);
DependencyFilter classpathFilter = DependencyFilterUtils.classpathFilter(JavaScopes.COMPILE);
PatternExclusionsDependencyFilter exclusionFilter =
new PatternExclusionsDependencyFilter(excludes);
CollectRequest collectRequest = new CollectRequest();
collectRequest.setRoot(new Dependency(artifact, JavaScopes.COMPILE));
synchronized (repos) {
for (RemoteRepository repo : repos) {
collectRequest.addRepository(repo);
}
}
DependencyRequest dependencyRequest = new DependencyRequest(collectRequest,
DependencyFilterUtils.andFilter(exclusionFilter, classpathFilter));
//Catch NPE thrown by aether and give a proper error message
try {
return system.resolveDependencies(session, dependencyRequest).getArtifactResults();
} catch (NullPointerException ex) {
throw new RepositoryException(String.format("Cannot fetch dependencies for %s", dependency));
}
}
```
The result is much more cleaner

The last commit is just doc update

### What type of PR is it?
[Improvement]
### Todos
* [ ] - Code Review
* [ ] - Simple test with no Internet connection
* [ ] - Test within a corporate firewall env with a third-party dependency, requiring download
### What is the Jira issue?
**[ZEPPELIN-1376]**
### How should this be tested?
##### Simple test
* `git fetch origin pull/1369/head:WebProxy`
* `git checkout WebProxy`
* `mvn clean package -DskipTests`
* `bin/zeppelin-daemon.sh restart`
* disconnect from the Internet (pull out the cable, shutdown wifi ...)
* add a random dependency to the Spark interpreter (take `info.archinnov:achilles-core:4.2.2` for example)
* validate the change, you should see an error popup on the top-right corner saying that Zeppelin cannot download the dependency
##### Corporate firewall test
* follow the steps above for simple test
* create a new repository (see how to **[here]**) and set the proxy information
* retry the steps above to ensure that the download is successful
### Screenshots (if appropriate)
See above
### Questions:
* Does the licenses files need update? --> **NO**
* Is there breaking changes for older versions? --> **NO**
* Does this needs documentation? --> **YES, DONE**
[ZEPPELIN-1376]: https://issues.apache.org/jira/browse/ZEPPELIN-1376
[here]: http://localhost:4000/manual/dependencymanagement.html
Author: DuyHai DOAN <doanduyhai@gmail.com>
Author: doanduyhai <doanduyhai@apache.org>
Closes#1369 from doanduyhai/ZEPPELIN-1376 and squashes the following commits:
b8d44e7 [doanduyhai] [ZEPPELIN-1376] Improve error popup display
177fbd3 [DuyHai DOAN] [ZEPPELIN-1376] Fixes JS bug to display error popup for other interpreters
9f76ef4 [DuyHai DOAN] [ZEPPELIN-1376] Do not repeat the same error popup multiple times
b264193 [DuyHai DOAN] [ZEPPELIN-1376] Add unit test and fix impl for DependencyResolver to catch NPE
1913a0a [DuyHai DOAN] [ZEPPELIN-1376] Update documentation
f01be9b [DuyHai DOAN] [ZEPPELIN-1376] Raise clear error message in case of dependencies download failure
6f2b6f8 [DuyHai DOAN] [ZEPPELIN-1376] Add proxy credentials information for dependencies repo
### What is this PR for?
A dependency update of grunt-cache-bust is breaking the build.
https://github.com/hollandben/grunt-cache-bust/issues/204
So fixing the dependency version
### What type of PR is it?
Hot Fix
### Screenshot (before)

### How should this be tested?
Clean your repo, and do mvn package in zeppelin-web
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Damien CORNEAU <corneadoug@gmail.com>
Closes#1491 from corneadoug/fix/cacheBust and squashes the following commits:
81e26a5 [Damien CORNEAU] Fix version of cachebust
### What is this PR for?
This is some refactoring of zeppelin-web to apply the IIFE as stated in the Good Practice Guide #1 (https://zeppelin.apache.org/contribution/zeppelinweb/goodPracticeGuide01.html)
### What type of PR is it?
Refactoring
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1496
### How should this be tested?
Run The webapp, and go around the page, things should work like usual.
But overall, just need to check that there is no type or parameter mismatch during the refactoring process (controller to controller, params in $inject etc...)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Damien CORNEAU <corneadoug@gmail.com>
Closes#1469 from corneadoug/ZEPPELIN-1496 and squashes the following commits:
966cb27 [Damien CORNEAU] refactor components controllers
1807cf6 [Damien CORNEAU] Refactor components directives
0055191 [Damien CORNEAU] Refactor components service and factory
f86adb4 [Damien CORNEAU] Finish refactoring of App
409c65c [Damien CORNEAU] IIFE refactoring of job page
4c45e08 [Damien CORNEAU] Refactor for IIFE credential, home and interpreter controller
7e88eef [Damien CORNEAU] Add congiguration.controller.js
6adb522 [Damien CORNEAU] Move use strict outside IFFE
ffba0f3 [Damien CORNEAU] Add IIFE to app.controller.js