zeppelin/zeppelin-web
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
..
src [ZEPPELIN-212] Multiple paragraph results 2016-11-30 17:23:57 -08:00
test [ZEPPELIN-212] Multiple paragraph results 2016-11-30 17:23:57 -08:00
.bowerrc Rename zeppelin-web2 -> zeppelin-web 2014-09-06 11:36:28 +09:00
.editorconfig Rename zeppelin-web2 -> zeppelin-web 2014-09-06 11:36:28 +09:00
.eslintrc [ZEPPELIN-1667] add support for es6 2016-11-24 18:22:59 +09:00
.jscsrc [ZEPPELIN-235] jscs in zeppelin-web 2016-07-08 21:53:15 +05:30
bower.json [ZEPPELIN-777] Math formula support 2016-11-09 10:05:57 -08:00
Gruntfile.js [ZEPPELIN-1667] add support for es6 2016-11-24 18:22:59 +09:00
package.json ZEPPELIN-1703: frontend - skip PhantomJS on -DskipTests 2016-11-25 19:22:36 +09:00
pom.xml [ZEPPELIN-1667] Fix maven options while updating node, npm packages 2016-11-23 20:58:08 +09:00
README.md [ZEPPELIN-1667] Fix maven options while updating node, npm packages 2016-11-23 20:58:08 +09:00

Zeppelin Web Application

This is Zeppelin's frontend project.

Development Guide

Packaging

If you want to package the zeppelin-web only, simply run this command in this folder.
This will download all the dependencies including node (the binaries in the folder zeppelin-web/node)

$ mvn package 

Local Development

It is recommended to install node 6.0.0+ since Zeppelin uses 6.9.1+ (see creationix/nvm)

All build commands are described in package.json

# install required depepdencies and bower packages (only once)
$ npm install

# build zeppelin-web for production
$ npm run build

# run frontend application only in dev mode (localhost:9000) 
# you need to run zeppelin backend instance also
$ npm run start 

# execute tests
$ npm run test

Troubleshooting

Git error

In case of the error ECMDERR Failed to execute "git ls-remote --tags --heads git://xxxxx", exit code of #128

change your git config with git config --global url."https://".insteadOf git://

Proxy issues

Try to add to the .bowerrc file the following content:

  "proxy" : "http://<host>:<port>",
  "https-proxy" : "http://<host>:<port>"

also try to add proxy info to npm install command:

<execution>
	<id>npm install</id>
	<goals>
    	<goal>npm</goal>
    </goals>
    <configuration>
    	<arguments>--proxy=http://<host>:<port> --https-proxy=http://<host>:<port></arguments>
    </configuration>
</execution>

and retry to build again.

Contribute on Zeppelin Web

If you wish to help us and contribute to Zeppelin WebApplication, please look at the overall project contribution guidelines and the more focused Zeppelin WebApplication's documentation.