mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUAC-1100: Add getActiveConnections() function to Connectable.
This commit is contained in:
		| @@ -102,12 +102,12 @@ angular.module('groupList').factory('GroupListItem', ['ConnectionGroup', functio | ||||
|         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. | ||||
|          * The number of currently active users for this connection or | ||||
|          * connection group, if known. | ||||
|          *  | ||||
|          * @type Number | ||||
|          */ | ||||
|         this.activeUsers = template.activeUsers; | ||||
|         this.activeConnections = template.activeConnections; | ||||
|  | ||||
|         /** | ||||
|          * The connection or connection group whose data is exposed within | ||||
| @@ -143,8 +143,8 @@ angular.module('groupList').factory('GroupListItem', ['ConnectionGroup', functio | ||||
|             isConnection      : true, | ||||
|             isConnectionGroup : false, | ||||
|              | ||||
|             // Count of currently active users | ||||
|             activeUsers : connection.activeUsers, | ||||
|             // Count of currently active connections using this connection | ||||
|             activeConnections : connection.activeConnections, | ||||
|  | ||||
|             // Wrapped item | ||||
|             wrappedItem : connection | ||||
| @@ -198,6 +198,9 @@ angular.module('groupList').factory('GroupListItem', ['ConnectionGroup', functio | ||||
|             // Already-converted children | ||||
|             children : children, | ||||
|  | ||||
|             // Count of currently active connection groups using this connection | ||||
|             activeConnections : connectionGroup.activeConnections, | ||||
|  | ||||
|             // Wrapped item | ||||
|             wrappedItem : connectionGroup | ||||
|  | ||||
|   | ||||
| @@ -21,7 +21,7 @@ | ||||
|        THE SOFTWARE. | ||||
|     --> | ||||
|  | ||||
|     <div class="caption" ng-class="{active: item.activeUsers}"> | ||||
|     <div class="caption" ng-class="{active: item.activeConnections}"> | ||||
|  | ||||
|         <!-- Connection icon --> | ||||
|         <div class="protocol"> | ||||
| @@ -32,8 +32,8 @@ | ||||
|         <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 class="activeUserCount" ng-show="item.activeConnections"> | ||||
|             {{'HOME.INFO_ACTIVE_USER_COUNT' | translate:'{USERS: item.activeConnections}'}} | ||||
|         </span> | ||||
|  | ||||
|     </div> | ||||
|   | ||||
| @@ -21,7 +21,7 @@ | ||||
|        THE SOFTWARE. | ||||
|     --> | ||||
|  | ||||
|     <div class="caption" ng-class="{active: item.activeUsers}"> | ||||
|     <div class="caption" ng-class="{active: item.activeConnections}"> | ||||
|  | ||||
|         <!-- Connection icon --> | ||||
|         <div class="protocol"> | ||||
| @@ -32,8 +32,8 @@ | ||||
|         <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 class="activeUserCount" ng-show="item.activeConnections"> | ||||
|             {{'MANAGE.INFO_ACTIVE_USER_COUNT' | translate:'{USERS: item.activeConnections}'}} | ||||
|         </span> | ||||
|          | ||||
|     </div> | ||||
|   | ||||
| @@ -81,13 +81,13 @@ angular.module('rest').factory('Connection', [function defineConnection() { | ||||
|         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. | ||||
|          * The count of currently active connections using this connection. | ||||
|          * This field will be returned from the REST API during a get | ||||
|          * operation, but manually setting this field will have no effect. | ||||
|          *  | ||||
|          * @type Number | ||||
|          */ | ||||
|         this.activeUsers = template.activeUsers; | ||||
|         this.activeConnections = template.activeConnections; | ||||
|  | ||||
|     }; | ||||
|  | ||||
|   | ||||
| @@ -91,6 +91,15 @@ angular.module('rest').factory('ConnectionGroup', [function defineConnectionGrou | ||||
|          */ | ||||
|         this.childConnectionGroups = template.childConnectionGroups; | ||||
|  | ||||
|         /** | ||||
|          * The count of currently active connections using this connection | ||||
|          * group. This field will be returned from the REST API during a get | ||||
|          * operation, but manually setting this field will have no effect. | ||||
|          *  | ||||
|          * @type Number | ||||
|          */ | ||||
|         this.activeConnections = template.activeConnections; | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user