mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31: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">
|
<tr ng-repeat="wrapper in historyEntryWrappers">
|
||||||
<td class="username">{{wrapper.entry.username}}</td>
|
<td class="username">{{wrapper.entry.username}}</td>
|
||||||
<td class="start">{{wrapper.entry.startDate | date:'short'}}</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 class="duration">
|
||||||
<td ng-show="!wrapper.entry.endDate && !wrapper.entry.active" class="duration">{{'manage.edit.connection.history.unknownEnd' | translate}}</td>
|
<span ng-show="wrapper.duration">{{'manage.edit.connection.history.formattedDuration' | translate:"{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"}}</span>
|
||||||
<td ng-show="wrapper.entry.active" class="duration">{{'manage.edit.connection.history.activeNow' | translate}}</td>
|
<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>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -103,8 +103,8 @@ angular.module('manage').factory('HistoryEntryWrapper', [function defineHistoryE
|
|||||||
*/
|
*/
|
||||||
this.duration = null;
|
this.duration = null;
|
||||||
|
|
||||||
// Set the duration if the necessary information is present
|
// Set the duration if the necessary information is present and the entry is not still active
|
||||||
if (historyEntry.endDate && historyEntry.startDate)
|
if (historyEntry.endDate && historyEntry.startDate && !historyEntry.active)
|
||||||
this.duration = formatMilliseconds(historyEntry.endDate - historyEntry.startDate);
|
this.duration = formatMilliseconds(historyEntry.endDate - historyEntry.startDate);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user