You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by iu...@apache.org on 2021/05/28 12:37:07 UTC

[brooklyn-ui] branch master updated: Added logic to deplay multiple plan specs for types in the catalog section

This is an automated email from the ASF dual-hosted git repository.

iuliana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git


The following commit(s) were added to refs/heads/master by this push:
     new f86e178  Added logic to deplay multiple plan specs for types in the catalog section
     new 1dff7a9  Merge pull request #205 from iuliana/spec-hierarchy-for-catalog
f86e178 is described below

commit f86e178e3c14e0c606b0debf61fa556fd9116666
Author: iuliana <iu...@cloudsoft.io>
AuthorDate: Fri May 28 13:35:09 2021 +0100

    Added logic to deplay multiple plan specs for types in the catalog section
---
 ui-modules/catalog/app/views/bundle/type/type.state.js      |  1 +
 ui-modules/catalog/app/views/bundle/type/type.template.html | 13 +++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ui-modules/catalog/app/views/bundle/type/type.state.js b/ui-modules/catalog/app/views/bundle/type/type.state.js
index 99052e6..b8df573 100644
--- a/ui-modules/catalog/app/views/bundle/type/type.state.js
+++ b/ui-modules/catalog/app/views/bundle/type/type.state.js
@@ -122,6 +122,7 @@ export function typeController($scope, $state, $stateParams, $q, $uibModal, brBr
     ]).then(responses => {
         $scope.bundle = responses[0];
         $scope.type = responses[1];
+        this.specItem = $scope.type.specList[0];
         $scope.versions = responses[2].map(typeVersion => {
             return {
                 bundleSymbolicName: typeVersion.containingBundle.split(':')[0],
diff --git a/ui-modules/catalog/app/views/bundle/type/type.template.html b/ui-modules/catalog/app/views/bundle/type/type.template.html
index f15a273..c399b1c 100644
--- a/ui-modules/catalog/app/views/bundle/type/type.template.html
+++ b/ui-modules/catalog/app/views/bundle/type/type.template.html
@@ -121,8 +121,17 @@
                     <br-table ng-model="type.effectors" columns="tables.effectors.columns" col-width="20"></br-table>
                 </uib-tab>
 
-                <uib-tab heading="Blueprint" ng-if="isNonEmpty(type.plan.data)">
-                    <pre>{{type.plan.data}}</pre>
+                <uib-tab heading="Blueprint" ng-if="isNonEmpty(type.specList)">
+                    <div class="form-group">
+                        <select ng-if="type.specList" ng-model="ctrl.specItem"
+                                ng-options="spec.summary for spec in type.specList track by spec.summary"
+                                class="form-control ng-pristine ng-untouched">
+                        </select>
+                    </div>
+
+                    <div class="form-group">
+                        <pre ng-if="ctrl.specItem">{{ctrl.specItem.contents}}</pre>
+                    </div>
                 </uib-tab>
                 
             </uib-tabset>