diff --git a/guacamole/src/main/webapp/app/manage/controllers/manageConnectionController.js b/guacamole/src/main/webapp/app/manage/controllers/manageConnectionController.js index 9d5914910..fda9e28a3 100644 --- a/guacamole/src/main/webapp/app/manage/controllers/manageConnectionController.js +++ b/guacamole/src/main/webapp/app/manage/controllers/manageConnectionController.js @@ -35,6 +35,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i // Required services var $location = $injector.get('$location'); var $routeParams = $injector.get('$routeParams'); + var $translate = $injector.get('$translate'); var authenticationService = $injector.get('authenticationService'); var guacNotification = $injector.get('guacNotification'); var connectionService = $injector.get('connectionService'); @@ -100,6 +101,13 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i */ $scope.parameters = null; + /** + * The date format for use within the connection history. + * + * @type String + */ + $scope.historyDateFormat = null; + /** * The usage history of the connection being modified. * @@ -150,6 +158,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i && $scope.rootGroup !== null && $scope.connection !== null && $scope.parameters !== null + && $scope.historyDateFormat !== null && $scope.historyEntryWrappers !== null && $scope.permissions !== null && $scope.canSaveConnection !== null @@ -199,7 +208,12 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i protocolService.getProtocols().success(function protocolsReceived(protocols) { $scope.protocols = protocols; }); - + + // Get history date format + $translate('MANAGE_CONNECTION.FORMAT_HISTORY_START').then(function historyDateFormatReceived(historyDateFormat) { + $scope.historyDateFormat = historyDateFormat; + }); + // If we are editing an existing connection, pull its data if (identifier) { diff --git a/guacamole/src/main/webapp/app/manage/controllers/manageSessionsController.js b/guacamole/src/main/webapp/app/manage/controllers/manageSessionsController.js index ac56335d8..46680fb6b 100644 --- a/guacamole/src/main/webapp/app/manage/controllers/manageSessionsController.js +++ b/guacamole/src/main/webapp/app/manage/controllers/manageSessionsController.js @@ -32,6 +32,7 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj var SortOrder = $injector.get('SortOrder'); // Required services + var $translate = $injector.get('$translate'); var activeConnectionService = $injector.get('activeConnectionService'); var authenticationService = $injector.get('authenticationService'); var connectionGroupService = $injector.get('connectionGroupService'); @@ -54,6 +55,13 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj */ $scope.wrappers = null; + /** + * The date format for use for session-related dates. + * + * @type String + */ + $scope.sessionDateFormat = null; + /** * SortOrder instance which maintains the sort order of the visible * connection wrappers. @@ -192,6 +200,11 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj }); + // Get session date format + $translate('MANAGE_SESSION.FORMAT_STARTDATE').then(function sessionDateFormatReceived(sessionDateFormat) { + $scope.sessionDateFormat = sessionDateFormat; + }); + /** * Returns whether critical data has completed being loaded. * @@ -201,8 +214,9 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj */ $scope.isLoaded = function isLoaded() { - return $scope.wrappers !== null - && $scope.permissions !== null; + return $scope.wrappers !== null + && $scope.sessionDateFormat !== null + && $scope.permissions !== null; }; diff --git a/guacamole/src/main/webapp/app/manage/templates/manageConnection.html b/guacamole/src/main/webapp/app/manage/templates/manageConnection.html index 41c8db37b..7cdfabe8e 100644 --- a/guacamole/src/main/webapp/app/manage/templates/manageConnection.html +++ b/guacamole/src/main/webapp/app/manage/templates/manageConnection.html @@ -97,7 +97,7 @@ THE SOFTWARE. {{wrapper.entry.username}} - {{wrapper.entry.startDate | date:'short'}} + {{wrapper.entry.startDate | date:historyDateFormat}} {{wrapper.durationText | translate:"{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"}} diff --git a/guacamole/src/main/webapp/app/manage/templates/manageSessions.html b/guacamole/src/main/webapp/app/manage/templates/manageSessions.html index 41a49f784..b558f4076 100644 --- a/guacamole/src/main/webapp/app/manage/templates/manageSessions.html +++ b/guacamole/src/main/webapp/app/manage/templates/manageSessions.html @@ -66,7 +66,7 @@ THE SOFTWARE. {{wrapper.activeConnection.username}} - {{wrapper.activeConnection.startDate | date:'short'}} + {{wrapper.activeConnection.startDate | date:sessionDateFormat}} {{wrapper.activeConnection.remoteHost}} {{wrapper.name}} diff --git a/guacamole/src/main/webapp/translations/en_US.json b/guacamole/src/main/webapp/translations/en_US.json index 46876aa5b..da003fd38 100644 --- a/guacamole/src/main/webapp/translations/en_US.json +++ b/guacamole/src/main/webapp/translations/en_US.json @@ -23,7 +23,9 @@ "FIELD_HEADER_PASSWORD" : "Password:", "FIELD_HEADER_PASSWORD_AGAIN" : "Re-enter Password:", - + + "FORMAT_DATE_TIME_PRECISE" : "yyyy-MM-dd HH:mm:ss", + "INFO_ACTIVE_USER_COUNT" : "Currently in use by {USERS} {USERS, plural, one{user} other{users}}.", "NAME" : "Guacamole ${project.version}" @@ -155,7 +157,9 @@ "FIELD_HEADER_LOCATION" : "Location:", "FIELD_HEADER_NAME" : "Name:", "FIELD_HEADER_PROTOCOL" : "Protocol:", - + + "FORMAT_HISTORY_START" : "@:APP.FORMAT_DATE_TIME_PRECISE", + "HELP_CONNECTIONS" : "Click or tap on a connection below to manage that connection. Depending on your access level, connections can be added and deleted, and their properties (protocol, hostname, port, etc.) can be changed.", "HELP_SHOW_PASSWORD" : "Click to show password", "HELP_HIDE_PASSWORD" : "Click to hide password", @@ -245,6 +249,8 @@ "FIELD_PLACEHOLDER_FILTER" : "Filter", + "FORMAT_STARTDATE" : "@:APP.FORMAT_DATE_TIME_PRECISE", + "HELP_SESSIONS" : "All currently-active Guacamole sessions are listed here. If you wish to kill one or more sessions, check the box next to those sessions and click \"Kill Sessions\". Killing a session will immediately disconnect the user from the associated connection.", "INFO_NO_SESSIONS" : "No active sessions",