Skip to content

Commit

Permalink
Merge and close #45
Browse files Browse the repository at this point in the history
  • Loading branch information
rdowner committed Apr 18, 2016
2 parents 6f8c37b + c3bb5d3 commit ffc3ee6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
14 changes: 7 additions & 7 deletions style/js/catalog/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,27 @@ 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>"
),
sensorCard: _.template(
"<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>"
),
effectorCard: _.template(
"<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>"
)
Expand Down
13 changes: 9 additions & 4 deletions website/learnmore/catalog/catalog-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,20 @@

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 {
Expand Down

0 comments on commit ffc3ee6

Please sign in to comment.