Commit graph

910 commits

Author SHA1 Message Date
Lee moon soo
850fd81a51 [ZEPPELIN-212] Multiple paragraph results
### 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)
![multipleout](https://cloud.githubusercontent.com/assets/1540981/20465902/23379948-af1d-11e6-85cf-4d70597fb94e.gif)

### 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
2016-11-30 17:23:57 -08:00
soralee
a459c02494 [ZEPPELIN-1686] Added clear output to keyboard shortcut
### 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)
![screenshot from 2016-11-27 06-29-27](https://cloud.githubusercontent.com/assets/8110458/20644011/e8d8f370-b46a-11e6-83cd-2d2fffc10a77.png)

### 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
2016-11-30 20:12:29 +09:00
felizbear
97cdfa987e remove usage of non-standard string method
### 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
2016-11-30 12:36:55 +09:00
Mleekko
6a2a341b0c [ZEPPELIN-1013] Don't run paragraph on selectbox change
### 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
2016-11-29 08:06:22 -08:00
Sangwoo Lee
a13d05a2df Fix filter icon not displaying problem
### What is this PR for?
Filter icon is not displayed properly due to the css font-family order.

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

### Todos

### What is the Jira issue?

### How should this be tested?
See filter input box in the home page or navbar.

### Screenshots (if appropriate)
[Before]
![before](https://cloud.githubusercontent.com/assets/17305893/20638381/8ee71fb2-b3e9-11e6-9604-4344239d65c3.png)
[After]
![after](https://cloud.githubusercontent.com/assets/17305893/20638382/93b9155e-b3e9-11e6-8dde-534806ec0193.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Sangwoo Lee <marchpig87@gmail.com>

Closes #1684 from marchpig/fix-filter-icon and squashes the following commits:

bc92c4e [Sangwoo Lee] Fix filter icon not displaying problem
2016-11-29 12:50:30 +09:00
Mina Lee
a84818c6fe [ZEPPELIN-1694] Show result when editor language changed from markup to another
### What is this PR for?
* Show result when editor language changed from markup to another
* Fix syntax highlight bug when paragraph contains String `%something` in the middle of contents in case the default repl name(`%spark`) is not specified at the beginning of paragraph.
* Save `editOnDblClick` field in note.json so it can be applied after reloading page.

### What type of PR is it?
Bug Fix | Improvement

### What is the Jira issue?
[ZEPPELIN-1694](https://issues.apache.org/jira/browse/ZEPPELIN-1694)

### How should this be tested?
Outline the steps to test the PR here.

### Screenshots (if appropriate)
**Show result after repl change**
Before
![nov-21-2016 17-21-17](https://cloud.githubusercontent.com/assets/8503346/20490686/1479aba6-b00f-11e6-9376-0d3e1df484b1.gif)

After
![nov-21-2016 17-21-28](https://cloud.githubusercontent.com/assets/8503346/20490690/17d1c3d8-b00f-11e6-9d5f-7217b74044ae.gif)

**Fix highlight bug**
Before
<img width="324" alt="screen shot 2016-11-21 at 5 14 23 pm" src="https://cloud.githubusercontent.com/assets/8503346/20490467/694e522c-b00e-11e6-984e-611d0a7ff4a5.png">

After
<img width="332" alt="screen shot 2016-11-21 at 5 12 00 pm" src="https://cloud.githubusercontent.com/assets/8503346/20490472/6d00ee2a-b00e-11e6-9908-8f7b8a0f42f0.png">

**Fix edit on double click bug after refresh**
Before
![nov-21-2016 17-25-13](https://cloud.githubusercontent.com/assets/8503346/20490833/916d7f20-b00f-11e6-992a-7b9946898e30.gif)

After
![nov-21-2016 17-25-44](https://cloud.githubusercontent.com/assets/8503346/20490838/95fe9682-b00f-11e6-96a4-40b67e859267.gif)

### 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 #1665 from minahlee/ZEPPELIN-1694 and squashes the following commits:

ce6a496 [Mina Lee] Open output if editor modechanged from markup language to others
2755b49 [Mina Lee] Fix bug of wrong syntax highlight when there is %html String in paragraph
2016-11-26 23:04:09 +09:00
Alexander Bezzubov
95895d1fc3 ZEPPELIN-1703: frontend - skip PhantomJS on -DskipTests
### 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
2016-11-25 19:22:36 +09:00
astroshim
b7307d49de [ZEPPELIN-1567] Let JDBC interpreter use user credential information.
### 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.
2016-11-24 09:17:01 -08:00
felizbear
3be4b829a8 [ZEPPELIN-1667] add support for es6
### 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
2016-11-24 18:22:59 +09:00
1ambda
abe03a866f [ZEPPELIN-1667] Fix maven options while updating node, npm packages
### What is this PR for?

Update maven plugin, node vesion, npm package and fix tests to make #1639 pass CI

### What is the Jira issue?

Sub issue of #1639

### Questions:

Does the licenses files need update? NO
Is there breaking changes for older versions? YES (front-end build tool usage changed)
Does this needs documentation? YES (front-end build tool usage changed)

Author: 1ambda <1amb4a@gmail.com>

Closes #1659 from 1ambda/pr/1639 and squashes the following commits:

e5b414b [1ambda] docs: Add a package installation command
d8c9d36 [1ambda] docs: Update zeppelin-web/README.md
f0fcdff [1ambda] feat: Add start script to package.json
a2aab1f [1ambda] fix: Remove useless script
5cdd813 [1ambda] fix: Print warn, error log only while packing
5e1e746 [1ambda] fix: Caching npm, bower, node directories
ac40b56 [1ambda] test: fix test for jasmine-core 2.x
ded1f2c [1ambda] chore: Update karma, phantom related package version
6bb52cc [1ambda] chore: Add slient option to bower (show error only)
ca2359c [1ambda] fix: Restore bower install option
4c26211 [1ambda] chore: Update node, npm version to avoid proxy error
e085809 [1ambda] chore: Remove bower install root option
488092a [1ambda] chore: fix travis maven option
668a687 [1ambda] chore: Set maven option using mavenrc
f42531a [1ambda] chore: Update assembly plugin version
532f1e6 [1ambda] fix(web): npm tasks in pom.xml
6568960 [1ambda] chore: Add test, build task to npm
314dcd8 [1ambda] chore: Update frontend plugin version
2016-11-23 20:58:08 +09:00
amir sanjar
0bcbfb922e [ZEPPELIN-1689] enable Power architecture
### 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
2016-11-22 09:44:35 +01:00
CloverHearts
498241b0c4 [ZEPPELIN-1693] doesn't work folder feature on navbar.
### What is this PR for?
Folder function does not work in navbar.
This is a problem due to a change in the structure of the notebook name change function.
https://github.com/apache/zeppelin/pull/1609

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

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

### How should this be tested?
Create notes in folder format.
Please check the navbar.

### Screenshots (if appropriate)

#### before
![navbar_n](https://cloud.githubusercontent.com/assets/10525473/20489617/a34cccca-b04e-11e6-9fb2-f86df18004f2.gif)

#### after
![navbar_c](https://cloud.githubusercontent.com/assets/10525473/20489586/84f2a434-b04e-11e6-9d1c-4c7c3e59575f.gif)

### 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 #1664 from cloverhearts/ZEPPELIN-1693 and squashes the following commits:

1ac72a4 [CloverHearts] bug fix folder feature on navbar
2016-11-21 08:41:13 -08:00
karuppayya
1375379a28 ZEPPELIN-1653: Make UI responsive
### 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
2016-11-21 08:30:15 -08:00
AhyoungRyu
3eae4e0711 Enable to search interpreters only based on the name
### 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
![before](https://cloud.githubusercontent.com/assets/10060731/20309013/a20c60f8-ab46-11e6-9b68-bf3980de3b6b.gif)

 - After
![after](https://cloud.githubusercontent.com/assets/10060731/20309017/a4376300-ab46-11e6-92c9-a8b6a674f312.gif)

### 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
2016-11-18 18:30:19 +01:00
1ambda
a99cef9d44 [ZEPPELIN-1678] Improve main page notebook filter style
### What is this PR for?

Current notebook filter has different style compared to other filters used in zeppelin. So users can feel mismatch from the main page. (I attached PNG)

<img width="313" alt="old_1" src="https://cloud.githubusercontent.com/assets/4968473/20378935/a88a1e2e-acdc-11e6-92eb-502a0fedaca7.png">
<img width="321" alt="old_2" src="https://cloud.githubusercontent.com/assets/4968473/20378937/aa14387e-acdc-11e6-87f1-c92e5ac0d1e5.png">

  <br/>
<br/>

Let me add some comments already included in the commit for description.

- Use common font-style which is widely used in zeppelin
- Modify inlined font css while removing some useless properties which have default value

`font-style`, `font-variant`, `font-weight` default value is already `normal`

see http://www.w3schools.com/csSref/pr_font_font.asp

### What type of PR is it?
[Improvement ]

### What is the Jira issue?

[ZEPPELIN-1678](https://issues.apache.org/jira/browse/ZEPPELIN-1678)

### How should this be tested?

See main page and navbar :)

### Screenshots (if appropriate)

After fixed (chrome, firefox, safari)

<img width="324" alt="chrome" src="https://cloud.githubusercontent.com/assets/4968473/20378955/c8c60f2c-acdc-11e6-86c2-5b1db11332a0.png">
<img width="274" alt="firefox" src="https://cloud.githubusercontent.com/assets/4968473/20378956/c9fc60bc-acdc-11e6-883b-2cf8b730b037.png">
<img width="271" alt="safari" src="https://cloud.githubusercontent.com/assets/4968473/20378958/cd9aa9d6-acdc-11e6-85c0-e3504d72d5e1.png">

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older version s - NO?
* Does this needs documentation? - NO

Author: 1ambda <1amb4a@gmail.com>

Closes #1649 from 1ambda/fix/input-style-for-note-name-query and squashes the following commits:

6fc2449 [1ambda] fix: Set notebook filter font-style
2016-11-18 08:33:16 -08:00
Anthony Corbacho
6712d17a7a [ZEPPELIN-1681] - Fix note permission settings order
### 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
2016-11-18 08:31:06 -08:00
Prabhjyot Singh
31f584cfee [ZEPPELIN-1320] Run zeppelin interpreter process as web front end user
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)

![user impersonate](https://cloud.githubusercontent.com/assets/674497/20213127/f32fdc52-a82c-11e6-8e33-aebd6a943c5f.gif)

### 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.
2016-11-17 19:07:29 -08:00
astroshim
f28c2b308e [ZEPPELIN-1670] Disabling login button double click.
### 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)
![image](https://cloud.githubusercontent.com/assets/3348133/20334136/26cb5510-abfb-11e6-81cd-4f9db0a119c7.png)

### 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
2016-11-17 19:05:42 -08:00
Anthony Corbacho
305e4e1e00 [ZEPPELIN-1672] - Fix import note
### 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
2016-11-16 19:37:57 +09:00
Lee moon soo
0960dbc25d [ZEPPELIN-1654] Fix csv/tsv download
### 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
2016-11-15 12:13:27 -08:00
Lee moon soo
89f3d72c40 [ZEPPELIN-1688] Display comment of table data
### 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
2016-11-15 11:59:17 -08:00
Lee moon soo
65667a34d8 [ZEPPELIN-1664] Built-in chart doesn't render and resize height doesn't work
### 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
2016-11-15 11:55:35 -08:00
karuppayya
96ca84da15 ZEPPELIN-1643:Make spark web UI accesible from interpreters page
### 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)
![zscpr58qdi](https://cloud.githubusercontent.com/assets/5082742/20110797/c6852202-a60b-11e6-8264-93437a58f752.gif)

### 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
2016-11-15 08:41:59 -08:00
1ambda
621c527f27 [ZEPPELIN-1659] DON'T reset filter whenever each interpreter setting is updated
### 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)

![filter_is_cleared_everytime](https://cloud.githubusercontent.com/assets/4968473/20266522/c61410fa-aab9-11e6-8d1d-5e28748a7830.gif)

### 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
2016-11-15 08:39:29 -08:00
Mina Lee
44d359d540 [ZEPPELIN-1652] Fix cursor move on double click in markdown editor
### What is this PR for?
There is a bug that when you double click markdown editor, cursor moves to end of the line. This PR fixes it.

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

### What is the Jira issue?
[ZEPPELIN-1652](https://issues.apache.org/jira/browse/ZEPPELIN-1652)

### How should this be tested?
1. Type `%md ### Hello Zeppelin`
2. Double click Hello in editor
3. See if Hello stay highlighted

### Screenshots (if appropriate)
**Before**
![nov-11-2016 12-04-44](https://cloud.githubusercontent.com/assets/8503346/20213106/1a8f6f90-a807-11e6-8e30-8087db6ae97a.gif)

**After**
![nov-11-2016 12-03-14](https://cloud.githubusercontent.com/assets/8503346/20213062/de4c75aa-a806-11e6-83ab-c917f41e5ed4.gif)

### 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 #1622 from minahlee/ZEPPELIN-1652 and squashes the following commits:

a944dcc [Mina Lee] Fix cursor move on double click in markdown editor bug
2016-11-14 11:02:47 -08:00
Jun
c1254f7b0d [ZEPPELIN-1628] Enable renaming note from the main page
### 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)
![rename_note](https://cloud.githubusercontent.com/assets/8201019/20057051/a16b221c-a52c-11e6-900e-f88031ff1246.gif)

### 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
2016-11-13 06:55:10 -08:00
Lee moon soo
19c07c2c84 [ZEPPELIN-777] Math formula support
### 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)
![image](https://cloud.githubusercontent.com/assets/1540981/20040864/3b69c540-a414-11e6-8f8a-fdf7ee1370a6.png)

### 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
2016-11-09 10:05:57 -08:00
Lee moon soo
865d10f19b [ZEPPELIN-1003] Refactoring visualization
### 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
2016-11-08 07:25:51 -08:00
Mina Lee
dd20e7bf8b [ZEPPELIN-1564] Enable note deletion and paragraph output clear from main page
### 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)

![oct-27-2016 18-26-03](https://cloud.githubusercontent.com/assets/8503346/19761938/e013ea02-9c72-11e6-9a08-0a70aca145d2.gif)
### 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
2016-11-05 13:41:11 +09:00
John Trengrove
2ea1ce541e [ZEPPELIN-1593] Enforce sorting on dynamic form elements
### 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
2016-11-03 15:31:06 -07:00
CloverHearts
55de3fba71 [hotfix] does not showing notebooklist on navbar
### 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
![navbar_pr](https://cloud.githubusercontent.com/assets/10525473/19957865/b112d8c4-a1dd-11e6-9f0c-363919b321d8.png)

#### resolve after (on this pr)
![correct](https://cloud.githubusercontent.com/assets/10525473/19957885/d487ad16-a1dd-11e6-81b0-ebd210bd6f98.png)

### 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
2016-11-03 18:37:27 +09:00
Mina Lee
28adacb9c8 [ZEPPELIN-1461] Doesn't display "description" value in interpreter creation page
### What is this PR for?
#1522 tried to fix same issue by making as least change as possible, but fixing it in backend side looks like more proper approach as https://github.com/apache/zeppelin/pull/1522#issuecomment-255109922.

This PR fixes ZEPPELIN-1461 by changing `properties` field of `InterpreterSetting` class from `Properties` -> `Object`.
### What type of PR is it?

Bug Fix
### What is the Jira issue?

[ZEPPELIN-1461](https://issues.apache.org/jira/browse/ZEPPELIN-1461)
### Screenshots (if appropriate)

Before
![screen shot 2016-10-24 at 8 42 02 pm](https://cloud.githubusercontent.com/assets/8503346/19644395/5d20a864-9a2a-11e6-806a-8a44e44a108a.png)

After
![screen shot 2016-10-24 at 8 37 17 pm](https://cloud.githubusercontent.com/assets/8503346/19644281/d72be1ce-9a29-11e6-9b67-6d5de263b0de.png)
### 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 #1559 from minahlee/ZEPPELIN-1461 and squashes the following commits:

4a278f0 [Mina Lee] Add test checking InterpreterProperty class
14a6300 [Mina Lee] Add selenium test for display description on interpreter create
4eba177 [Mina Lee] Fix order of properties in ui and java code style
1a2a41d [Mina Lee] Show description when create new interpreter
2016-11-02 13:27:03 +09:00
Kavin
0f56337ce3 [ZEPPELIN-1061] Select default interpreter while creating note
### 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)

![zeppelin-1061](https://cloud.githubusercontent.com/assets/20789766/19378611/200d9d50-920b-11e6-930a-6fdcf67c5215.png)
### 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.
2016-11-01 15:02:43 +09:00
astroshim
5991a35774 [ZEPPELIN-1306] Interpreter restarts on a note.
### 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)

![restartintp](https://cloud.githubusercontent.com/assets/3348133/17474018/b2739462-5d8e-11e6-81bb-da15544547a5.gif)
### 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.
2016-10-31 14:07:36 +09:00
Naveen Subramanian
f236f1ccd3 [ZEPPELIN-675] "No data available" in invalid graph types for sql queries
### 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
2016-10-30 10:15:13 +09:00
Mina Lee
60089f0f58 [ZEPPELIN-1566] Make paragraph editable with double click
### 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**
![oct-20-2016 12-28-54](https://cloud.githubusercontent.com/assets/8503346/19545401/ca2a69a8-96c0-11e6-9e70-ca930fd7cc8e.gif)

**Syntax highlight on paste**

Before
![oct-20-2016 12-24-54](https://cloud.githubusercontent.com/assets/8503346/19545333/46a2f2a8-96c0-11e6-910a-2a216da5603b.gif)

After
![oct-20-2016 12-25-06](https://cloud.githubusercontent.com/assets/8503346/19545338/4d3bb852-96c0-11e6-8dc4-ff839234876a.gif)

### 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
2016-10-29 10:30:22 +09:00
Anthony Corbacho
824fd955fb [ZEPPELIN-1575] Notebook Repo settings UI
### 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)
![notebook_repo_settings](https://cloud.githubusercontent.com/assets/3139557/19643248/583dbc2a-9a24-11e6-8f14-7deda9c443f2.gif)

### 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
2016-10-27 17:42:41 +09:00
hyonzin
4f6a0e34ff [ZEPPELIN-1549] Change NotebookID variable name to NoteID
### 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
2016-10-25 14:51:07 +09:00
baekhoseok
ba5a2d8251 [MINOR] ui improvement
### What is this PR for?
* configuration sorting
* remove tooltip in job menu
* change repository infomation icon

### What type of PR is it?
Improvement

### Screenshots (if appropriate)
* configuration sorting

before

<img width="1440" alt="f6a547d6-9225-11e6-80ab-7632f1c3d6cb" src="https://cloud.githubusercontent.com/assets/9584854/19631867/d50001f8-99db-11e6-81fc-47de15a3561b.png">

after
<img width="1440" alt="2016-10-24 11 21 18" src="https://cloud.githubusercontent.com/assets/9584854/19631896/1688513e-99dc-11e6-8a8a-b87b996858cd.png">

* remove tooltip in job menu

before

<img width="1049" alt="0da61c8a-9226-11e6-9124-a51d09f11913" src="https://cloud.githubusercontent.com/assets/9584854/19631909/2a5cd90a-99dc-11e6-92dd-9738924de361.png">

after

<img width="1051" alt="14d95af8-9226-11e6-852f-142c63f12f3d" src="https://cloud.githubusercontent.com/assets/9584854/19631914/4c4a7216-99dc-11e6-9e39-c08640c49923.png">


* change repository information icon

before 

<img width="1052" alt="23663618-9226-11e6-9600-cbcb10b9ee1a" src="https://cloud.githubusercontent.com/assets/9584854/19631919/5407de6c-99dc-11e6-8043-a73669695114.png">

after
<img width="1038" alt="2016-10-24 11 24 41" src="https://cloud.githubusercontent.com/assets/9584854/19631951/8d6b592c-99dc-11e6-8de1-28e760a16ebf.png">


Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? yes

Author: baekhoseok <baek22h@naver.com>

Closes #1555 from baekhoseok/minor_ui_fix and squashes the following commits:

bf98a03 [baekhoseok] minor ui improvement
cd4af65 [baekhoseok] minor ui improvement
2016-10-25 12:11:47 +09:00
CloverHearts
8af7856fd1 [ Hotfix ] Incorrect (per user) setup ui for "create new interpreter component"
### What is this PR for?
A few sentences describing the overall goals of the pull request's commits.
First time? Check out the contributing guide - https://zeppelin.apache.org/contribution/contributions.html

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

### Todos
- [x] fix to text margin top
- [x] implement to (per note / per user) setup feature of create new insterpreter

### How should this be tested?
1. on click interpreter menu.
2. on click interpreter menu.
3. check per user and per note setting. (`per user` setting must be shiro is activated)
4. save and check to result.

### Screenshots (if appropriate)
#### - Create new Interpreter  - before
![pernotebefore](https://cloud.githubusercontent.com/assets/10525473/19588103/6d1236a4-979e-11e6-972b-bb6d35f83ac5.png)

#### - Create new Interpreter  - after
![new create interpreter](https://cloud.githubusercontent.com/assets/10525473/19588118/87ad23ca-979e-11e6-9a2b-4ec8be27c74f.png)

#### - fix margin for interpreter settings  - before
![pernotebefore](https://cloud.githubusercontent.com/assets/10525473/19588140/a8b701ee-979e-11e6-804b-4e39c063281d.png)

#### - fix margin for interpreter settings  - after
![margin](https://cloud.githubusercontent.com/assets/10525473/19588145/b13ca8f0-979e-11e6-9a02-186b92a0dad1.png)

### 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 #1546 from cloverhearts/hotfix-inerpreterRunningModeUIFix and squashes the following commits:

ebf1d81 [CloverHearts] hotfix - change setup ui for interpreter setting components
2016-10-23 00:33:42 +09:00
CloverHearts
908b2a74ff [ZEPPELIN-1210] Run interpreter per user
### 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
2016-10-20 15:22:59 +09:00
CloverHearts
a3a2e4d340 [ ZEPPELIN-1559 ] Code Editor slow performance resolve of the many Notebooks
### 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-1559
https://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)
![optimization_before_codeditor](https://cloud.githubusercontent.com/assets/10525473/19457150/f18845a0-94ff-11e6-876d-4386dbf1e7de.gif)

#### after ( 5000 notebooks)
![optimization_for_codeeidtor](https://cloud.githubusercontent.com/assets/10525473/19457184/1f7d5036-9500-11e6-8b0c-91b301641c73.gif)

### 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.
2016-10-20 08:32:01 +09:00
Lee moon soo
8ea16ab652 [ZEPPELIN-1532] Remove map visualization from source tree, because of incompatible license
### 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
2016-10-18 08:01:11 +09:00
Yunho Maeng
e5f211b7ba [ZEPPELIN-1550] fixed 'add from URL' button
### 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
![import_note_window](https://cloud.githubusercontent.com/assets/7574765/19379302/36a0fc12-922c-11e6-9018-c67893305005.gif)

 - after
![after_2](https://cloud.githubusercontent.com/assets/7574765/19379491/2c5a072a-922d-11e6-8804-55c9766b3c5c.gif)

### 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
2016-10-17 14:08:41 +09:00
Khalid Huseynov
3afd4449ce [Zeppelin-1540] fix note url input placeholder
### What is this PR for?
Fix input form placeholder for `note url`

### What type of PR is it?
Improvement

### Todos
* [x] - Task

### What is the Jira issue?
[ZEPPELIN-1540](https://issues.apache.org/jira/browse/ZEPPELIN-1540)

### How should this be tested?
go to import note menu -> add from url -> see input forms

### Screenshots (if appropriate)
Before:
<img width="593" alt="screen shot 2016-10-13 at 2 37 24 pm" src="https://cloud.githubusercontent.com/assets/1642088/19337731/9ea41248-9152-11e6-859b-757f44b2866a.png">

After:
<img width="601" alt="screen shot 2016-10-13 at 2 36 06 pm" src="https://cloud.githubusercontent.com/assets/1642088/19337716/7f90522c-9152-11e6-8ad2-cbfcdc241e10.png">

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Khalid Huseynov <khalidhnv@gmail.com>

Closes #1509 from khalidhuseynov/fix/note-import-placeholder and squashes the following commits:

c01b982 [Khalid Huseynov] note name -> note url
2016-10-17 12:20:51 +09:00
Mina Lee
52202afd3e [HOTFIX] Fix testWidth selnium test
### 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
2016-10-11 16:27:16 +09:00
DuyHai DOAN
79fd3a0242 [ZEPPELIN-1376] Add proxy credentials for dependency repo for corporate firewall use-cases
### 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

![add_repo](https://cloud.githubusercontent.com/assets/1532977/18017489/0b486fda-6bd2-11e6-90c7-ceda18c53575.png)

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

![irrelevant_double_error_message](https://cloud.githubusercontent.com/assets/1532977/18017541/3cf0de1e-6bd2-11e6-8285-af03f222e8d2.gif)

* 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

![dependencies_download_error_popup](https://cloud.githubusercontent.com/assets/1532977/18033855/1be5fe9a-6d2e-11e6-91f9-2f5ea66cab26.gif)

The last commit is just doc update

![updated_docs](https://cloud.githubusercontent.com/assets/1532977/18017797/97302f14-6bd3-11e6-97cc-77bd52f25cde.png)

### 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
2016-10-10 09:27:30 +02:00
AhyoungRyu
de2d6e4956 [MINOR] Rearrange the contents in "About Zeppelin"
### What is this PR for?
Just rearranged the placement of Zeppelin logo, title and text in "About Zeppelin". In the mobile screen as well.

### What type of PR is it?
Improvement

### What is the Jira issue?
No Jira issue for this

### How should this be tested?
To check this change in your local, build only `zeppelin-web` with `./grunt build` and then browse with `./grunt serve`.

### Screenshots (if appropriate)
- **Before**
  1. desktop & tablet screen
<img src="https://cloud.githubusercontent.com/assets/10060731/18860571/8aa85aec-84b9-11e6-9112-b6869291f8f0.png" width="500px">

  2. mobile screen
<img src="https://cloud.githubusercontent.com/assets/10060731/18860576/91f623a6-84b9-11e6-96ba-e34c43221143.png" width="300px">

- **After**
  1. desktop & tablet screen
<img src="https://cloud.githubusercontent.com/assets/10060731/19140869/b5ab79e0-8bcb-11e6-946f-df63045e6f1e.png" width="500px">

  2. mobile screen
<img src="https://cloud.githubusercontent.com/assets/10060731/19140879/c034b476-8bcb-11e6-977b-29deb6776f13.png" width="300px">

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: AhyoungRyu <ahyoungryu@apache.org>

Closes #1461 from AhyoungRyu/improve/aboutZeppelin and squashes the following commits:

16421c9 [AhyoungRyu] Add a newline
a8628c8 [AhyoungRyu] Apply responsive design
81ef021 [AhyoungRyu] Rearrange 'About Zeppelin'
2016-10-06 18:32:53 +09:00
Damien CORNEAU
36c9f1a217 Fix version of cachebust
### 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)
![screen shot 2016-10-06 at 12 22 40 pm](https://cloud.githubusercontent.com/assets/710411/19139450/bcad1494-8bbf-11e6-8b22-b9344055e876.png)

### 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
2016-10-06 14:36:33 +09:00
Damien CORNEAU
a9e7bc381a [Zeppelin-1496] Apply Zeppelin-Web Good Practice Guide #1 to the code
### 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
2016-10-03 17:58:42 +09:00