Create basic file structure and use common Django template for both
views. Also rework forms/YAML/Graph divs layout to make it more flexible.
Create draft version of 'Add Resource' panel for HotBuilder - with
resources filtering and a list of all available resources obtained
from server-side Heat API.
Change-Id: Ia2e4f8a63d85d8d5dd7cdd731cc4878836176070
Common part of <labeled>, <panel> and <collapsible-group> is moved to
a separate <editable-title> directive.
Implements blueprint: composable-templates
Change-Id: If5f8da39aad0f4f3195e9af18e384de9f3ed2d75
The main goal of this change is to free the potential Merlin users
from the burden of writing their custom templates when it just
involves combining widgets into different levels of nesting. Writing
custom templates still remains obligatory when some additional
controls/rendering (not provided with built-in widgets) is needed,
e.g. YAQLField.
To ease the pain of laying out the DOM snippets not known in advance I
switched from conventional Bootstrap Grid system to the Flexgrid
package which reimplements Bootstrap Grid over CSS3 Flexbox module. It
provides all the existing grid features w/o the need to cancel
floating effects with div.clearfix and adds pretty vertical/horizontal
aligning options which are very useful in Merlin.
Besides templates refactoring the filters system was also
rewritten. Filter extractPanels() now accepts one required argument,
keyExtractor function which is used to calculate a numeric values for
every field of Barricade object recursively. The fields with the same
numeric values go to the same panel, so we could define the logic of
panel extraction separately for each application built on Merlin. For
the filters following on the pipeline extractPanels() provides .each()
method, which they should use for enumeration over the panel
contents. This way the panel implements the same interface as every
other Barricade container does.
Old extractRows() and extractItems() filters are removed, as well as
the necessity to embed positioning hints into the model. As of now
precise fields ordering is lost, but will be reimplemented with an
extractFields() upgrade (ability to pass a list of field keys is yet
to come, as well as the removal of 'index' hints).
Implements blueprint: composable-templates
Implements blueprint: decouple-ui-hints-and-models
Change-Id: I73f480034730099b33afec88cddf919a7bfc441b
This patch adds FAQ and glossary
to the readme.md file.
Also this patch adds documentation
for Merlin directives.
Also this patch grunt task for generation
html from markdown.
To run this task run 'grunt md' from the
Merlin directory.
Change-Id: Ifd98fe4d9fa61bf5b7bbd71361763caa93e7ed3e
Provide a convenience fields.linkedcollection model to handle common
use-case of using @ref in a Mistral WB. Cover it with unit-tests as
well all scenarios of using fields.linkedcollection in MIstral WB.
Change-Id: I97a61262db4cc521b5c230667a49b99701318f3f
Closes-Bug: #1467514
Make it work together with validation machinery in Barricade and both
interact with standard classes in Angular. If the value is invalid
according to @constraints check, it's not propagated into the YAML
(still not true for the requred fields, has to be fixed on Barricade
side).
Change-Id: I22efce07b75aa2b55b65d3bfaab0d033fa1f0096
To make it happen <collapsible-group> directive had to undergo the
same transformation that was applied to <panel> directive: instead of
passing just a '@title' reference, the whole '=content' reference is
now passed to the <collapsible-group>'s scope. This allows to use
<editable> directive inside it with 'ng-model=group.title' as
getter/setter method. Yet <collapsible-group>'s scope wasn't remade as
radically as <panel>'s was - '&on-add' and '&on-remove' are still
there and left for future refactoring.
Change-Id: I4de7a542f282efee6deb34d4957a5873d617ad64
Closes-Bug: #1446171
Closes-Bug: #1446226
Add .remove() method to every Task instance in a Workbook, what it
actually does is sending a messages to the parent container which does
the actual deletion.
Change-Id: I0ac70bef4c2c9f241b15eff9a94f3909b733b2ff
Closes-Bug: #1436387
Instead of showing popup for the value being edited it now allows
editing the same value in-place, accompanied with 2 buttons - confirm
& reject the edit. Only when one of 2 these buttons is pressed (or
equivalend Enter/Esc keys are pressed) the value will be applied. The
<editable> directive could be used both for changing Action/Workflow
entity names, for changing dictionary and varlist keys.
Change-Id: I4e7e1c0fcaed71aa649b1c9925a9b53005ff9a2d
Closes-Bug: #1411649
Use 'collapse' directive from angular-bootstrap inside them instead of
hand-written bootstrap css transitions. Clicking on panel title no
longer collapses/expands panel contents - this is done in order enable
panel entity name in-line editing in next commit.
Change-Id: Ifcc32cd74a5482a59b417333824522ebf48c73b5
Closes-Bug: #1411636
Closes-Bug: #1428719
Due to each field template being loaded asynchronously it was possible
that some templates hadn't been put to the $templateCache by the time
they were requested from it for rendering a field directive. This lead
to some random field shown in the initial document not being rendered
at all. Fix this problem by using promises, effectively delaying the
field rendering until the moment the template is finally loaded. Using
promises also allows to not use $templateCache at all - the
templateContents are passed as resolve() method argument.
Also add 'ng-cloak' directive to the toplevel Workbook div to prevent
raw Angular template flickering during initial load.
Change-Id: I8a52b9730b52d4dd20400460137576713c081867
Closes-Bug: #1428730
Unit-testing would be easier this way.
Also clean up some remaining bits of previous version of
Mistral Workbook builder.
Implements blueprint: merlin-unittests
Change-Id: Ie82a5fd19fcd5e98d7c9d2321a9a8c93495af07f