Display active status of connections.

This commit is contained in:
Michael Jumper
2013-03-03 16:38:54 -08:00
parent 1a12a73d2a
commit df1bf63525
4 changed files with 53 additions and 2 deletions

View File

@@ -463,6 +463,14 @@ GuacUI.Connection = function(connection) {
caption.appendChild(protocol);
caption.appendChild(name);
// Add active usages (if any)
var active_users = connection.currentUsage();
if (active_users > 0) {
var usage = GuacUI.createChildElement(caption, "span", "usage");
usage.textContent = "Currently in use by " + active_users + " user(s)";
GuacUI.addClass(element, "in-use");
}
// Assemble connection icon
element.appendChild(thumbnail);
element.appendChild(caption);