brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drigod...@apache.org
Subject [1/2] brooklyn-ui git commit: Add support for enricher catalog items
Date Tue, 09 May 2017 16:23:50 GMT
Repository: brooklyn-ui
Updated Branches:
  refs/heads/master ac272ddcc -> a2042ab53


Add support for enricher catalog items


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/f2f58b86
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/f2f58b86
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/f2f58b86

Branch: refs/heads/master
Commit: f2f58b86f4402ecccce5a6592a7521046497f246
Parents: d9b82df
Author: Thomas Bouron <thomas.bouron@cloudsoftcorp.com>
Authored: Fri Apr 14 20:10:59 2017 +0100
Committer: Thomas Bouron <thomas.bouron@cloudsoftcorp.com>
Committed: Fri Apr 14 20:10:59 2017 +0100

----------------------------------------------------------------------
 src/main/webapp/assets/js/view/catalog.js | 11 +++++++++++
 src/main/webapp/assets/js/view/editor.js  |  3 +++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/f2f58b86/src/main/webapp/assets/js/view/catalog.js
----------------------------------------------------------------------
diff --git a/src/main/webapp/assets/js/view/catalog.js b/src/main/webapp/assets/js/view/catalog.js
index d5a0064..284784c 100644
--- a/src/main/webapp/assets/js/view/catalog.js
+++ b/src/main/webapp/assets/js/view/catalog.js
@@ -448,6 +448,16 @@ define([
                     model: Entity.Model,
                     autoOpen: this.options.kind == "policies"
                 }),
+                "enrichers": new AccordionEntityView({
+                    // TODO needs parsing, and probably its own model
+                    // but cribbing "entity" works for now
+                    // (and not setting a model can cause errors intermittently)
+                    onItemSelected: _.partial(this.showCatalogItem, DetailsEntityHtml),
+                    name: "enrichers",
+                    singular: "enricher",
+                    model: Entity.Model,
+                    autoOpen: this.options.kind == "enrichers"
+                }),
                 "locations": new AccordionItemView({
                     name: "locations",
                     singular: "location",
@@ -511,6 +521,7 @@ define([
             this.loadAccordionItem("entities", id);
             this.loadAccordionItem("applications", id);
             this.loadAccordionItem("policies", id);
+            this.loadAccordionItem("enrichers", id);
             this.loadAccordionItem("locations", id);
         },
 

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/f2f58b86/src/main/webapp/assets/js/view/editor.js
----------------------------------------------------------------------
diff --git a/src/main/webapp/assets/js/view/editor.js b/src/main/webapp/assets/js/view/editor.js
index 5d10100..862c01b 100644
--- a/src/main/webapp/assets/js/view/editor.js
+++ b/src/main/webapp/assets/js/view/editor.js
@@ -352,6 +352,9 @@ define([
                             case 'policy':
                                 url += '/policies';
                                 break;
+                            case 'enricher':
+                                url += '/enrichers';
+                                break;
                             case 'location':
                                 url += '/locations';
                                 break;


Mime
View raw message