Commit graph

3299 commits

Author SHA1 Message Date
1ambda
eac6b438c2 fix: no-extra-semi
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-table.js (5/0)
  ✖  28:4  Unnecessary semicolon  no-extra-semi
  ✖  32:4  Unnecessary semicolon  no-extra-semi
  ✖  51:4  Unnecessary semicolon  no-extra-semi
  ✖  57:4  Unnecessary semicolon  no-extra-semi
  ✖  61:4  Unnecessary semicolon  no-extra-semi

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/visualization.js (14/0)
  ✖   25:4  Unnecessary semicolon  no-extra-semi
  ✖   32:4  Unnecessary semicolon  no-extra-semi
  ✖   39:4  Unnecessary semicolon  no-extra-semi
  ✖   46:4  Unnecessary semicolon  no-extra-semi
  ✖   54:4  Unnecessary semicolon  no-extra-semi
  ✖   64:4  Unnecessary semicolon  no-extra-semi
  ✖   75:4  Unnecessary semicolon  no-extra-semi
  ✖   82:4  Unnecessary semicolon  no-extra-semi
  ✖   89:4  Unnecessary semicolon  no-extra-semi
  ✖  100:4  Unnecessary semicolon  no-extra-semi
  ✖  112:4  Unnecessary semicolon  no-extra-semi
  ✖  119:4  Unnecessary semicolon  no-extra-semi
  ✖  163:4  Unnecessary semicolon  no-extra-semi
  ✖  171:2  Unnecessary semicolon  no-extra-semi
```
2017-04-20 12:02:15 +09:00
1ambda
bfd7984993 fix: ignore arrow-parens 2017-04-20 12:02:15 +09:00
1ambda
3c91566c7c fix: ignore object-curly-spacing 2017-04-20 12:02:15 +09:00
1ambda
6e44e96de8 fix: space-before-function-paren
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/websocketEvents/websocketMsg.service.js (48/0)
  ✖   17:25  Missing space before function parentheses  space-before-function-paren
  ✖   22:26  Missing space before function parentheses  space-before-function-paren
  ✖   26:29  Missing space before function parentheses  space-before-function-paren
  ✖   36:30  Missing space before function parentheses  space-before-function-paren
  ✖   40:32  Missing space before function parentheses  space-before-function-paren
  ✖   44:26  Missing space before function parentheses  space-before-function-paren
  ✖   48:28  Missing space before function parentheses  space-before-function-paren
  ✖   52:25  Missing space before function parentheses  space-before-function-paren
  ✖   56:25  Missing space before function parentheses  space-before-function-paren
  ✖   60:27  Missing space before function parentheses  space-before-function-paren
  ✖   64:25  Missing space before function parentheses  space-before-function-paren
  ✖   68:24  Missing space before function parentheses  space-before-function-paren
```
2017-04-20 12:02:15 +09:00
1ambda
59c3996f82 fix: indent
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (7/0)
  ✖   71:7   Expected indentation of 4 spaces but found 6   indent
  ✖   75:7   Expected indentation of 4 spaces but found 6   indent
  ✖   82:6   Expected indentation of 4 spaces but found 5   indent
  ✖   83:7   Expected indentation of 7 spaces but found 6   indent
  ✖   85:7   Expected indentation of 7 spaces but found 6   indent
  ✖   87:4   Expected indentation of 2 spaces but found 3   indent
  ✖  231:12  Expected indentation of 8 spaces but found 11  indent
```
2017-04-20 12:02:15 +09:00
1ambda
40125e95c8 fix: no-multiple-empty-lines
```

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/resizable/resizable.directive.js (1/0)
  ✖  70:1  Too many blank lines at the end of file. Max of 0 allowed  no-multiple-empty-lines

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/saveAs/saveAs.service.js (1/0)
  ✖  52:1  Too many blank lines at the end of file. Max of 0 allowed  no-multiple-empty-lines

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/searchService/search.service.js (1/0)
  ✖  34:1  Too many blank lines at the end of file. Max of 0 allowed  no-multiple-empty-lines

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js (1/0)
  ✖  196:1  Too many blank lines at the end of file. Max of 0 allowed  no-multiple-empty-lines

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/websocketEvents/websocketMsg.service.js (1/0)
  ✖  341:1  Too many blank lines at the end of file. Max of 0 allowed  no-multiple-empty-lines
```
2017-04-20 12:02:15 +09:00
1ambda
3a6626f0d2 fix: no-trailing-spaces
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/helium/helium.controller.js (3/0)
  ✖   44:1  Trailing spaces not allowed  no-trailing-spaces
  ✖   48:1  Trailing spaces not allowed  no-trailing-spaces
  ✖  111:1  Trailing spaces not allowed  no-trailing-spaces
```
2017-04-20 12:02:15 +09:00
1ambda
ca94341826 fix: spaced-comment
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/navbar/navbar.controller.js (2/0)
  ✖  91:5  Expected space or tab after '//' in comment  spaced-comment
  ✖  94:7  Expected space or tab after '//' in comment  spaced-comment

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/ngenter/ngenter.directive.test.js (2/0)
  ✖  19:3  Expected space or tab after '//' in comment   spaced-comment
  ✖  20:3  Expected space or tab before '*/' in comment  spaced-comment

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/noteName-create/notename.controller.js (1/0)
  ✖  102:5  Expected space or tab after '//' in comment  spaced-comment

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/noteName-import/notenameImport.controller.js (1/0)
  ✖  122:7  Expected space or tab after '//' in comment  spaced-comment

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/saveAs/saveAs.service.js (2/0)
  ✖  34:7  Expected space or tab after '//' in comment  spaced-comment
  ✖  35:7  Expected space or tab after '//' in comment  spaced-comment

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/searchService/search.service.js (1/0)
  ✖  23:20  Expected space or tab after '//' in comment  spaced-comment
```
2017-04-20 12:02:15 +09:00
1ambda
d65c47bb42 fix: comma-spacing
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/tabledata/pivot.js (2/0)
  ✖  151:29  A space is required after ','  comma-spacing
  ✖  156:29  A space is required after ','  comma-spacing

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-nvd3chart.js (1/2)
  ✖   96:35  A space is required after ','    comma-spacing

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (2/0)
  ✖  228:30  A space is required after ','  comma-spacing
  ✖  235:32  A space is required after ','  comma-spacing
```
2017-04-20 12:02:15 +09:00
1ambda
9150539175 fix: operator-linebreak
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/helium/helium.controller.js (1/0)
  ✖  324:78  '?' should be placed at the beginning of the line  operator-linebreak

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js (1/0)
  ✖  1263:71  '?' should be placed at the beginning of the line  operator-linebreak
```
2017-04-20 12:02:15 +09:00
1ambda
925dc7be6b fix: block-spacing
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/search/result-list.controller.js (2/0)
  ✖  148:42  Requires a space after '{'   block-spacing
  ✖  148:68  Requires a space before '}'  block-spacing

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-areachart.js (4/0)
  ✖  61:40  Requires a space after '{'   block-spacing
  ✖  61:86  Requires a space before '}'  block-spacing
  ✖  62:40  Requires a space after '{'   block-spacing
  ✖  62:72  Requires a space before '}'  block-spacing

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-barchart.js (2/0)
  ✖  61:40  Requires a space after '{'   block-spacing
  ✖  61:72  Requires a space before '}'  block-spacing

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-linechart.js (2/0)
  ✖  71:40  Requires a space after '{'   block-spacing
  ✖  71:86  Requires a space before '}'  block-spacing
```
2017-04-20 12:02:15 +09:00
1ambda
021f9e761c fix: space-before-blocks
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (6/0)
  ✖   81:30  Missing space before opening brace  space-before-blocks
  ✖  212:17  Missing space before opening brace  space-before-blocks
  ✖  215:17  Missing space before opening brace  space-before-blocks
  ✖  228:33  Missing space before opening brace  space-before-blocks
  ✖  232:47  Missing space before opening brace  space-before-blocks
  ✖  234:74  Missing space before opening brace  space-before-blocks

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/navbar/navbar.controller.js (1/0)
  ✖  84:25  Missing space before opening brace  space-before-blocks
```
2017-04-20 12:02:15 +09:00
1ambda
a896442c24 fix: keyword-spacing
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js (1/0)
  ✖  335:11  Expected space(s) after "for"  keyword-spacing

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/spell/spell-result.js (1/0)
  ✖  90:5  Expected space(s) after "for"  keyword-spacing

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (1/0)
  ✖  236:9  Expected space(s) after "else"  keyword-spacing

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/helium/helium-conf.js (2/0)
  ✖  28:3  Expected space(s) after "for"    keyword-spacing
  ✖  80:5  Expected space(s) after "catch"  keyword-spacing

```
2017-04-20 12:02:15 +09:00
1ambda
5948d97aa9 fix: space-in-parens
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (7/0)
  ✖  212:10  There should be no spaces inside this paren  space-in-parens
  ✖  212:18  There should be no spaces inside this paren  space-in-parens
  ✖  215:10  There should be no spaces inside this paren  space-in-parens
  ✖  215:18  There should be no spaces inside this paren  space-in-parens
  ✖  232:47  There should be no spaces inside this paren  space-in-parens
  ✖  233:10  There should be no spaces inside this paren  space-in-parens
  ✖  234:74  There should be no spaces inside this paren  space-in-parens
```
2017-04-20 12:02:15 +09:00
1ambda
b094fff553 fix: no-empty
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-nvd3chart.js (1/2)
  ✖   52:25  Empty block statement            no-empty
```
2017-04-20 12:02:15 +09:00
1ambda
131c901d47 fix: no-multi-spaces
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js (4/0)
  ✖  403:21  Multiple spaces found before 'elem'  no-multi-spaces
  ✖  415:21  Multiple spaces found before 'elem'  no-multi-spaces
  ✖  437:21  Multiple spaces found before 'elem'  no-multi-spaces
  ✖  715:28  Multiple spaces found before '('     no-multi-spaces

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/tabledata/pivot.js (1/0)
  ✖  247:49  Multiple spaces found before 'p'  no-multi-spaces

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (1/0)
  ✖  271:42  Multiple spaces found before '',''  no-multi-spaces
```
2017-04-20 12:02:15 +09:00
1ambda
1de9a8d2f8 fix: one-var
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (1/0)
  ✖  210:7  Split initialized 'var' declarations into multiple statements  one-var
```
2017-04-20 12:02:15 +09:00
1ambda
7aa4b1aae6 fix: brace-style
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js (1/0)
  ✖  67:39  Closing curly brace should be on the same line as opening curly brace or on the line after the previous block  brace-style

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (1/0)
  ✖  228:66  Closing curly brace should be on the same line as opening curly brace or on the line after the previous block  brace-style
```
2017-04-20 12:02:15 +09:00
1ambda
cde8a2d2d2 fix: dot-location
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/configuration/configuration.controller.js (2/0)
  ✖  25:67  Expected dot to be on same line as property  dot-location
  ✖  28:7   Expected dot to be on same line as property  dot-location

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/credential/credential.controller.js (8/0)
  ✖   28:59  Expected dot to be on same line as property  dot-location
  ✖   34:7   Expected dot to be on same line as property  dot-location
  ✖   67:74  Expected dot to be on same line as property  dot-location
  ✖   78:7   Expected dot to be on same line as property  dot-location
  ✖  142:69  Expected dot to be on same line as property  dot-location
  ✖  147:7   Expected dot to be on same line as property  dot-location
  ✖  169:78  Expected dot to be on same line as property  dot-location
  ✖  174:13  Expected dot to be on same line as property  dot-location

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/helium/helium.controller.js (4/0)
  ✖  135:73  Expected dot to be on same line as property  dot-location
  ✖  139:13  Expected dot to be on same line as property  dot-location
  ✖  262:38  Expected dot to be on same line as property  dot-location
  ✖  266:13  Expected dot to be on same line as property  dot-location

```
2017-04-20 12:02:15 +09:00
1ambda
d62af8d31b fix: object-property-newline
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js (7/0)
  ✖   45:26  Object properties must go on a new line if they aren't all on the same line  object-property-newline
  ✖   46:24  Object properties must go on a new line if they aren't all on the same line  object-property-newline
  ✖   46:40  Object properties must go on a new line if they aren't all on the same line  object-property-newline
  ✖   71:38  Object properties must go on a new line if they aren't all on the same line  object-property-newline
  ✖   76:36  Object properties must go on a new line if they aren't all on the same line  object-property-newline
  ✖   89:36  Object properties must go on a new line if they aren't all on the same line  object-property-newline
  ✖  102:36  Object properties must go on a new line if they aren't all on the same line  object-property-newline

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-nvd3chart.js (0/2)
  ⚠  132:37  Unexpected mix of '&&' and '||'  no-mixed-operators
  ⚠  132:54  Unexpected mix of '&&' and '||'  no-mixed-operators

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/components/helium/helium-conf.js (3/0)
  ✖  34:19  Object properties must go on a new line if they aren't all on the same line  object-property-newline
  ✖  34:41  Object properties must go on a new line if they aren't all on the same line  object-property-newline
  ✖  35:21  Object properties must go on a new line if they aren't all on the same line  object-property-newline
```
2017-04-20 12:02:15 +09:00
1ambda
70cb63b742 fix: no-extra-boolean-cast
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/app.js (1/0)
  ✖  40:12  Redundant double negation  no-extra-boolean-cast

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/jobmanager/jobs/job.controller.js (2/0)
  ✖  58:18  Redundant double negation  no-extra-boolean-cast
  ✖  90:18  Redundant double negation  no-extra-boolean-cast
```
2017-04-20 12:02:15 +09:00
1ambda
a5c7842d4f fix: semi-spacing
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/search/result-list.controller.js (1/0)
  ✖  20:26  Unexpected whitespace before semicolon  semi-spacing
```
2017-04-20 12:02:15 +09:00
1ambda
3abfc7c3f3 fix: no-mixed-spaces-and-tabs
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-piechart.js (3/0)
  ✖  79:2  Mixed spaces and tabs  no-mixed-spaces-and-tabs
  ✖  80:2  Mixed spaces and tabs  no-mixed-spaces-and-tabs
  ✖  81:2  Mixed spaces and tabs  no-mixed-spaces-and-tabs
```
2017-04-20 12:02:15 +09:00
1ambda
8d5a3d9dfb fix: yoda
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/handsontable/handsonHelper.js
  160:49  error  Expected literal to be on the right side of ===  yoda
```
2017-04-20 12:02:15 +09:00
1ambda
4b36afb2fa fix: ignore all rules 2017-04-20 12:02:15 +09:00
1ambda
7840ca5fa7 fix: Set ignored, warn lint rules 2017-04-20 12:02:15 +09:00
1ambda
5566911888 fix: Remove invalid visdev 2017-04-20 12:02:15 +09:00
1ambda
4baadbb0aa fix: Use eslint instead of grunt-eslint 2017-04-20 12:02:15 +09:00
Jeff Zhang
7b585c7399 ZEPPELIN-2395. Refactor Input.java to make dynamic forms extensible
### What is this PR for?

Currently, zeppelin only support 3 kinds of dynamic form controls: TextBox, Select, CheckBox. All the things are in `Input.java`, this is hard to add new controls, this PR is for refactoring Input to make dynamic forms extensible.  Main Changes:
* Make `Input` as the base class of dynamic forms also use it as the factory class
* All the concret dynamic forms extend `Input`
* Add method `toJson` and `fromJson` for `GUI` for `GUI`'s serialization/deserialization. I plan to do it for other classes as well, so that we can remove duplicated serde code and also make it easy to test serialization/deserialization
* Change `z.input` to `z.textbox` as I think z.input is a little misleading. But I still keep `z.input` and make `z.input` as deprecated.
* Ideally the new input forms' json should be the same as the old input form json. But there's one bug in the old input form, `type` is missing if the input forms are created in frontend for textbox and select. So I keep the old input forms for compatibility. I will load the old input forms json and convert it into new input forms, and after saving, `note.json` would have the new input forms json.

After this PR, user needs to do 3 things to add new ui controls
* Implement its UI control classes, (refer TextBox/CheckBox/Select), and specify it in `TypeAdapterFactory` of `Input` for serde.
* Add parsing logic in `Input.getInputForm` if you want to support this control in frontend.
* Add display logic in `paragraph-parameterizedQueryForm.html`

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

### Todos
* [ ] - Task

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

### How should this be tested?
Test is added

### Screenshots (if appropriate)

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

Author: Jeff Zhang <zjffdu@apache.org>

Closes #2245 from zjffdu/ZEPPELIN-2395 and squashes the following commits:

16d42a8 [Jeff Zhang] ZEPPELIN-2395. Refactor Input.java to make dynamic forms extensible
2017-04-20 10:56:54 +08:00
1ambda
4b1b521fc3 [ZEPPELIN-2179] Clear output DOES NOT work in personalized mode (master)
### What is this PR for?

`clear output` (`cmd` + `opt` + `L`) doesn't work in the personalized mode.

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

### Todos

NONE

### What is the Jira issue?

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

### How should this be tested?

1. Configure shiro
2. Start Zeppelin and login in 2 browsers (e.g chrome and safari) with 2 different users (**DO NOT USE `dev` mode: localhost:9000**)
3. Create a note
4. Enable personalized mode
5. Run paragraph and clear output in each browser

### Screenshots (if appropriate)

NONE

### 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 #2253 from 1ambda/ZEPPELIN-2179/clear-output-doesnt-work-in-person-mode-for-master and squashes the following commits:

eeff440ec [1ambda] fix: Clear personalized output before running
b7387849f [1ambda] fix: Clear output in personalized paragraph
2017-04-20 01:40:01 +09:00
soralee
c3fbb1ef66 [MINOR] fix typo from 'interpeter' to 'interpreter'
### What is this PR for?
Fix typo from `interpeter` to `interpreter`

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

### What is the Jira issue?
* No, it's minor issue

### How should this be tested?
- N/A

### Screenshots (if appropriate)
- N/A

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

Author: soralee <sora0728@zepl.com>

Closes #2244 from soralee/typo_interpreter and squashes the following commits:

863dc4f [soralee] fix typo
2017-04-19 18:51:52 +09:00
soralee
4d6485737c [ZEPPELIN-1357,1892,1370][Umbrella] Text overlap in the MultiBarChart
### What is this PR for?
If using the `multiChartBar`, it often occurs overlap in text. So, this PR is for preventing to overlap in text.

>~~The below is the case what I updated.~~
~~1. The xLabel generally show all of the text without rotation (less than 30).~~
~~2. If the xLabel size is over than 30 and less than 80, the xLabel text are rotated as 90 degree and displayed.~~
~~3. If the xLabel size is over than 80, the xLabel text are disappeared, but the tooltip is displayed.~~
>~~I have made improvements based on my thinking, so I would appreciate to give me your feedback.~~
~~And if merged this PR, I'll update the feature so that user can use `min` and `max` variables by user on web.~~

**[Update]**
To prevent overlap in xLabel text, in one way which is talked the below mentions, user who is using zeppelin could select to visualization type of xLabel such as `rotate 45 degree` or `hide`.

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

### What is the Jira issue?
* [ZEPPELIN-1357; UI - label wrapping not done properly in charts](https://issues.apache.org/jira/browse/ZEPPELIN-1357)
* [ZEPPELIN-1892; Display label vertically or horizontally smartly](https://issues.apache.org/jira/browse/ZEPPELIN-1892)
* [ZEPPELIN-1370; Label overlaps - in default visualization example barchart](https://issues.apache.org/jira/browse/ZEPPELIN-1370)

### How should this be tested?
1. Run the paragraph for bank data in  the `Basic Features (Spark)` notebook.
2. Execute the following query.
```
%sql
select * from bank
```
3. Use the pivot in the `Setting` toggle in the `MultiBarChart` such as the screenshots.

### Screenshots (if appropriate)
**[Before]**
![z_zeppelin-1357_b](https://cloud.githubusercontent.com/assets/8110458/23898303/f80d7bbc-08f3-11e7-9b24-3248c492b8af.png)

![z_1357_b3_](https://cloud.githubusercontent.com/assets/8110458/23898435/75b3ae60-08f4-11e7-9d7c-31746f0d4edc.png)

**[After]**
![peek 2017-04-17 14-58](https://cloud.githubusercontent.com/assets/8110458/25080820/a3bfc1c0-2381-11e7-9c2b-16c0aa71234e.gif)

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

Author: soralee <sora0728@zepl.com>

Closes #2133 from soralee/ZEPPELIN-1357_overlap_text and squashes the following commits:

32d7e37 [soralee] rebase master
2017-04-18 19:23:36 -07:00
Jeff Zhang
c706d453e0 ZEPPELIN-2386. Add parameter for check running current paragraph in ZeppelinContext
### What is this PR for?
I can reproduce it via the test code in ZeppelinIT.testAngularDisplay. First run the 4 paragraphs to initiate the state. Then when I click paragraph 0 the first time, paragraph 2 will run correctly. But if I click paragraph 0 again, interpreter would raise the following exception. The cause is that ZeppelinContext's interpreterContext now point to paragraph 2, because paragraph 2 is the last paragraph that runs in this interpreter. So I propose to add parameter for check running current paragraph in ZeppelinContext.

* Add 2 methods in ZeppelinContext.   `run(idx, checkCurrentParagraph) `, 'run(noteId, idx, context, checkCurrentParagraph)'
* Also make some changes for debug logging.

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

### Todos
* [ ] - Task

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

### How should this be tested?
Tested manually and also add integration test.

### Screenshots (if appropriate)

Before
![zeppelin_before](https://cloud.githubusercontent.com/assets/164491/24895529/8514826e-1ec3-11e7-915b-70baf09c297a.gif)

After
![zeppelin_after](https://cloud.githubusercontent.com/assets/164491/24895532/88e87bc0-1ec3-11e7-90ee-a7ca7a3758f8.gif)

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

Author: Jeff Zhang <zjffdu@apache.org>

Closes #2240 from zjffdu/ZEPPELIN-2386 and squashes the following commits:

03995a3 [Jeff Zhang] ZEPPELIN-2386. Add parameter to check running current paragraph in ZeppelinContext
2017-04-18 17:56:39 +08:00
Jeff Zhang
a7ffc12918 ZEPPELIN-2390. Improve returnType for z.checkbox
### What is this PR for?
Currently it is not convenient to access the individual item of the return value of z.checkbox, I would propose to return `Seq` for `SparkInterpreter` and `list` for `PySparkInterpreter`.  This might cause some incompatibility, but I think it is acceptable considering the benefits.  Besides that, before this PR, all the items of checkbox would be checked by default in `PySparkInterpreter` which is inconsistent with `SparkInterpreter`, so I change it to nothing is selected by default in this PR.

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

### Todos
* [ ] - Task

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

### How should this be tested?
Unit test is added

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

Author: Jeff Zhang <zjffdu@apache.org>

Closes #2241 from zjffdu/ZEPPELIN-2390 and squashes the following commits:

75e3afc [Jeff Zhang] ZEPPELIN-2390. Improve returnType for z.checkbox
2017-04-18 17:52:27 +08:00
1ambda
33663941c5 [ZEPPELIN-2315] (bug) new note.json is overwritten by old note.json (master, branch-0.7)
### What is this PR for?

- `note.json` is converted every time
- as a result, changes in `note.json` is overwritten by old `note.json`

Occurs in **0.8.0-SNAPSHOT** and **branch-0.7**

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

### Todos

NONE

### What is the Jira issue?

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

### How should this be tested?

1. create a note in 0.6.0 which including graph
2. migrate it to 0.7.0+ (just copy dir)
3. open in Zeppelin
4. click other graph type rather than table (e.g `scatter chart`)
5. restart
7. should see the last change (graph) is persisted

### 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 #2256 from 1ambda/ZEPPELIN-2315/should-convert-old-notebook-only-once and squashes the following commits:

4e77c0a8b [1ambda] fix: Convert old notebook format only once
2017-04-18 15:57:14 +09:00
1ambda
f32651e519 [HOTFIX] Invalid method signature in GroovyInterpreter
### What is this PR for?

- https://github.com/apache/zeppelin/pull/2203 was merged
- but https://github.com/apache/zeppelin/pull/2203 was not rebased recently
- as a result, `GroovyInterperter` has invalid method signature.

```
[ERROR] COMPILATION ERROR :
[ERROR] /home/travis/build/1ambda/zeppelin/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyInterpreter.java:[123,3] method does not override or implement a method from a supertype
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project zeppelin-groovy: Compilation failure
[ERROR] /home/travis/build/1ambda/zeppelin/groovy/src/main/java/org/apache/zeppelin/groovy/GroovyInterpreter.java:[123,3] method does not override or implement a method from a supertype
```

You can see CI failures in

- https://travis-ci.org/1ambda/zeppelin/jobs/222709988
- https://travis-ci.org/1ambda/zeppelin/jobs/222709989

### What type of PR is it?
[Hot Fix]

### Todos

NONE

### What is the Jira issue?

Hotfix

### How should this be tested?

- CI should be green.
- Build this PR locally, `mvn clean package -DskipTests;`

### Screenshots (if appropriate)

NONE

### 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 #2255 from 1ambda/HOTFIX/GroovyInterpreter-has-invalid-overrided-method and squashes the following commits:

29e840f [1ambda] fix: Method signature in GroovyInterpreter
2017-04-17 16:31:23 +09:00
Jun Kim
be20201236 [DOC] Improve documents related to Helium
### What is this PR for?
What I did for the documents:
* Highlight codes
* Follow JSON syntax
* Remove white spaces

And in my opinion, [here](https://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/development/writingzeppelinvisualization.html#1-create-a-npm-package) is ambiguous:
> "Normally, you can add any dependencies in package.json however Zeppelin Visualization package only allows two dependencies: zeppelin-vis and zeppelin-tabledata."

Does it want to say "you can add any dependencies in package.json, but you must include two dependencies: zeppelin-vis and zeppelin-tabledata."?

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

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

Author: Jun Kim <i2r.jun@gmail.com>

Closes #2236 from tae-jun/helium-doc and squashes the following commits:

63505e9 [Jun Kim] Fix ambiguous sentence
3e775cf [Jun Kim] Highlight codes, follow JSON syntax, and remove white spaces
2017-04-17 15:57:31 +09:00
Tinkoff DWH
4d398ef2a6 [ZEPPELIN-2297] improvements to jdbc autocompleter
### What is this PR for?
PR contains some improvements for completion (JDBC Interpreter):
- types of completion
- display of long values
- refactoring of search of completions
- uniqness of completions with type `keyword`
- updating data in completer by pressing `Ctrl + .`
- setting the schema filter to generate completions
- fix highlighting code when used not default data source

### What type of PR is it?
Improvement

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

### How should this be tested?
try to work with new completer

### Screenshots (if appropriate)
**1. Types of completion**
![1](https://cloud.githubusercontent.com/assets/25951039/24449367/758eeeac-1490-11e7-863f-bf1b313a3f4d.png)

**2. Display of long values**
before
![2297_before_long_caption](https://cloud.githubusercontent.com/assets/25951039/24449397/8ecd3072-1490-11e7-8fd4-415424ef337e.gif)
after
![2297_after_long_caption](https://cloud.githubusercontent.com/assets/25951039/24449413/9c7a36b6-1490-11e7-9d7c-cbbdac71cbe7.gif)

**3. Refactoring of search of completions. Updating data in completer by pressing `Ctrl + .`**
before
![2297_before_refactoring_search](https://cloud.githubusercontent.com/assets/25951039/24449463/c1801214-1490-11e7-84a8-25c887b68d65.gif)
after
![2297_after_refactoring_search](https://cloud.githubusercontent.com/assets/25951039/24449567/1079bdc0-1491-11e7-8409-5187aeceb428.gif)

**4. uniqness of completions with type keyword**
before
![2297_before_uniq](https://cloud.githubusercontent.com/assets/25951039/24449615/4e20c8d0-1491-11e7-94cc-c86aab886c53.gif)
after
![2297_after_uniq](https://cloud.githubusercontent.com/assets/25951039/24449635/5cf59aca-1491-11e7-8ee1-31ea3cdacb3e.gif)

**5. fix highlighting code when used not default data source**
before
![2297_before_inrpret_name](https://cloud.githubusercontent.com/assets/25951039/24449730/b6c8d62a-1491-11e7-8dc3-39fa6975c8c3.gif)
after
![2297_after_inrpret_name](https://cloud.githubusercontent.com/assets/25951039/24449738/baf63e18-1491-11e7-8711-12557a674212.gif)

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

Author: Tinkoff DWH <tinkoff.dwh@gmail.com>

Closes #2203 from tinkoff-dwh/ZEPPELIN-2297 and squashes the following commits:

b86b57a [Tinkoff DWH] [ZEPPELIN-2297] small fix to compute caption
8552049 [Tinkoff DWH] [ZEPPELIN-2297] schema filters
5308f1e [Tinkoff DWH] [ZEPPELIN-2297] updating completions
ef6c9cb [Tinkoff DWH] Merge remote-tracking branch 'origin/ZEPPELIN-2297' into ZEPPELIN-2297
1e05a68 [Tinkoff DWH] [ZEPPELIN-2297] fix uniqueness keywords
ec3cd3b [Tinkoff DWH] [ZEPPELIN-2297] fix uniqueness keywords
2b58cc5 [Tinkoff DWH] [ZEPPELIN-2297] refactoring search completions
7b5835d [Tinkoff DWH] [ZEPPELIN-2297] compute caption of copletion
1c74384 [Tinkoff DWH] [ZEPPELIN-2297] add type of completion
2017-04-17 14:18:32 +09:00
soralee
775607f103 [ZEPPELIN-2396] eliminate the 'ctrl/command+L' keyboard shortcut
### What is this PR for?
This PR is for that eliminate the `Ctrl/Command+L` shortcut keyboard. This function is what the ace editor defined.

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

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

### How should this be tested?
* **Improvement** - Press `Ctrl + L` key and check if showing the dialog or not
* **Document** - Run document development mode and check [this document](http://localhost:4000/install/upgrade.html#upgrading-from-zeppelin-07-to-08)

### Screenshots (if appropriate)
[Before]
![image](https://cloud.githubusercontent.com/assets/8110458/24990819/8529312a-2051-11e7-8849-e00803310752.png)

[After]
![z_zeppelin-2396](https://cloud.githubusercontent.com/assets/8110458/24990966/9764e108-2052-11e7-9387-560f9d587782.gif)

[Document]
![image](https://cloud.githubusercontent.com/assets/8110458/25040847/e772e024-2146-11e7-9ded-322c589b424b.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes, I did. Please review [this document](http://localhost:4000/install/upgrade.html#upgrading-from-zeppelin-07-to-08) if you run document development mode (localhost:4000)

Author: soralee <sora0728@zepl.com>

Closes #2248 from soralee/ZEPPELIN-2396_ctrl_l and squashes the following commits:

bb0f7d8 [soralee] modify document
d1f966a [soralee] modify document
928f179 [soralee] add space between + and who is providing
5f30fe4 [soralee] upgrade eliminate keyboard shortcut feature and add document
4e1b846 [soralee] ZEPPELIN-2396 drop the Ctrl+L shortcut keyboard
2017-04-17 14:16:20 +09:00
CloverHearts
8d03920b9b [Zeppelin-802] Support for Zeppelin Context redefinition on Python and Pyspark
### What is this PR for?
If you override the reserved word ZeppelinContext such as `z` in the python language, the whole paragraph output problem occurred.
I have taken care to avoid this issue.

`z` == `_zc` == `zeppelin context`

### What type of PR is it?
Improvement

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

### How should this be tested?
The error should not occur in the following situations:
```
%python
z = 1
print("Hello Zeppelin")
```

```
%pyspark
z = 1
print("Hello Zeppelin")
```

### Screenshots (if appropriate)

#### before
![replace zeppelin context-err](https://cloud.githubusercontent.com/assets/10525473/24521772/319946be-15c8-11e7-96cf-7fdf41c70a66.png)

#### after
![replace zeppelin context](https://cloud.githubusercontent.com/assets/10525473/24521775/349fa7cc-15c8-11e7-8fe4-4f3f5597deff.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>
Author: cloverhearts <cloverheartsdev@gmail.com>

Closes #2207 from cloverhearts/ZEPPELIN-802-pyspark-zeppelin-context and squashes the following commits:

cc986010 [CloverHearts] added completion on namespace
14695cb8 [CloverHearts] Recovering a member name that is not associated with a namespace
31af92ab [CloverHearts] fix test case _zc to __zeppelin__
6697d677 [CloverHearts] apply to namespace and replace name _zc to __zeppelin__
ca795cff [cloverhearts] replace output
1d372df4 [cloverhearts] change name logger
4e8435ac [CloverHearts] added test case on python
b6b804ad [CloverHearts] replace name zeppelin context on python
9fbf70d6 [CloverHearts] fix pyspark test case
987e2118 [CloverHearts] added test code
5da3d6ed [CloverHearts] replace name zeppelin context on pyspark
2017-04-17 12:39:02 +09:00
Jeff Zhang
74c0408d30 ZEPPELIN-2377. Hive Support can not be enabled in spark master
### What is this PR for?
The root cause is that `org.apache.spark.sql.hive.HiveSessionState` is removed in spark master. I change it to `org.apache.spark.sql.hive.execution.InsertIntoHiveTable` which is existed early in spark 1.0.

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

### Todos
* [ ] - Task

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

### How should this be tested?
Verify it manually in spark master, spark 2.1.0 and spark 1.6.2

### 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: Jeff Zhang <zjffdu@apache.org>

Closes #2237 from zjffdu/ZEPPELIN-2377 and squashes the following commits:

d16196b [Jeff Zhang] ZEPPELIN-2377. Hive Support can not be enabled in spark master
2017-04-17 09:21:32 +08:00
Jeff Zhang
5fd4ffc566 ZEPPELIN-2407. Livy Interpreter always return plain text result
### What is this PR for?
It happens when zeppelin.livy.displayAppInfo is true. Straightforward fix.

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

### Todos
* [ ] - Task

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

### How should this be tested?
Test is added

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

Author: Jeff Zhang <zjffdu@apache.org>

Closes #2254 from zjffdu/ZEPPELIN-2407 and squashes the following commits:

ba59a77 [Jeff Zhang] ZEPPELIN-2407. Livy Interpreter always return plain text result
2017-04-17 09:18:38 +08:00
Benoy Antony
861f1d88fe [ZEPPELIN-2355] Livy cancel enhancements
### What is this PR for?
The Cancel functionality for the Livy interpreter has few issues. One issue is because a variable is not published correctly. Second issue is observed when  there is a delay in launching the application. Any cancel before application launch is ignored.  The third issue is that Cancel is not correctly implemented for SparkSQLInterpreter.

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

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

### How should this be tested?
The test cases are modified to test the 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: Benoy Antony <benoy@apache.org>

Closes #2223 from benoyantony/livy-cancel-enhancement and squashes the following commits:

244e6d3 [Benoy Antony] clear the cancel requests if livy doesnt't support cancellation and modified testcase
75fe574 [Benoy Antony] added testcase for cancellation support on LivySparkSQLInterpreter and moved the removal to finally block
9fc6dbf [Benoy Antony] remove unrelated changes in imports
8673acf [Benoy Antony] ZEPPELIN-2355 Fix race conditions while cancelling a paragraph
2017-04-17 09:16:37 +08:00
Tinkoff DWH
e5922b6bba [ZEPPELIN-2365] button to create note into folder
### What is this PR for?
Added button to create new note into folder (home page)

### What type of PR is it?
Feature

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

### Screenshots (if appropriate)
![2365](https://cloud.githubusercontent.com/assets/25951039/24740236/86b31468-1ab9-11e7-8906-3f55ab2a7158.gif)

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

Author: Tinkoff DWH <tinkoff.dwh@gmail.com>

Closes #2228 from tinkoff-dwh/ZEPPELIN-2365 and squashes the following commits:

e870ad4 [Tinkoff DWH] Merge remote-tracking branch 'upstream/master' into ZEPPELIN-2365
0fe290e [Tinkoff DWH] [ZEPPELIN-2365] button to create note into folder
2017-04-15 08:51:56 +09:00
1ambda
45cc8a9e8a [ZEPPELIN-2217] AdvancedTransformation for Visualization
### What is this PR for?

`AdvancedTransformation` has more detailed options while providing existing features of `PivotTransformation` and `ColumnselectorTransformation` which Zeppelin already has

![av_in_30sec](https://cloud.githubusercontent.com/assets/4968473/24037330/c9478e86-0b40-11e7-9886-1ffb85042a7a.gif)

Here are some features which advanced-transformation can provide.

1. **(screenshot)** multiple sub charts
2. **(screenshot)** parameter widgets: `input`, `checkbox`, `option`, `textarea`
3. **(screenshot)** expand/fold axis and parameter panels
4. **(screenshot)** clear axis and parameter panels
5. **(screenshot)** remove duplicated columns in an axis
6. **(screenshot)** limit column count in an axis
7. configurable char axes: `valueType`, `axisType`, `description`, ...
8. configurable chart parameters
9. lazy transformation
10. parsing parameters automatically based on their type: `int`, `float`, `string`, `JSON`
11. multiple transformation methods
12. re-initialize whole configuration based on spec hash.
13. **(screenshot)** shared axis

#### API Details: Spec

`AdvancedTransformation` requires `spec` which includes axis and parameter details for charts.

- Let's create 2 sub-charts called `simple-line` and `step-line`.
- Each sub chart can have different `axis` and `parameter` depending on their requirements.

```js
  constructor(targetEl, config) {
    super(targetEl, config)

    const spec = {
      charts: {
        'simple-line': {
          sharedAxis: true, /** set if you want to share axes between sub charts, default is `false` */
          axis: {
            'xAxis': { dimension: 'multiple', axisType: 'key', },
            'yAxis': { dimension: 'multiple', axisType: 'aggregator'},
            'category': { dimension: 'multiple', axisType: 'group', },
          },
          parameter: {
            'xAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of xAxis', },
            'yAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of yAxis', },
            'dashLength': { valueType: 'int', defaultValue: 0, description: 'the length of dash', },
          },
        },

        'step-line': {
          axis: {
            'xAxis': { dimension: 'single', axisType: 'unique', },
            'yAxis': { dimension: 'multiple', axisType: 'value', },
          },
          parameter: {
            'xAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of xAxis', },
            'yAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of yAxis', },
            'noStepRisers': { valueType: 'boolean', defaultValue: false, description: 'no risers in step line', widget: 'checkbox', },
        },

      },
    }

    this.transformation = new AdvancedTransformation(config, spec)
  }
```

####  API Details: Axis Spec

| Field Name | Available Values (type) | Description |
| --- | --- | --- |
|`dimension` | `single` | Axis can contains only 1 column |
|`dimension` | `multiple` | Axis can contains multiple columns |
|`axisType` | `key` | Column(s) in this axis will be used as `key` like in `PivotTransformation`. These columns will be served in `column.key` |
|`axisType` | `aggregator` | Column(s) in this axis will be used as `value` like in `PivotTransformation`. These columns will be served in `column.aggregator` |
|`axisType` | `group` | Column(s) in this axis will be used as `group` like in `PivotTransformation`. These columns will be served in `column.group` |
|`axisType` | (string) | Any string value can be used here. These columns will be served in `column.custom` |
|`maxAxisCount` | (int) | The maximum column count that this axis can contains. (unlimited if `undefined`) |
|`valueType` | (string) | Describe the value type just for annotation |

Here is an example.

```js
          axis: {
            'xAxis': { dimension: 'multiple', axisType: 'key',  },
            'yAxis': { dimension: 'multiple', axisType: 'aggregator'},
            'category': { dimension: 'multiple', axisType: 'group', maxAxisCount: 2, valueType: 'string', },
          },
```

####  API Details: Parameter Spec

| Field Name | Available Values (type) | Description |
| --- | --- | --- |
|`valueType` | `string` | Parameter which has string value |
|`valueType` | `int` | Parameter which has int value |
|`valueType` | `float` | Parameter which has float value |
|`valueType` | `boolean` | Parameter which has boolean value used with `checkbox` widget usually |
|`valueType` | `JSON` | Parameter which has JSON value used with `textarea` widget usually. `defaultValue` should be `""` (empty string). This ||`defaultValue` | (any) | Default value of this parameter. `JSON` type should have `""` (empty string) |
|`description` | (string) | Description of this parameter. This value will be parsed as HTML for pretty output |
|`widget` | `input` |  Use [input](https://developer.mozilla.org/en/docs/Web/HTML/Element/input) widget. This is the default widget (if `widget` is undefined)|
|`widget` | `checkbox` |  Use [checkbox](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox) widget. |
|`widget` | `textarea` |  Use [textarea](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) widget. |
|`widget` | `option` |  Use [select + option](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select) widget. This parameter should have `optionValues` field as well. |
|`optionValues` | (Array<string>) |  Available option values used with the `option` widget |

Here is an example.

```js
parameter: {
  // string type, input widget
  'xAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of xAxis', },

  // boolean type, checkbox widget
  'inverted': { widget: 'checkbox', valueType: 'boolean', defaultValue: false, description: 'invert x and y axes', },

  // string type, option widget with `optionValues`
  'graphType': { widget: 'option', valueType: 'string', defaultValue: 'line', description: 'graph type', optionValues: [ 'line', 'smoothedLine', 'step', ], },

  // HTML in `description`
  'dateFormat': { valueType: 'string', defaultValue: '', description: 'format of date (<a href="https://docs.amcharts.com/3/javascriptcharts/AmGraph#dateFormat">doc</a>) (e.g YYYY-MM-DD)', },

  // JSON type, textarea widget
  'yAxisGuides': { widget: 'textarea', valueType: 'JSON', defaultValue: '', description: 'guides of yAxis ', },
```

#### API Details: Transformer Spec

`AdvancedTransformation` supports 3 transformation methods. The return value will depend on the transformation method type.

```js
    const spec = {
      charts: {
        'simple': {
          /** default value of `transform.method` is the flatten cube.  */
          axis: { ... },
          parameter: { ... }
        },

        'cube-group': {
          transform: { method: 'cube', },
          axis: { ... },
          parameter: { ... },
        }

        'no-group': {
          transform: { method: 'raw', },
          axis: { ... },
          parameter: { ... },
        }
```

| Field Name | Available Values (type) | Description |
| --- | --- | --- |
|`method` | `object` |  designed for [amcharts: serial](https://www.amcharts.com/demos/date-based-data/) |
|`method` | `array` | designed for [highcharts: column](http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/column-basic/) |
|`method` | `drill-down` | designed for [highcharts: drill-down](http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/column-drilldown/) |
|`method` | `raw` | will return the original `tableData.rows` |

Whatever you specified as `transform.method`, the `transformer` value will be always function for lazy computation.

```js
// advanced-transformation.util#getTransformer

  if (transformSpec.method === 'raw') {
    transformer = () => { return rows; }
  } else if (transformSpec.method === 'array') {
    transformer = () => {
      ...
      return { ... }
    }
  }

```

#### Feature Details: Automatic parameter parsing

Advanced transformation will parse parameter values automatically based on their type: `int`, `float`, `string`, `JSON`

- See also `advanced-transformation-util.js#parseParameter`

#### Feature Details: re-initialize the whole configuration based on spec hash

```js
// advanced-transformation-util#initializeConfig

  const currentVersion = JSON.stringify(spec)
  if (!config.spec || !config.spec.version || config.spec.version !== currentVersion) {
    spec.version = currentVersion
    // reset config...
  }
```

#### Feature Details: Shared Axes

If you set `sharedAxis` to `true` in chart specification, then these charts will share their axes. (default is `false`)

```js
    const spec = {
      charts: {
        'column': {
          transform: { method: 'array', },
          sharedAxis: true,
          axis: { ... },
          parameter: { ... },
        },

        'stacked': {
          transform: { method: 'array', },
          sharedAxis: true,
          axis: { ... }
          parameter: { ... },
        },
```

![sharedaxis](https://cloud.githubusercontent.com/assets/4968473/24207116/6999ad8a-0f63-11e7-8b61-273b712612fc.gif)

#### API Details: Usage in Visualization#render()

Let's assume that we want to create 2 sub-charts called `basic` and `no-group`.

- https://github.com/1ambda/zeppelin-ultimate-line-chart (an practical example)

```js
  drawBasicChart(parameter, column, transformer) {
    const { ... } = transformer()
  }

  drawNoGroupChart(parameter, column, transformer) {
    const { ... } = transformer()
  }

  render(data) {
    const { chart, parameter, column, transformer, } = data

    if (chart === 'basic') {
      this.drawBasicChart(parameter, column, transformer)
    } else if (chart === 'no-group') {
      this.drawNoGroupChart(parameter, column, transformer)
    }
  }
```

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

### Todos

NONE

### What is the Jira issue?

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

### How should this be tested?

1. Clone https://github.com/1ambda/zeppelin-ultimate-line-chart
2. Create a symbolic link `ultimate-line-chart.json` into `$ZEPPELIN_HOME/helium`
3. Modify the `artifact` value to proper absolute path considering your local machine.
4. Install the above visualization in `localhost:9000/#helium`
5. Test it

### Screenshots (if appropriate)

#### 1. *(screenshot)* multiple sub charts

![av_multiple_charts](https://cloud.githubusercontent.com/assets/4968473/24034638/7b84dba0-0b35-11e7-989d-059ccc87f968.gif)

#### 2. *(screenshot)* parameter widgets: `input`, `checkbox`, `option`, `textarea`

![av_widgets_new](https://cloud.githubusercontent.com/assets/4968473/24034652/88679d6c-0b35-11e7-835a-3970d7124850.gif)

#### 3. *(screenshot)* expand/fold axis and parameter panels

![av_fold_expand](https://cloud.githubusercontent.com/assets/4968473/24034653/8a634ddc-0b35-11e7-9851-15280a6b5fd3.gif)

#### 4. *(screenshot)* clear axis and parameter panels

![av_clean_buttons](https://cloud.githubusercontent.com/assets/4968473/24034654/8d3dc14a-0b35-11e7-98c7-3aeddce6d80a.gif)

#### 5. *(screenshot)* remove duplicated columns in an axis

![av_duplicated_columns](https://cloud.githubusercontent.com/assets/4968473/24034657/910f4d20-0b35-11e7-9e9b-d9e2f799a5dd.gif)

#### 6. *(screenshot)* limit column count in an axis

![av_maxaxiscount](https://cloud.githubusercontent.com/assets/4968473/24034679/a5e8eb34-0b35-11e7-89cd-070f3790d511.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 #2098 from 1ambda/ZEPPELIN-2217/advanced-transformation and squashes the following commits:

6cde7c9 [1ambda] fix reset params when spec change
c75a3f2 [1ambda] fix: Reset persisted axis
6a2130a [1ambda] fix: clear config only when axis changed
5464e84 [1ambda] fix: Optimize array 2 key method
9beb1e7 [1ambda] fix: Type error
2408225 [1ambda] test: Add test for array 2key
bf56761 [1ambda] feat: Add array:2-key transform method
7c6768f [1ambda] feat: Use axisSpec.desc as tooltip
f98d4c9 [1ambda] fix: Remove invalid key  prop
5cf2ece [1ambda] feat: Add minAxisCount
4887800 [1ambda] fix: Remove local module yarn caches
3e29572 [1ambda] refactor: copyModule func
c91a033 [1ambda] fix: Set yarn cache dir in helium-bundles
04b5140 [1ambda] fix: Import a-tr
0a876cf [1ambda] docs: Update index.md
380b1af [1ambda] docs: Fix typo and add desc for existing trs
908214b [1ambda] docs: Move experimental tags
a009627 [1ambda] feat: Allow dup aggr axis
3b44e92 [1ambda] fix: Remove unuse const
ab6c22e [1ambda] test: Add test for drill-down method
756107a [1ambda] test: Add array transformation method
d819c73 [1ambda] test: Add object method
bf00fba [1ambda] test: Add MockTableData
39fe5ae [1ambda] test: Add test for getColumnsFromAxis
4c393b4 [1ambda] fix: Add polyfill for es6 funcs in test
e92c787 [1ambda] test: Add test for rmDup, aplMaxAxisCount
843f45d [1ambda] test: Add test for getCurrent* funcs
ae5277c [1ambda] test: Add test for initializeConfig
c14a9dc7 [1ambda] test: Add tests for widget, params
c510af1 [1ambda] docs: Add doc for Transformation
52db37b [1ambda] feat: Show panel menus only when opened
17ad4a4 [1ambda] feat: Support chartChanged, parameterChanged
c0d33d3 [1ambda] fix: Sort selectors in drilldown method
cfd6fef [1ambda] feat: sharedAxis
9af80ce [1ambda] style: Indent
79b5654 [1ambda] fix: return the same info in transform
7bee464 [1ambda] fix: Keynames
ee8788e [1ambda] feat: Support drill-down
666025a [1ambda] fix: DON'T reset current chart
ae1891f [1ambda] add array:key transform
4167a2e [1ambda] fix: Sort keyNames
912b5b7 [1ambda] fix: Persist initialized config
f1f6b0c [1ambda] feat: Support ARRAY transform.method
812f9a2 [1ambda] fix: Set proper aggr value when 0 group
20f9437 [1ambda] fix: getCube func
25d51a9 [1ambda] DON'T display aggr.name when aggrColumns.length == 1
f37e13d [1ambda] fix: Add 'object' transform.method
da2370c [1ambda] fix: Add resetAxis, Param funcs
2370682 [1ambda] fix: average is not caculated correctly
dd08e38 [1ambda] fix: Set param panel height to 400
881695a [1ambda] feat: clear chart, param separately
4d0d62b [1ambda] fix: DON'T clean panel config
92676d1 [1ambda] fix: limit parameter panel height to 370
cc29060 [1ambda] feat: parse param description as HTML
9a2d227 [1ambda] fix: Stop event propagation in widgets
fcc625c [1ambda] feat: Automatic param parsing
b4d774c [1ambda] fix: Dont close param panel when enter
088705b [1ambda] refactor: Remove util and add Widget funcs
bf88b4f [1ambda] feat: textare widget and update hook
4e73012 [1ambda] feat: widget checkbox
11b7eaa [1ambda] feat: option widget
5d3efc9 [1ambda] fix: Change panel header
b1d9d31 [1ambda] feat: Save and close with enter key
53f508c [1ambda] feat: custom axisSpec
0dbc431 [1ambda] feat: Support transformer
94d837a [1ambda] feat: Automatic spec versioning
74b8b4e [1ambda] fix: Duplicated radio btn id, name
5b88f08 [1ambda] fix: Modify margin of subchart radio btns
019892c [1ambda] feat: Support transform: flatten
0484e1e [1ambda] feat: Support maxAxisCount in axisSpec
936901b [1ambda] feat: Support undefined valueType in axisSpec
7a454ff [1ambda] feat: Cube Transformation
f0ed02f [1ambda] feat: Support same axis types
49985c6 [1ambda] refactor: Refine axis, param spec
d89e223 [1ambda] feat: advanced-transformation-api
75569ce [1ambda] feat: Support multiple charts in UI
e1fcc2e [1ambda] feat: Support multiple charts
97be629 [1ambda] fix: Add singleDimensionAggregatorChanged
676bd7e [1ambda] refactor: Refine transform API
9fb398e [1ambda] feat: Add clearConfig
a8a4fb1 [1ambda] refactor: Add getAxisInSingleDimension func
9768ecf [1ambda] feat: Add groupBase axis option
91ae54d [1ambda] fix: Overflow issue in single aggr
10c80fc [1ambda] feat: AdvancedTransformation
2017-04-15 07:34:27 +09:00
Khalid Huseynov
2173b4013a [ZEPPELIN-2318] Fix proxy configuration for http client of zeppelinhub storage layer
### What is this PR for?
it fixes proxy configuration for http client of zeppelinhub storage layer. currently used jetty-client have issue with `https` over proxy ([1](https://github.com/eclipse/jetty.project/issues/408), [2](https://github.com/eclipse/jetty.project/issues/827)), so new `httpcomponents` library have been used.

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

### Todos
* [x] - implement whole client with proxy

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

### How should this be tested?
1. setup proxy and make system point to it (e.g. env should contain `https_proxy`)
2. setup storage (e.g. [here](https://zeppelin.apache.org/docs/0.7.0/storage/storage.html#storage-in-zeppelinhub))

### 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: Khalid Huseynov <khalidhnv@gmail.com>

Closes #2198 from khalidhuseynov/fix/ZEPPELIN-2318 and squashes the following commits:

8ea7d5d96 [Khalid Huseynov] edge case logs from error -> warn
34bb2ce32 [Khalid Huseynov] fix log
409993a8e [Khalid Huseynov] fix websocket timing
72fa4f12d [Khalid Huseynov] fix trans dependency problem
db07f5b56 [Khalid Huseynov] add ssl setup
8cb94006c [Khalid Huseynov] add close routine
a5711bc1d [Khalid Huseynov] jetty client relay to asyncclient when proxy on
16ccbb461 [Khalid Huseynov] add proxy client with asynclient library
d2dab6c96 [Khalid Huseynov] add dependency on asyncclient
2017-04-13 12:00:51 +09:00
LeiWang
902892a977 fix bugs for timer saver
### What is this PR for?

* add saveNote action when cron schedule setting in  file notebook.controller.js
   * case:
  open one note,edit some text in a paragraph, then do a cron schedule setting, the content which   just edited disappeared

* change invoke method for the timer saver  in file paragraph.controller.js
  * case:
   open one browser,edit some text in a paragraph, then open the note in  other browser,you will find that the text you just edited did not be synced

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

### Todos
* [ ] - Task

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

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

### Screenshots (if appropriate)

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

Author: LeiWang <wanglei6744@163.com>
Author: lei wang <lei1989@outlook.com>

Closes #2196 from wary/master and squashes the following commits:

b2ee2f9 [LeiWang] Update notebook.controller.js
2ab58c3 [LeiWang] Update notebook.controller.js
9908227 [LeiWang] Update paragraph.controller.js
3612f56 [lei wang] fix bugs for timer saver
2017-04-13 08:29:17 +09:00
Renjith Kamath
35fa9d287f ZEPPELIN-2366 In zeppelin SystemUser fails to authenticate with AD, using the password set in hadoop credential store.
### What is this PR for?
In zeppelin SystemUser fails to authenticate with AD, using the password set in hadoop credential store.

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

### Todos
* [ ] - Task

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

### How should this be tested?
Configure AD system user password using hadoop credential in shiro.ini. _(sample config in JIRA ticket)_

### Screenshots (if appropriate)

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

Author: Renjith Kamath <renjith.kamath@gmail.com>

Closes #2230 from r-kamath/ZEPPELIN-2366 and squashes the following commits:

11a8ab43d [Renjith Kamath] ZEPPELIN-2366 In zeppelin SystemUser fails to authenticate with AD, using the password set in hadoop credential store.
2017-04-12 14:58:50 +05:30
1ambda
b552314641 [ZEPPELIN-2357] fix: tooltip doesn't work in btn-group
### What is this PR for?

tooltip provided by [angular-ui: bootstrap](https://github.com/angular-ui/bootstrap) doesn't work with `btn-group` class.

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

### Todos
* [x] - fixed tooltip issue by bumping version of angular-bootstrap
* [x] - added tooltip to charts as like before

### What is the Jira issue?

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

### How should this be tested?

1. Open spark tutorial
2. Test tooltips in notebook controller and in paragraphs.

### Screenshots (if appropriate)

#### Before

![tooltip_before](https://cloud.githubusercontent.com/assets/4968473/24699102/dc76be40-1a2d-11e7-9ae3-b550a1739ca8.gif)

#### After

![tooltip_after1](https://cloud.githubusercontent.com/assets/4968473/24699105/dfaa5716-1a2d-11e7-8d8a-0576fb307200.gif)

![tooltip_after2](https://cloud.githubusercontent.com/assets/4968473/24699111/e429454a-1a2d-11e7-97cc-09bd77dcc4ca.gif)

### Questions:
* Does the licenses files need update? - YES, updated
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO

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

Closes #2225 from 1ambda/ZEPPELIN-2357/tooltip-doesnt-work-with-btngroup and squashes the following commits:

b9365c6 [1ambda] fix: Use uib-pagination directive
2522ff5 [1ambda] fix: Use uib-tooltip in IT classes
d03a70e [1ambda] fix: bin license
0b6ad26 [1ambda] feat: Tooltip for charts
1e2db4e [1ambda] fix: Use uib-tooltip instead
62784c8 [1ambda] fix: Bump up angular-bootstrap version
2017-04-11 18:11:54 +09:00
AhyoungRyu
540ceb87d8 [ZEPPELIN-2373] Remove -Pyarn build profile
### What is this PR for?
Currently users who build Zeppelin from source need to include `-Pyarn` build profile to enable Yarn for embedded local Spark. This PR is to remove `-Pyarn` and make Yarn related libraries can be automatically downloaded without the profile during build time.

### What type of PR is it?
just removed Yarn build profile in `spark-dependencies/pom.xml`

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

### How should this be tested?
1. apply this patch and build Zeppelin with below command
```
mvn clean package -DskipTests -pl 'zeppelin-server, spark-dependencies, spark' --am
```

2. check `spark-yarn_${scala.binary.version}.jar` is downloaded(or included) during build time
```
[INFO] Including org.apache.spark:spark-yarn_2.10🫙2.1.0 in the shaded jar.
```
In current master, the above line won't be shown if you don't use `-Pyarn` build profile. But with this patch, it will be shown without the profile.

### 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 #2232 from AhyoungRyu/ZEPPELIN-2373/includeYarnByDefault and squashes the following commits:

59eb2b5 [AhyoungRyu] Remove -Pyarn build profile
2017-04-10 22:56:11 +09:00