You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ri...@apache.org on 2016/04/18 17:04:49 UTC

[1/2] brooklyn-docs git commit: Fixes handling of undefined values in templates

Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 6f8c37bd0 -> ffc3ee63d


Fixes handling of undefined values in templates


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

Branch: refs/heads/master
Commit: c3bb5d3923ad93a7daaab109b026000993cdc547
Parents: 6f8c37b
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Wed Apr 13 12:37:43 2016 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Wed Apr 13 12:37:43 2016 +0100

----------------------------------------------------------------------
 style/js/catalog/common.js                  | 14 +++++++-------
 website/learnmore/catalog/catalog-item.html | 13 +++++++++----
 2 files changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/c3bb5d39/style/js/catalog/common.js
----------------------------------------------------------------------
diff --git a/style/js/catalog/common.js b/style/js/catalog/common.js
index 4fc5248..c2a2cd3 100644
--- a/style/js/catalog/common.js
+++ b/style/js/catalog/common.js
@@ -74,9 +74,9 @@ var brooklyn = (function ($, _) {
             "<div class='card configKey'>" +
             "<div class='name'><%=name%></div>" +
             "<dl>" +
-            "<dt>description</dt><dd><%=(description||'&nbsp;')%></dd>" +
-            "<dt>value type</dt><dd class='java'><%=(type||'&nbsp;')%></dd>" +
-            "<dt>default value</dt><dd><%=(defaultValue||'&nbsp;')%></dd>" +
+            "<dt>description</dt><dd><% if (typeof description !== 'undefined') { %><%= description %><% } else { %>&nbsp;<% } %></dd>" +
+            "<dt>value type</dt><dd class='java'><% if (typeof type !== 'undefined') { %><%= type %><% } else { %>&nbsp;<% } %></dd>" +
+            "<dt>default value</dt><dd><% if (typeof defaultValue !== 'undefined') { %><%= defaultValue %><% } else { %>&nbsp;<% } %></dd>" +
             "</dl>" +
             "</div>"
         ),
@@ -84,8 +84,8 @@ var brooklyn = (function ($, _) {
             "<div class='card sensor'>" +
             "<div class='name'><%=name%></div>" +
             "<dl>" +
-            "<dt>description</dt><dd><%=(description||'&nbsp;')%></dd>" +
-            "<dt>value type</dt><dd class='java'><%=(type||'&nbsp;')%></dd>" +
+            "<dt>description</dt><dd><% if (typeof description !== 'undefined') { %><%= description %><% } else { %>&nbsp;<% } %></dd>" +
+            "<dt>value type</dt><dd class='java'><% if (typeof type !== 'undefined') { %><%= type %><% } else { %>&nbsp;<% } %></dd>" +
             "</dl>" +
             "</div>"
         ),
@@ -93,8 +93,8 @@ var brooklyn = (function ($, _) {
             "<div class='card effector'>" +
             "<div class='name'><%=name%></div>" +
             "<dl>" +
-            "<dt>description</dt><dd><%=(description||'&nbsp;')%></dd>" +
-            "<dt>return type</dt><dd class='java'><%=(returnType||'&nbsp;')%></dd>" +
+            "<dt>description</dt><dd><% if (typeof description !== 'undefined') { %><%= description %><% } else { %>&nbsp;<% } %></dd>" +
+            "<dt>return type</dt><dd class='java'><% if (typeof returnType !== 'undefined') { %><%= returnType %><% } else { %>&nbsp;<% } %></dd>" +
             "</dl>" +
             "</div>"
         )

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/c3bb5d39/website/learnmore/catalog/catalog-item.html
----------------------------------------------------------------------
diff --git a/website/learnmore/catalog/catalog-item.html b/website/learnmore/catalog/catalog-item.html
index f0e0108..0d9f1b5 100644
--- a/website/learnmore/catalog/catalog-item.html
+++ b/website/learnmore/catalog/catalog-item.html
@@ -90,15 +90,20 @@ under the License.
 
       document.title = 'Brooklyn ' + catalog_type + ' - ' + item.name;
 
-      item.config.forEach(function (element) { $("#configKeys").append(brooklyn.configKeyCard(element)); });
+      item.config.forEach(function (element) {
+        $("#configKeys").append(brooklyn.configKeyCard(element));
+      });
 
       if(args[0] == 'entities') {
         $("#sensorsTab").show();
         $("#effectorsTab").show();
-        
-        item.sensors.forEach(function (element) { $("#sensors").append(brooklyn.sensorCard(element)); });
+        item.sensors.forEach(function (element) {
+          $("#sensors").append(brooklyn.sensorCard(element));
+        });
         if (item.effectors != undefined) {
-          item.effectors.forEach(function (element) { $("#effectors").append(brooklyn.effectorCard(element)); });
+          item.effectors.forEach(function (element) {
+            $("#effectors").append(brooklyn.effectorCard(element));
+          });
         }
         
       } else {


[2/2] brooklyn-docs git commit: Merge and close #45

Posted by ri...@apache.org.
Merge and close #45


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

Branch: refs/heads/master
Commit: ffc3ee63dbd21989839cd85ff53070a95c480bb2
Parents: 6f8c37b c3bb5d3
Author: Richard Downer <ri...@apache.org>
Authored: Mon Apr 18 16:04:10 2016 +0100
Committer: Richard Downer <ri...@apache.org>
Committed: Mon Apr 18 16:04:10 2016 +0100

----------------------------------------------------------------------
 style/js/catalog/common.js                  | 14 +++++++-------
 website/learnmore/catalog/catalog-item.html | 13 +++++++++----
 2 files changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------