Skip to content
Permalink
Browse files
Merge and close #45
  • Loading branch information
rdowner committed Apr 18, 2016
2 parents 6f8c37b + c3bb5d3 commit ffc3ee63dbd21989839cd85ff53070a95c480bb2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
@@ -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>"
)
@@ -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 {

0 comments on commit ffc3ee6

Please sign in to comment.