Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6ff68dd
Follow jshint rules
minahlee Feb 5, 2015
8be474c
Adding TypeScript to frontend build facilities
Feb 6, 2015
dfbc00d
initial migration to Typescript
swkimme Feb 8, 2015
12a1f5e
fix web build
swkimme Feb 8, 2015
3bf0562
define zeppelin js module, stylish codes (" to ', spaces between +, etc)
swkimme Feb 8, 2015
284ad82
Add interpreter setting edit function
minahlee Feb 8, 2015
556e665
Consistent capitalization for interpreter setting description
minahlee Feb 8, 2015
764ab2b
Make new properties added without clicking plus button
minahlee Feb 8, 2015
8f97a2c
initial structure on paragraph.ts
swkimme Feb 9, 2015
25dd0a3
initial structure for nav.ts, notebook.ts
swkimme Feb 9, 2015
0e84e83
manually merge #322 (fix multi event catch)
swkimme Feb 9, 2015
17bdfd1
interface to class for Notebook, NotebookConfig
swkimme Feb 9, 2015
d68d326
fix wrong merge
swkimme Feb 9, 2015
42ee61e
try typing events
swkimme Feb 9, 2015
d5e6bf5
Merge commit '764ab2beaa69b4c22325ae2053c5bcd1959dde23' into enhancem…
swkimme Feb 9, 2015
0e0a4e0
Merge commit '078e77c76dd6385797e9c67247090bdacf872988' into enhancem…
swkimme Feb 9, 2015
5f39cb9
manually merge commit eb5c275
swkimme Feb 9, 2015
12ca171
add more events to event.ts
swkimme Feb 10, 2015
fe17dc0
fix to make ngmin works
swkimme Feb 10, 2015
62697ff
divide editor controller from paragraph controller
swkimme Feb 10, 2015
a063b94
clean up runParagraph method signature
swkimme Feb 10, 2015
9848bc5
divide paragraph_result.html paragraph_result.ts from paragraph.html …
swkimme Feb 10, 2015
5bc9212
cleaner codes
swkimme Feb 10, 2015
391ff09
refactored some codes
swkimme Feb 11, 2015
8967d5c
updated zeppelin-web docs
swkimme Feb 11, 2015
14a0d59
update doc
swkimme Feb 11, 2015
17b569c
Merge remote-tracking branch 'origin/master' into enhancement/add-typ…
swkimme Feb 12, 2015
b23bba8
remove unnecessary line
swkimme Feb 12, 2015
8aa0e40
change typescript directory structure
swkimme Feb 13, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ public class SparkInterpreter extends Interpreter {
"spark",
SparkInterpreter.class.getName(),
new InterpreterPropertyBuilder()
.add("spark.app.name", "Zeppelin", "The name of spark application")
.add("spark.app.name", "Zeppelin", "The name of spark application.")
.add("master",
getSystemDefault("MASTER", "spark.master", "local[*]"),
"spark master uri. ex) spark://masterhost:7077")
"Spark master uri. ex) spark://masterhost:7077")
.add("spark.executor.memory",
getSystemDefault(null, "spark.executor.memory", "512m"),
"executor memory per worker instance. ex) 512m, 32g")
"Executor memory per worker instance. ex) 512m, 32g")
.add("spark.cores.max",
getSystemDefault(null, "spark.cores.max", ""),
"total number of cores to use. Empty value uses all available core")
"Total number of cores to use. Empty value uses all available core.")
.add("args", "", "spark commandline args").build());

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public class SparkSqlInterpreter extends Interpreter {
"spark",
SparkSqlInterpreter.class.getName(),
new InterpreterPropertyBuilder()
.add("zeppelin.spark.maxResult", "10000", "Max number of SparkSQL result to display")
.add("zeppelin.spark.maxResult", "10000", "Max number of SparkSQL result to display.")
.add("zeppelin.spark.useHiveContext", "false",
"use HiveContext instead of SQLContext if it is true")
"Use HiveContext instead of SQLContext if it is true.")
.add("zeppelin.spark.concurrentSQL", "false",
"Execute multiple SQL concurrently if set true.")
.build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,23 @@ public Response newSettings(String message) throws InterpreterException, IOExcep
return new JsonResponse(Status.CREATED, "").build();
}

@PUT
@Path("setting/{settingId}")
public Response updateSetting(String message, @PathParam("settingId") String settingId) {
logger.info("Update interpreterSetting {}", settingId);
try {
Properties p = gson.fromJson(message, Properties.class);
interpreterFactory.setPropertyAndRestart(settingId, p);
} catch (InterpreterException e) {
return new JsonResponse(Status.NOT_FOUND, e.getMessage(), e).build();
}
InterpreterSetting setting = interpreterFactory.get(settingId);
if (setting == null) {
return new JsonResponse(Status.NOT_FOUND, "", settingId).build();
}
return new JsonResponse(Status.OK, "", setting).build();
}

@DELETE
@Path("setting/{settingId}")
@ApiOperation(httpMethod = "GET", value = "Remove interpreter setting")
Expand Down
28 changes: 26 additions & 2 deletions zeppelin-web/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ module.exports = function (grunt) {
livereload: '<%= connect.options.livereload %>'
}
},
scripts: {
files: ['<%= yeoman.app %>/scripts/ts/**/*.ts'],
tasks: ['typescript'],
options: {
spawn: false
}
},
jsTest: {
files: ['test/spec/{,*/}*.js'],
tasks: ['newer:jshint:test', 'karma']
Expand Down Expand Up @@ -348,9 +355,23 @@ module.exports = function (grunt) {
configFile: 'test/karma.conf.js',
singleRun: true
}
},

typescript: {
base: {
src: ['<%= yeoman.app %>/typescripts/**/*.ts'],
dest: '<%= yeoman.app %>/scripts/',
options: {
module: 'amd', //or commonjs
target: 'es5', //or es3
basePath: '<%= yeoman.app %>/typescripts/',
sourceMap: true,
declaration: true
}
}
}
});

});

grunt.registerTask('serve', 'Compile then start a connect web server', function (target) {
if (target === 'dist') {
Expand All @@ -359,8 +380,9 @@ module.exports = function (grunt) {

grunt.task.run([
'clean:server',
'typescript',
'wiredep',
'concurrent:server',
'concurrent:dist',
'autoprefixer',
'connect:livereload',
/*'newer:jshint'*/
Expand All @@ -375,6 +397,7 @@ module.exports = function (grunt) {

grunt.registerTask('test', [
'clean:server',
'typescript',
'concurrent:test',
'autoprefixer',
'connect:test',
Expand All @@ -383,6 +406,7 @@ module.exports = function (grunt) {

grunt.registerTask('build', [
'clean:dist',
'typescript',
'wiredep',
'useminPrepare',
'concurrent:dist',
Expand Down
31 changes: 26 additions & 5 deletions zeppelin-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ This is a Zeppelin web frontend project.

## Compile Zeppelin web
If you want to compile the WebApplication, you will have to simply run `mvn package`.
This will Download all the dependencies including node js and npm (you will find the binaries in the folder `zeppelin-web/node`).
This will Download all the dependencies including node js and npm
(you will find the binaries in the folder `zeppelin-web/node`).

We also provide some **helper script** for bower and grunt (you dont need to install them).
We also provide some **helper script** for bower and grunt
(you dont need to install them).

In case of the error `ECMDERR Failed to execute "git ls-remote --tags --heads git://xxxxx", exit code of #128`
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://`

Expand All @@ -20,24 +23,42 @@ Try to add to the `.bowerrc` file the following content:
"https-proxy" : "http://<host>:<port>"
```


and retry to build again.

## Contribute on Zeppelin Web
If you wish to help us to contribute on Zeppelin Web, you will need to install some deps.
Here this is a good start to understand how zeppelin web is architectured.
http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/

Also, Zeppelin uses Typescript http://www.typescriptlang.org/ to maintain
stable structure of javascript codes .
You can read a good article on using AngularJs with Typescript in the next link.
http://www.scottlogic.com/blog/2014/08/26/StrongTypingWithAngularJS.html

### Run the application in dev mode
``./grunt serve``

### Build the application
`./grunt build`

### Add composents to Zeppelin Webapp
### Add components to Zeppelin Webapp
* New controller : `yo angular:controller <controlerName>`
* New directive : `yo angular:directive <directiveName>`
* New service : `yo angular:service <serviceName>`

(Currently, adding components by Yeoman (yo) is broken,
because officially Yeoman doesn't support Typescript.)

You can generate codes by manually installing yo and linking generator.
reference: https://github.com/yeoman/yeoman/blob/master/contributing.md

generator supporting Typescript:
https://github.com/eggers/generator-angular

command:
`yo angular:controller <name> --typescript`

(Need test if a generated codes works well.)

### Add plugin

Expand Down
Loading