GUAC-1010: Only query contents of connection groups if they are not balancing or we have admin permission. Fix rendering of balancing groups for non-admins.

This commit is contained in:
Michael Jumper
2015-01-20 20:38:59 -08:00
parent 6d21612657
commit 97189cb991
3 changed files with 60 additions and 14 deletions

View File

@@ -159,14 +159,18 @@ angular.module('groupList').factory('GroupListItem', ['ConnectionGroup', functio
var children = [];
// Add any child connections
connectionGroup.childConnections.forEach(function addChildConnection(child) {
children.push(GroupListItem.fromConnection(child));
});
if (connectionGroup.childConnections) {
connectionGroup.childConnections.forEach(function addChildConnection(child) {
children.push(GroupListItem.fromConnection(child));
});
}
// Add any child groups
connectionGroup.childConnectionGroups.forEach(function addChildGroup(child) {
children.push(GroupListItem.fromConnectionGroup(child));
});
if (connectionGroup.childConnectionGroups) {
connectionGroup.childConnectionGroups.forEach(function addChildGroup(child) {
children.push(GroupListItem.fromConnectionGroup(child));
});
}
// Return item representing the given connection group
return new GroupListItem({

View File

@@ -255,16 +255,16 @@ div.section {
padding-left: 6px;
}
.group .icon.group.type.empty.balancer {
opacity: 1;
background-image: url('images/protocol-icons/guac-monitor.png');
}
.group.expanded > .children {
display: block;
border-left: 1px dotted rgba(0, 0, 0, 0.25);
}
.group.balancer:not(.empty) > .caption .icon.type {
display: inline-block;
background-image: url('images/protocol-icons/guac-monitor.png');
}
.group > .caption .icon.group {
opacity: 0.75;
background-image: url('images/group-icons/guac-closed.png');