You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by bostko <gi...@git.apache.org> on 2016/05/24 12:02:11 UTC
[GitHub] brooklyn-ui pull request: Show config values when jumping from App...
GitHub user bostko opened a pull request:
https://github.com/apache/brooklyn-ui/pull/27
Show config values when jumping from App Wizard to YAML Preview
I hope the title explains what it is fixing

I see that the `StepDeploy.validate` does more than validating the model.
Any suggestions for separating this logic or renaming the validate method to `fillConfigAndValidate`?
I do not understand how `ModalWizard`, `ModalWizard.StepCreate` and `ModalWizard.StepDeploy` are connected to each other.
@tbouron any comments?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bostko/brooklyn-ui fix-preview-composed-yaml
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-ui/pull/27.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 #27
----
commit b6acf26fd43138e47e37ac816435b971ce5af71a
Author: Valentin Aitken <bo...@gmail.com>
Date: 2016-05-24T11:54:45Z
Show config values when jumping from App Wizard to YAML Preview
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-ui pull request: Show config values when jumping from App...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-ui/pull/27#discussion_r64535907
--- Diff: src/main/webapp/assets/js/view/application-add-wizard.js ---
@@ -303,6 +303,7 @@ define([
},
previewStep:function () {
// no need for validation if going to composer
+ this.currentView.validate();
--- End diff --
The comment right above is valid, at that point, we shouldn't validate the model but send exactly what the user specified. So rather than calling validate here, I would add this above line `317`:
```js
this.model.spec.set("config", this.currentStep.getConfigMap());
```
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-ui pull request: Show config values when jumping from App...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-ui/pull/27#discussion_r64540792
--- Diff: src/main/webapp/assets/js/view/application-add-wizard.js ---
@@ -303,6 +303,7 @@ define([
},
previewStep:function () {
// no need for validation if going to composer
+ this.currentView.model.spec.set("config", this.currentView.getConfigMap());
--- End diff --
Could you just add a comment stating what this does please? Will be useful for the future
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-ui pull request: Show config values when jumping from App...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/brooklyn-ui/pull/27
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-ui pull request: Show config values when jumping from App...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on the pull request:
https://github.com/apache/brooklyn-ui/pull/27#issuecomment-221523366
Tested, LGTM.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-ui pull request: Show config values when jumping from App...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on the pull request:
https://github.com/apache/brooklyn-ui/pull/27#issuecomment-221511446
Indeed, the config is skipped when we send the blueprint to the YAML editor, I commented on that part.
Regarding the way the steps are connected, you can look at the [global view definition](https://github.com/bostko/brooklyn-ui/blob/b6acf26fd43138e47e37ac816435b971ce5af71a/src/main/webapp/assets/js/view/application-add-wizard.js#L133-L146) and the `nextStep` and `prevStep` functions. Those are responsible to render the right step (backbone views)
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---