mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-30 16:43:22 +00:00 
			
		
		
		
	GUAC-933 Cleaned up history entry display logic a bit.
This commit is contained in:
		| @@ -97,9 +97,11 @@ THE SOFTWARE. | ||||
|                         <tr ng-repeat="wrapper in historyEntryWrappers"> | ||||
|                             <td class="username">{{wrapper.entry.username}}</td> | ||||
|                             <td class="start">{{wrapper.entry.startDate | date:'short'}}</td> | ||||
|                             <td ng-show="wrapper.entry.endDate && !wrapper.entry.active" class="duration">{{'manage.edit.connection.history.formattedDuration' | translate:"{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"}}</td> | ||||
|                             <td ng-show="!wrapper.entry.endDate && !wrapper.entry.active" class="duration">{{'manage.edit.connection.history.unknownEnd' | translate}}</td> | ||||
|                             <td ng-show="wrapper.entry.active" class="duration">{{'manage.edit.connection.history.activeNow' | translate}}</td> | ||||
|                             <td class="duration"> | ||||
|                                 <span ng-show="wrapper.duration">{{'manage.edit.connection.history.formattedDuration' | translate:"{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"}}</span> | ||||
|                                 <span ng-show="wrapper.entry.active">{{'manage.edit.connection.history.activeNow' | translate}}</span> | ||||
|                                 <span ng-show="!wrapper.entry.active && !wrapper.duration">{{'manage.edit.connection.history.unknownEnd' | translate}}</span> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                     </tbody> | ||||
|                 </table> | ||||
|   | ||||
| @@ -103,8 +103,8 @@ angular.module('manage').factory('HistoryEntryWrapper', [function defineHistoryE | ||||
|          */ | ||||
|         this.duration = null; | ||||
|  | ||||
|         // Set the duration if the necessary information is present | ||||
|         if (historyEntry.endDate && historyEntry.startDate) | ||||
|         // Set the duration if the necessary information is present and the entry is not still active | ||||
|         if (historyEntry.endDate && historyEntry.startDate && !historyEntry.active) | ||||
|             this.duration = formatMilliseconds(historyEntry.endDate - historyEntry.startDate); | ||||
|  | ||||
|     }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user