You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by ahgittin <gi...@git.apache.org> on 2018/09/13 10:50:34 UTC

[GitHub] brooklyn-ui pull request #69: Fix a couple issues with composer spec/config ...

GitHub user ahgittin opened a pull request:

    https://github.com/apache/brooklyn-ui/pull/69

    Fix a couple issues with composer spec/config editor

    * more on generics
    * multiple updates to values / scope variable dereferencing

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ahgittin/brooklyn-ui fix-ui

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-ui/pull/69.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 #69
    
----
commit 0afa7e77feeed35190ee10a43a3fd186d524f2f7
Author: Alex Heneveld <al...@...>
Date:   2018-09-13T10:19:44Z

    fix more generics issue in UI wizard, for entity spec selection

commit cd2ac803f1fab71505b7400f86e9de630ba48314
Author: Alex Heneveld <al...@...>
Date:   2018-09-13T10:48:27Z

    custom widgets should not copy scope values from parent
    
    but rather reference them explicitly.  copying scope means if the parent changes that var, which it does e.g. for `config`, the child's scope value becomes disconnected.

----


---

[GitHub] brooklyn-ui issue #69: Fix a couple issues with composer spec/config editor

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-ui/pull/69
  
    FYI without Alex's fix for the custom widget, editing the value behaves really strangely. Below is a description of the behaviour I saw without this fix.
    
    For example, for a dropdown widget, select a value (e.g. “t3.micro”), and then immediately clicking to view the yaml (or click “Deploy"), then the value is not included. However, if I choose the value and then click on another config field, then the value does take effect.
    
    Similarly if I try to type text in there, it goes weird. I had previously chosen “t3.micro” from the dropdown. I then clicked on the text box, deleted the text, and typed “foo”. When I then clicked on another field and then went to the yaml view, the value was “t3.mediu” (when it should have been "foo").
    
    With a new entity, clicking in the box and typing “foo” and then return, the yaml showed just “f”.
    
    Also, the validation error does not indicate the problem (that config is `constraint: [required]`)Instead, the error was only shown at the top-level Configuration.


---

[GitHub] brooklyn-ui pull request #69: Fix a couple issues with composer spec/config ...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/69#discussion_r217351558
  
    --- Diff: ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.directive.js ---
    @@ -357,6 +357,13 @@ export function specEditorDirective($rootScope, $templateCache, $injector, $sani
                 return issues.some(issue => issue.level === ISSUE_LEVEL.ERROR) ? 'badge-danger' : 'badge-warning';
             };
     
    +        function baseType(s) {
    --- End diff --
    
    Do we need to declare `function baseType` here as well, given that we have the import `baseType` from `../util/model/entity.model` as well?


---

[GitHub] brooklyn-ui issue #69: Fix a couple issues with composer spec/config editor

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the issue:

    https://github.com/apache/brooklyn-ui/pull/69
  
    Looks good so far. Will test with a custom widget I have been developing to check that it still works...


---

[GitHub] brooklyn-ui pull request #69: Fix a couple issues with composer spec/config ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-ui/pull/69


---

[GitHub] brooklyn-ui issue #69: Fix a couple issues with composer spec/config editor

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-ui/pull/69
  
    updated, addressing aled's comment and 1:1 discussion with @tbouron to avoid the use of `$parent` entirely by leaning more on the spec editor's controller, and making a hard requirement on `specEditor`


---