Hi AlexZ, and Brooklyners-

AlexZ has been working on better blueprint editor support, in part in #865. This is currently blocked because the "application-add-wizard" doesn't play nicely with CodeMirror. (The wizard impl tries to copy HTML elements, but
CodeMirror only binds to one of them, I think, or something like that!)

Having chatted about it we think the YAML editor doesn't fit in this wizard at all. We propose a new top-level Composer tab.

This should simplify #930 also.

Details below:

* add app wizard is *only* for catalog; the tab where you add yaml (and the little-used "others") will be removed * you still have an optional "preview" step which a user can visit after the "friendly" set-config step (step 2)
        * it has options to "Edit in Composer" or "Deploy Now"
* for "template" items which currently render as yaml as in step 2 (e.g. if it includes a location) it doesn't make sense to show the set-config and the usual path is to go to composer; * in step 2 instead of set-config, we show the "preview" tab, again with "edit in composer" and "deploy now" as buttons * and a wee banner at the top saying "this item is a template; it is recommended to [edit in composer]" or similar * in time, validate the blueprint and disable "deploy now" if e.g. location is called "change me!"
                (or better, evolve how we deal with templates)
* there is a new top-level "Composer" tab shown between Applications and Catalog
    * this is where you write yaml
    * buttons to "add to catalog" and "deploy now"
* soon this will support drag-and-drop, a graphical view of apps, and a palette (what AZ is working on) * we might also have other tabs a la Swagger Hub which show the documentation
        e.g. config keys, sensors, effectors, in a pretty way
* NB: there are actually two modes supported here, writing apps and adding to catalog; while it is supported to add to catalog by passing a normal blueprint, the catalog.bom syntax has more options and so -- in time -- the edit experience should become more sophisticated for adding to catalog, e.g. defining catalog metadata, tests, etc * the "Catalog" tab need no longer support writing YAML there, as we have the composer; * if someone clicks "YAML" after + here, they are taken to composer; they can add to catalog from there * soon after, we improve that experience, maybe by making locations easier to define in the composer, and by supported edits to an existing catalog item, and automatically suggesting the version to save as (same version if it is SNAPSHOT, or minor version bump with SNAPSHOT added otherwise) * we'd also like a way in the UI to apply a blueprint version upgrade to running entity/application instances (we have this in the backend but not in the REST API support); being able to edit-and-apply via the composer could be quite cool, e.g. if you are adding new effectors etc (in time, not immediate!) * NB: it might also be useful to have a "diff" view for catalog to see what changes between versions, e.g. if someone is thinking of applying a version update they can "preview changes"

Best
AlexH

[1] https://github.com/apache/incubator-brooklyn/pull/865

Reply via email to