mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-09 06:31:22 +00:00
GUAC-997 Added active user count to REST API and UI.
This commit is contained in:
@@ -100,6 +100,14 @@ angular.module('groupList').factory('GroupListItem', ['ConnectionGroup', functio
|
||||
* @type Boolean
|
||||
*/
|
||||
this.isExpanded = template.isExpanded;
|
||||
|
||||
/**
|
||||
* The number of currently active users for this connection. This field
|
||||
* has no meaning for a connection group, and may be null or undefined.
|
||||
*
|
||||
* @type Number
|
||||
*/
|
||||
this.activeUsers = template.activeUsers;
|
||||
|
||||
/**
|
||||
* The connection or connection group whose data is exposed within
|
||||
@@ -134,6 +142,9 @@ angular.module('groupList').factory('GroupListItem', ['ConnectionGroup', functio
|
||||
// Type information
|
||||
isConnection : true,
|
||||
isConnectionGroup : false,
|
||||
|
||||
// Count of currently active users
|
||||
activeUsers : connection.activeUsers,
|
||||
|
||||
// Wrapped item
|
||||
wrappedItem : connection
|
||||
|
@@ -21,7 +21,7 @@
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<div class="caption">
|
||||
<div class="caption" ng-class="{active: item.activeUsers}">
|
||||
|
||||
<!-- Connection icon -->
|
||||
<div class="protocol">
|
||||
@@ -30,6 +30,11 @@
|
||||
|
||||
<!-- Connection name -->
|
||||
<span class="name">{{item.name}}</span>
|
||||
|
||||
<!-- Active user count -->
|
||||
<span class="activeUserCount" ng-show="item.activeUsers">
|
||||
{{'HOME.INFO_ACTIVE_USER_COUNT' | translate:'{USERS: item.activeUsers}'}}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -41,3 +41,10 @@
|
||||
font-style: normal;
|
||||
src: url('fonts/carlito/Carlito-Bold.woff') format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Carlito';
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
src: url('fonts/carlito/Carlito-Italic.woff') format('woff');
|
||||
}
|
||||
|
@@ -140,6 +140,16 @@ div.section {
|
||||
background: #DEB;
|
||||
}
|
||||
|
||||
.caption.active * {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.caption .activeUserCount {
|
||||
font-style: italic;
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
}
|
||||
|
||||
.list-item:not(.selected) .caption:hover {
|
||||
background: #CDA;
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<div class="caption">
|
||||
<div class="caption" ng-class="{active: item.activeUsers}">
|
||||
|
||||
<!-- Connection icon -->
|
||||
<div class="protocol">
|
||||
@@ -31,5 +31,10 @@
|
||||
<!-- Connection name -->
|
||||
<span class="name">{{item.name}}</span>
|
||||
|
||||
<!-- Active user count -->
|
||||
<span class="activeUserCount" ng-show="item.activeUsers">
|
||||
{{'MANAGE.INFO_ACTIVE_USER_COUNT' | translate:'{USERS: item.activeUsers}'}}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -79,6 +79,15 @@ angular.module('rest').factory('Connection', [function defineConnection() {
|
||||
* @type Object.<String, String>
|
||||
*/
|
||||
this.parameters = template.parameters;
|
||||
|
||||
/**
|
||||
* The count of currently active users for this connection. This field
|
||||
* will be returned from the REST API during a get operation,
|
||||
* but may not be set when doing an update or create operation.
|
||||
*
|
||||
* @type Number
|
||||
*/
|
||||
this.activeUsers = template.activeUsers;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user