On inventory tree widget, has_active_failures turns node text color to red. Checkbox at bottom filters nodes based on value of has_active_failures.

This commit is contained in:
chouseknecht
2013-06-13 16:08:17 -04:00
parent 365a21f103
commit 6806619e98
8 changed files with 83 additions and 19 deletions

View File

@@ -691,6 +691,8 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
"<i class=\"icon-remove\"></i> Delete Group</button>";
html += "</div>\n";
html += "<div id=\"tree-view\"></div>\n";
html += "<div class=\" inventory-filter\" ng-show=\"has_active_failures == true\"><label class=\"checkbox inline\">" +
"<input ng-model=\"inventoryFailureFilter\" ng-change=\"filterInventory()\" type=\"checkbox\" >Only show groups with active failures</label></div>\n";
html += "</div>\n";
}
else {
@@ -757,11 +759,11 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
html += (rfield['class']) ? 'class="'+ rfield['class'] + '"' : "";
html += ">";
if (rfield.icon) {
if (rfield.ngShow) {
html += "<i ng-show=\"" + rfield.ngShow + "\" class=\"" + rfield.icon + "\"></i>";
if (rfield.ngShowIcon) {
html += "<i ng-show=\"" + rfield.ngShowIcon + "\" class=\"" + rfield.icon + "\"></i>";
}
else {
html += this.attr(rfield,'icon');
html += this.icon(rfield.icon);
}
}
if (rfield.showValue == undefined || rfield.showValue == true) {

View File

@@ -239,13 +239,23 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
html += "<a href=\"#/" + base + "/{{" + list.iterator + ".id }}\">";
}
}
html += (list.fields[fld].icon) ? this.icon(list.fields[fld].icon) : "";
if (list.fields[fld].ngBind) {
html += "{{ " + list.fields[fld].ngBind + " }}";
if (list.fields[fld].ngShowIcon) {
html += "<i ng-show=\"" + list.fields[fld].ngShowIcon + "\" class=\"" + list.fields[fld].icon + "\"></i>";
}
else {
html += "{{" + list.iterator + "." + fld + "}}";
html += this.icon(list.fields[fld].icon);
}
if (list.fields[fld].showValue == undefined || list.fields[fld].showValue == true) {
if (list.fields[fld].ngBind) {
html += "{{ " + list.fields[fld].ngBind + " }}";
}
else {
html += "{{" + list.iterator + "." + fld + "}}";
}
}
html += ((list.fields[fld].key || list.fields[fld].link) && options.mode != 'lookup' && options.mode != 'select') ? "</a>" : "";
html += "</td>\n";
}