GitHub user 1ambda opened a pull request: https://github.com/apache/zeppelin/pull/1982
[ZEPPELIN-2069] Helium Package Configuration ### 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 name@package version` since each version 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 `package@version` * [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. ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - NO You can merge this pull request into a Git repository by running: $ git pull https://github.com/1ambda/zeppelin ZEPPELIN-2069/helium-package-configuration Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/1982.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1982 ---- commit a42c7887fd9b2c0aa1063d3b1a4c5822f92a757c Author: 1ambda <1am...@gmail.com> Date: 2017-02-06T07:34:32Z feat: Support config, version field for helium pkg commit 9582cb7f9055798f97dc3da53398f3ab0d17a46b Author: 1ambda <1am...@gmail.com> Date: 2017-02-06T07:34:52Z feat: Support config for helium pkg in backend commit 05499a4d35e57b46b15de69664b2322fa292ef2b Author: 1ambda <1am...@gmail.com> Date: 2017-02-06T07:37:48Z chore: Add conf to example spells commit dbd4bce99a6f762332d5516c5edd3d432636666d Author: 1ambda <1am...@gmail.com> Date: 2017-02-06T07:41:24Z feat: Support helium conf in frontend commit 2156c3c0866f1d84218b512cd92811d60263562e Author: 1ambda <1am...@gmail.com> Date: 2017-02-07T02:07:28Z refactor: Extact spell related code to helium commit e44457c04b49b6381e786fe9441089160d6c7300 Author: 1ambda <1am...@gmail.com> Date: 2017-02-07T02:23:37Z feat: Pass confs to spell interpret() commit 3d9de1ec142a947e3dceca0f715f29323e23c024 Author: 1ambda <1am...@gmail.com> Date: 2017-02-07T04:18:15Z feat: Add config to framework, examples commit fdcf0ba584ff1e9351bbc14cc366e00daa76de51 Author: 1ambda <1am...@gmail.com> Date: 2017-02-07T04:18:27Z fix: Remove digest from para ctrl ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---