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 2015/03/28 16:10:54 UTC

[GitHub] incubator-brooklyn pull request: Smoother js gui yaml flow

GitHub user ahgittin opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/576

    Smoother js gui yaml flow

    @ggrunin had the great idea to, for yaml catalog items, show the yaml, to make it easier for people to get started with yaml.
    
    This PR goes to the existing wizard tab if it's a Java template, but if it's a YAML template it shows the edit YAML tab (and it preserves comments, so your yaml can have comments to help people edit it.)
    
    @ggrunin can you sign a CLA?

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

    $ git pull https://github.com/ahgittin/incubator-brooklyn smoother-js-gui-yaml-flow

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

    https://github.com/apache/incubator-brooklyn/pull/576.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 #576
    
----
commit 592f3efc5448ff733d48bdeac55085f0e03e0afe
Author: Galina Grunin <gg...@us.ibm.com>
Date:   2015-03-26T20:07:26Z

    add application wizard changes - switch to yaml tab on next

commit 565db3ac554546a439c736ed8ebb9b0b2d4ffcf8
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Date:   2015-03-27T23:44:57Z

    JS gui is smart about going to wizard page or yaml page after selecting item from template

----


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-88905893
  
    The alternating tab presence/absence is also a bit jarring. Open add app modal: Catalog/YAML/Other tab bar visible. Choose catalog entry and click next. Tab bar disappears. Click preview. Tab bar reappears with YAML selected. Would prefer it if the tabs were just visible the whole time. Comparatively minor!


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-90015962
  
    fixed everything but the tab/buttons where i agree with you but don't have the couple hours to tidy. thanks for great review @sjcorbett .  if you have thoughts on why `set("location",[])` isn't yaml parsing i'd be interested (See comment in last commit)


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#discussion_r27791823
  
    --- Diff: usage/jsgui/src/main/webapp/assets/js/libs/js-yaml.js ---
    @@ -0,0 +1,3666 @@
    +/* js-yaml 3.2.7 https://github.com/nodeca/js-yaml */!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.jsyaml=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
    --- End diff --
    
    yes, done


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#discussion_r27791819
  
    --- Diff: usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js ---
    @@ -398,9 +426,10 @@ define([
             addTemplateLozenge: function(that, item) {
                 var $tempel = _.template(CreateStepTemplateEntryHtml, {
                     id: item.id,
    -                name: item.name,
    +                name: item.name || item.id,
                     description: item.description,
    -                iconUrl: item.iconUrl
    +                planYaml:  item.planYaml,
    +                iconUrl: item.iconUr
    --- End diff --
    
    yes, done


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#discussion_r27654816
  
    --- Diff: usage/jsgui/src/main/webapp/assets/js/libs/js-yaml.js ---
    @@ -0,0 +1,3666 @@
    +/* js-yaml 3.2.7 https://github.com/nodeca/js-yaml */!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.jsyaml=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
    --- End diff --
    
    Need another entry in `LICENSE`?


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-90857915
  
    @ahgittin I'll double check and merge.


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-88901260
  
    Doesn't work when the "None" location is selected. Error: Uncaught JS-YAML: unacceptable kind of an object to dump [object Undefined]. Last step in unobfuscated jsgui code ~ `renderCurrentStep`.


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-90762367
  
    @sjcorbett can this be merged?  it's especially nice with https://github.com/apache/incubator-brooklyn/pull/585 !


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-88899870
  
    I would like the "Back" button to be maintained when clicking Preview. Its disappearance is surprising.


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#discussion_r27656173
  
    --- Diff: usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js ---
    @@ -398,9 +426,10 @@ define([
             addTemplateLozenge: function(that, item) {
                 var $tempel = _.template(CreateStepTemplateEntryHtml, {
                     id: item.id,
    -                name: item.name,
    +                name: item.name || item.id,
                     description: item.description,
    -                iconUrl: item.iconUrl
    +                planYaml:  item.planYaml,
    +                iconUrl: item.iconUr
    --- End diff --
    
    Definitely a typo.


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-88906935
  
    Looks really good. A couple of comments to address then happy to see this merged.


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-87342171
  
    one final change, clicking "preview" now shows the *editable* yaml view, removing the old separate preview step view


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-88899822
  
    Jumping to the YAML is great. 


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-89369831
  
    @sjcorbett thanks - great review.
    
    the `veryFirstViewLoad` message i've fixed in a separate PR.  it was introduced elsewhere.
    
    agree it would be nicer to have one flow.  it's a few hours' work though -- could this be merged without it?  i have put TODO's about it.
    
    the others i will fix.


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

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

    https://github.com/apache/incubator-brooklyn/pull/576#discussion_r27654267
  
    --- Diff: usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js ---
    @@ -398,9 +426,10 @@ define([
             addTemplateLozenge: function(that, item) {
                 var $tempel = _.template(CreateStepTemplateEntryHtml, {
                     id: item.id,
    -                name: item.name,
    +                name: item.name || item.id,
                     description: item.description,
    -                iconUrl: item.iconUrl
    +                planYaml:  item.planYaml,
    +                iconUrl: item.iconUr
    --- End diff --
    
    `iconUr`? Typo or intentional?


---
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] incubator-brooklyn pull request: Smoother js gui yaml flow

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/576#issuecomment-88897849
  
    In the logs I see this error message: "Uncaught ReferenceError: veryFirstViewLoad is not defined". I don't think it's been triggered by the changes here but worth noting.


---
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.
---