mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
### What is this PR for?
Supporting helium package configurations. I attached screenshots.
#### Implementation details.
In case of spell, spell developer can create config spec in their `package.json` and it will be part of `helium.json` which is consumed by Zeppelin.
```
"config": {
"repeat": {
"type": "number",
"description": "How many times to repeat",
"defaultValue": 1
}
},
```
1. Persists conf per `package namepackage version` since each version can require different configs even if they are the same package.
2. Saves key-value config only. Since config spec (e.g `type`, `desc`, `defaultValue`) can be provided. So it's not efficient save both of them.
3. Extracts config related functions to `helium.service.js` since it can be used not only in `helium.controller.js` for view but also should be used in `paragraph.controller.js`, `result.controller.js` for executing spell.
### What type of PR is it?
[Feature]
### Todos
* [x] - create config view in `/helium`
* [x] - persist config per `packageversion`
* [x] - pass config to spell
### What is the Jira issue?
[ZEPPELIN-2069](https://issues.apache.org/jira/browse/ZEPPELIN-2069)
### How should this be tested?
- Build with examples `mvn clean package -Phelium-dev -Pexamples -DskipTests;`
- Open `/helium` page
- Update the `echo-spell` config
- Execute the spell like the screenshot below. (you don't need to refresh the page, since executing spell will fetch config from server)
### 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 #1982 from 1ambda/ZEPPELIN-2069/helium-package-configuration and squashes the following commits:
|
||
|---|---|---|
| .. | ||
| zeppelin-example-clock | ||
| zeppelin-example-horizontalbar | ||
| zeppelin-example-spell-echo | ||
| zeppelin-example-spell-flowchart | ||
| zeppelin-example-spell-markdown | ||
| zeppelin-example-spell-translator | ||
| pom.xml | ||