mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUAC-968: Reduce number of namespaces. Adopt consistent string naming. Reorganize and reformat. Remove unused strings.
This commit is contained in:
@@ -33,18 +33,19 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
|
||||
var PermissionSet = $injector.get('PermissionSet');
|
||||
|
||||
// Required services
|
||||
var $location = $injector.get('$location');
|
||||
var $routeParams = $injector.get('$routeParams');
|
||||
var connectionService = $injector.get('connectionService');
|
||||
var connectionGroupService = $injector.get('connectionGroupService');
|
||||
var protocolService = $injector.get('protocolService');
|
||||
var $location = $injector.get('$location');
|
||||
var $routeParams = $injector.get('$routeParams');
|
||||
var connectionService = $injector.get('connectionService');
|
||||
var connectionGroupService = $injector.get('connectionGroupService');
|
||||
var protocolService = $injector.get('protocolService');
|
||||
var translationStringService = $injector.get('translationStringService');
|
||||
|
||||
/**
|
||||
* An action to be provided along with the object sent to showStatus which
|
||||
* closes the currently-shown status dialog.
|
||||
*/
|
||||
var ACKNOWLEDGE_ACTION = {
|
||||
name : "manage.error.action.acknowledge",
|
||||
name : "MANAGE_CONNECTION.ACTION_ACKNOWLEDGE",
|
||||
// Handle action
|
||||
callback : function acknowledgeCallback() {
|
||||
$scope.showStatus(false);
|
||||
@@ -103,6 +104,41 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
|
||||
$scope.parameters = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Given the internal name of a protocol, produces the translation string
|
||||
* for the localized version of that protocol's name.
|
||||
*
|
||||
* @param {String} protocolName
|
||||
* The name of the protocol.
|
||||
*
|
||||
* @returns {String}
|
||||
* The translation string which produces the localized name of the
|
||||
* protocol specified.
|
||||
*/
|
||||
$scope.getProtocolName = function getProtocolName(protocolName) {
|
||||
return 'PROTOCOL_' + translationStringService.canonicalize(protocolName) + '.NAME';
|
||||
};
|
||||
|
||||
/**
|
||||
* Given the internal name of a protocol and the internal name of a
|
||||
* parameter for that protocol, produces the translation string
|
||||
* for the localized, human-readable name of that protocol parameter.
|
||||
*
|
||||
* @param {String} protocolName
|
||||
* The name of the protocol.
|
||||
*
|
||||
* @param {String} parameterName
|
||||
* The name of the protocol parameter.
|
||||
*
|
||||
* @returns {String}
|
||||
* The translation string which produces the translated name of the
|
||||
* protocol parameter specified.
|
||||
*/
|
||||
$scope.getProtocolParameterName = function getProtocolParameterName(protocolName, parameterName) {
|
||||
return 'PROTOCOL_' + translationStringService.canonicalize(protocolName)
|
||||
+ '.FIELD_HEADER_' + translationStringService.canonicalize(parameterName);
|
||||
};
|
||||
|
||||
/**
|
||||
* Cancels all pending edits, returning to the management page.
|
||||
*/
|
||||
@@ -128,7 +164,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
|
||||
.error(function connectionSaveFailed(error) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'title' : 'MANAGE_CONNECTION.DIALOG_HEADER_ERROR',
|
||||
'text' : error.message,
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
@@ -141,7 +177,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
|
||||
* immediately deletes the current connection.
|
||||
*/
|
||||
var DELETE_ACTION = {
|
||||
name : "manage.edit.connection.delete",
|
||||
name : "MANAGE_CONNECTION.ACTION_DELETE",
|
||||
className : "danger",
|
||||
// Handle action
|
||||
callback : function deleteCallback() {
|
||||
@@ -155,7 +191,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
|
||||
* closes the currently-shown status dialog.
|
||||
*/
|
||||
var CANCEL_ACTION = {
|
||||
name : "manage.edit.connection.cancel",
|
||||
name : "MANAGE_CONNECTION.ACTION_CANCEL",
|
||||
// Handle action
|
||||
callback : function cancelCallback() {
|
||||
$scope.showStatus(false);
|
||||
@@ -178,7 +214,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
|
||||
.error(function connectionDeletionFailed(error) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'title' : 'MANAGE_CONNECTION.DIALOG_HEADER_ERROR',
|
||||
'text' : error.message,
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
@@ -194,8 +230,8 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
|
||||
|
||||
// Confirm deletion request
|
||||
$scope.showStatus({
|
||||
'title' : 'manage.edit.connection.confirmDelete.title',
|
||||
'text' : 'manage.edit.connection.confirmDelete.text',
|
||||
'title' : 'MANAGE_CONNECTION.DIALOG_HEADER_CONFIRM_DELETE',
|
||||
'text' : 'MANAGE_CONNECTION.TEXT_CONFIRM_DELETE',
|
||||
'actions' : [ DELETE_ACTION, CANCEL_ACTION]
|
||||
});
|
||||
|
||||
|
@@ -40,7 +40,7 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
|
||||
* closes the currently-shown status dialog.
|
||||
*/
|
||||
var ACKNOWLEDGE_ACTION = {
|
||||
name : "manage.error.action.acknowledge",
|
||||
name : "MANAGE_CONNECTION_GROUP.ACTION_ACKNOWLEDGE",
|
||||
// Handle action
|
||||
callback : function acknowledgeCallback() {
|
||||
$scope.showStatus(false);
|
||||
@@ -80,11 +80,11 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
|
||||
*/
|
||||
$scope.types = [
|
||||
{
|
||||
label: "organizational",
|
||||
label: "MANAGE_CONNECTION_GROUP.NAME_TYPE_ORGANIZATIONAL",
|
||||
value: ConnectionGroup.Type.ORGANIZATIONAL
|
||||
},
|
||||
{
|
||||
label : "balancing",
|
||||
label: "MANAGE_CONNECTION_GROUP.NAME_TYPE_BALANCING",
|
||||
value : ConnectionGroup.Type.BALANCING
|
||||
}
|
||||
];
|
||||
@@ -112,7 +112,7 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
|
||||
.error(function connectionGroupSaveFailed(error) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'title' : 'MANAGE_CONNECTION_GROUP.DIALOG_HEADER_ERROR',
|
||||
'text' : error.message,
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
@@ -125,7 +125,7 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
|
||||
* immediately deletes the current connection group.
|
||||
*/
|
||||
var DELETE_ACTION = {
|
||||
name : "manage.edit.connectionGroup.delete",
|
||||
name : "MANAGE_CONNECTION_GROUP.ACTION_DELETE",
|
||||
className : "danger",
|
||||
// Handle action
|
||||
callback : function deleteCallback() {
|
||||
@@ -139,7 +139,7 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
|
||||
* closes the currently-shown status dialog.
|
||||
*/
|
||||
var CANCEL_ACTION = {
|
||||
name : "manage.edit.connectionGroup.cancel",
|
||||
name : "MANAGE_CONNECTION_GROUP.ACTION_CANCEL",
|
||||
// Handle action
|
||||
callback : function cancelCallback() {
|
||||
$scope.showStatus(false);
|
||||
@@ -162,7 +162,7 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
|
||||
.error(function connectionGroupDeletionFailed(error) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'title' : 'MANAGE_CONNECTION_GROUP.DIALOG_HEADER_ERROR',
|
||||
'text' : error.message,
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
@@ -178,8 +178,8 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
|
||||
|
||||
// Confirm deletion request
|
||||
$scope.showStatus({
|
||||
'title' : 'manage.edit.connectionGroup.confirmDelete.title',
|
||||
'text' : 'manage.edit.connectionGroup.confirmDelete.text',
|
||||
'title' : 'MANAGE_CONNECTION_GROUP.DIALOG_HEADER_CONFIRM_DELETE',
|
||||
'text' : 'MANAGE_CONNECTION_GROUP.TEXT_CONFIRM_DELETE',
|
||||
'actions' : [ DELETE_ACTION, CANCEL_ACTION]
|
||||
});
|
||||
|
||||
|
@@ -40,7 +40,7 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
||||
* closes the currently-shown status dialog.
|
||||
*/
|
||||
var ACKNOWLEDGE_ACTION = {
|
||||
name : "manage.error.action.acknowledge",
|
||||
name : "MANAGE.ACTION_ACKNOWLEDGE",
|
||||
// Handle action
|
||||
callback : function acknowledgeCallback() {
|
||||
$scope.showStatus(false);
|
||||
@@ -90,7 +90,7 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
||||
.error(function userCreationFailed(error) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'title' : 'MANAGE.DIALOG_HEADER_ERROR',
|
||||
'text' : error.message,
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
|
@@ -43,7 +43,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
* closes the currently-shown status dialog.
|
||||
*/
|
||||
var ACKNOWLEDGE_ACTION = {
|
||||
name : "manage.error.action.acknowledge",
|
||||
name : "MANAGE_USER.ACTION_ACKNOWLEDGE",
|
||||
// Handle action
|
||||
callback : function acknowledgeCallback() {
|
||||
$scope.showStatus(false);
|
||||
@@ -81,19 +81,19 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
*/
|
||||
$scope.systemPermissionTypes = [
|
||||
{
|
||||
label: "manage.edit.user.administerSystem",
|
||||
label: "MANAGE_USER.FIELD_HEADER_ADMINISTER_SYSTEM",
|
||||
value: PermissionSet.SystemPermissionType.ADMINISTER
|
||||
},
|
||||
{
|
||||
label: "manage.edit.user.createUser",
|
||||
label: "MANAGE_USER.FIELD_HEADER_CREATE_NEW_USERS",
|
||||
value: PermissionSet.SystemPermissionType.CREATE_USER
|
||||
},
|
||||
{
|
||||
label: "manage.edit.user.createConnection",
|
||||
label: "MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTIONS",
|
||||
value: PermissionSet.SystemPermissionType.CREATE_CONNECTION
|
||||
},
|
||||
{
|
||||
label: "manage.edit.user.createConnectionGroup",
|
||||
label: "MANAGE_USER.FIELD_HEADER_CREATE_NEW_CONNECTION_GROUPS",
|
||||
value: PermissionSet.SystemPermissionType.CREATE_CONNECTION_GROUP
|
||||
}
|
||||
];
|
||||
@@ -328,8 +328,8 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
if ($scope.passwordMatch !== $scope.user.password) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'text' : 'manage.edit.user.passwordMismatch',
|
||||
'title' : 'MANAGE_USER.DIALOG_HEADER_ERROR',
|
||||
'text' : 'MANAGE_USER.ERROR_PASSWORD_MISMATCH',
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
return;
|
||||
@@ -349,7 +349,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
.error(function userPermissionsPatchFailed(error) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'title' : 'MANAGE_USER.DIALOG_HEADER_ERROR',
|
||||
'text' : error.message,
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
@@ -361,7 +361,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
.error(function userSaveFailed(error) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'title' : 'MANAGE_USER.DIALOG_HEADER_ERROR',
|
||||
'text' : error.message,
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
@@ -374,7 +374,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
* immediately deletes the current user.
|
||||
*/
|
||||
var DELETE_ACTION = {
|
||||
name : "manage.edit.user.delete",
|
||||
name : "MANAGE_USER.ACTION_DELETE",
|
||||
className : "danger",
|
||||
// Handle action
|
||||
callback : function deleteCallback() {
|
||||
@@ -388,7 +388,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
* closes the currently-shown status dialog.
|
||||
*/
|
||||
var CANCEL_ACTION = {
|
||||
name : "manage.edit.user.cancel",
|
||||
name : "MANAGE_USER.ACTION_CANCEL",
|
||||
// Handle action
|
||||
callback : function cancelCallback() {
|
||||
$scope.showStatus(false);
|
||||
@@ -411,7 +411,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
.error(function userDeletionFailed(error) {
|
||||
$scope.showStatus({
|
||||
'className' : 'error',
|
||||
'title' : 'manage.error.title',
|
||||
'title' : 'MANAGE_USER.DIALOG_HEADER_ERROR',
|
||||
'text' : error.message,
|
||||
'actions' : [ ACKNOWLEDGE_ACTION ]
|
||||
});
|
||||
@@ -427,8 +427,8 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
||||
|
||||
// Confirm deletion request
|
||||
$scope.showStatus({
|
||||
'title' : 'manage.edit.user.confirmDelete.title',
|
||||
'text' : 'manage.edit.user.confirmDelete.text',
|
||||
'title' : 'MANAGE_USER.DIALOG_HEADER_CONFIRM_DELETE',
|
||||
'text' : 'MANAGE_USER.TEXT_CONFIRM_DELETE',
|
||||
'actions' : [ DELETE_ACTION, CANCEL_ACTION]
|
||||
});
|
||||
|
||||
|
@@ -57,7 +57,11 @@ angular.module('manage').directive('guacConnectionParameter', [function connecti
|
||||
|
||||
},
|
||||
templateUrl: 'app/manage/templates/connectionParameter.html',
|
||||
controller: ['$scope', '$q', function connectionParameterController($scope, $q) {
|
||||
controller: ['$scope', '$injector', function connectionParameterController($scope, $injector) {
|
||||
|
||||
// Required services
|
||||
var $q = $injector.get('$q');
|
||||
var translationStringService = $injector.get('translationStringService');
|
||||
|
||||
/**
|
||||
* Deferred load of the parameter definition, pending availability
|
||||
@@ -152,6 +156,31 @@ angular.module('manage').directive('guacConnectionParameter', [function connecti
|
||||
|
||||
}); // end watch typedValue
|
||||
|
||||
/**
|
||||
* Given the internal name of a protocol, the internal name of a
|
||||
* parameter for that protocol, and the internal name for a valid
|
||||
* value of that parameter, produces the translation string for the
|
||||
* localized, human-readable name of that parameter value.
|
||||
*
|
||||
* @param {String} protocolName
|
||||
* The name of the protocol.
|
||||
*
|
||||
* @param {String} parameterName
|
||||
* The name of the protocol parameter.
|
||||
*
|
||||
* @param {String} parameterValue
|
||||
* The name of the parameter value.
|
||||
*
|
||||
* @returns {String}
|
||||
* The translation string which produces the translated name of the
|
||||
* parameter value specified.
|
||||
*/
|
||||
$scope.getProtocolParameterOption = function getProtocolParameterOption(protocolName, parameterName, parameterValue) {
|
||||
return 'PROTOCOL_' + translationStringService.canonicalize(protocolName)
|
||||
+ '.FIELD_OPTION_' + translationStringService.canonicalize(parameterName)
|
||||
+ '_' + translationStringService.canonicalize(parameterValue || 'EMPTY');
|
||||
};
|
||||
|
||||
}] // end controller
|
||||
};
|
||||
|
||||
|
@@ -23,5 +23,5 @@
|
||||
/**
|
||||
* The module for the administration functionality.
|
||||
*/
|
||||
angular.module('manage', ['btford.modal', 'groupList', 'rest']);
|
||||
angular.module('manage', ['btford.modal', 'groupList', 'locale', 'rest']);
|
||||
|
||||
|
@@ -26,5 +26,5 @@
|
||||
<input ng-show="parameter.type === 'USERNAME'" type="text" ng-model="typedValue"/>
|
||||
<input ng-show="parameter.type === 'PASSWORD'" type="password" ng-model="typedValue"/>
|
||||
<input ng-show="parameter.type === 'BOOLEAN'" type="checkbox" ng-model="typedValue"/>
|
||||
<select ng-show="parameter.type === 'ENUM'" ng-model="typedValue" ng-options="option.value as 'protocol.' + protocol.name + '.parameters.' + parameter.name + '.options.' + (option.value || 'empty') | translate for option in parameter.options | orderBy: value"></select>
|
||||
<select ng-show="parameter.type === 'ENUM'" ng-model="typedValue" ng-options="option.value as getProtocolParameterOption(protocol.name, parameter.name, option.value) | translate for option in parameter.options | orderBy: value"></select>
|
||||
</span>
|
@@ -21,22 +21,22 @@ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<div class="logout-panel">
|
||||
<a class="back button" href="#/">{{'manage.back' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'home.logout' | translate}}</a>
|
||||
<a class="back button" href="#/">{{'MANAGE.ACTION_NAVIGATE_BACK' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'MANAGE.ACTION_LOGOUT' | translate}}</a>
|
||||
</div>
|
||||
|
||||
<h2>{{'manage.administration' | translate}}</h2>
|
||||
<h2>{{'MANAGE.SECTION_HEADER_ADMINISTRATION' | translate}}</h2>
|
||||
<div ng-show="currentUserHasUpdate" class="settings section">
|
||||
|
||||
<h3 class="require-manage-users">{{'manage.users' | translate}}</h3>
|
||||
<h3 class="require-manage-users">{{'MANAGE.SECTION_HEADER_USERS' | translate}}</h3>
|
||||
<div class="require-manage-users users">
|
||||
|
||||
<p>{{'manage.usersDescription' | translate}}</p>
|
||||
<p>{{'MANAGE.HELP_USERS' | translate}}</p>
|
||||
|
||||
<!-- Control to create a new user -->
|
||||
<div class="user-add-form">
|
||||
<input type="text" ng-model="newUsername" class="name username"/>
|
||||
<button class="add-user" ng-click="newUser()">{{'manage.addUser' | translate}}</button>
|
||||
<button class="add-user" ng-click="newUser()">{{'MANAGE.ACTION_NEW_USER' | translate}}</button>
|
||||
</div>
|
||||
|
||||
<!-- List of users this user has access to -->
|
||||
@@ -50,15 +50,15 @@ THE SOFTWARE.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="require-manage-connections">{{'manage.connections' | translate}}</h3>
|
||||
<h3 class="require-manage-connections">{{'MANAGE.SECTION_HEADER_CONNECTIONS' | translate}}</h3>
|
||||
<div class="require-manage-connections connections">
|
||||
|
||||
<p>{{'manage.connectionsDescription' | translate}}</p>
|
||||
<p>{{'MANAGE.HELP_CONNECTIONS' | translate}}</p>
|
||||
|
||||
<!-- Control to create a new connection or group -->
|
||||
<div class="connection-add-form">
|
||||
<a class="add-connection button" href="#/manage/connections/">{{'manage.newConnection' | translate}}</a>
|
||||
<a class="add-connection-group button" href="#/manage/connectionGroups/">{{'manage.newGroup' | translate}}</a>
|
||||
<a class="add-connection button" href="#/manage/connections/">{{'MANAGE.ACTION_NEW_CONNECTION' | translate}}</a>
|
||||
<a class="add-connection-group button" href="#/manage/connectionGroups/">{{'MANAGE.ACTION_NEW_CONNECTION_GROUP' | translate}}</a>
|
||||
</div>
|
||||
|
||||
<!-- List of connections and groups this user has access to -->
|
||||
|
@@ -21,25 +21,25 @@ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<div class="logout-panel">
|
||||
<a class="back button" href="#/manage/">{{'manage.back' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'home.logout' | translate}}</a>
|
||||
<a class="back button" href="#/manage/">{{'MANAGE_CONNECTION.ACTION_NAVIGATE_BACK' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'MANAGE_CONNECTION.ACTION_LOGOUT' | translate}}</a>
|
||||
</div>
|
||||
|
||||
<!-- Main property editor -->
|
||||
<h2>{{'manage.edit.connection.title' | translate}}</h2>
|
||||
<h2>{{'MANAGE_CONNECTION.SECTION_HEADER_EDIT_CONNECTION' | translate}}</h2>
|
||||
<div class="section">
|
||||
<table class="properties">
|
||||
|
||||
<!-- Edit connection name -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.name' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION.FIELD_HEADER_NAME' | translate}}</th>
|
||||
|
||||
<td><input type="text" ng-model="connection.name"/></td>
|
||||
</tr>
|
||||
|
||||
<!-- Edit connection location -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.location' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION.FIELD_HEADER_LOCATION' | translate}}</th>
|
||||
|
||||
<td>
|
||||
<location-chooser value="connection.parentIdentifier" root-group="rootGroup"></location-chooser>
|
||||
@@ -49,22 +49,22 @@ THE SOFTWARE.
|
||||
|
||||
<!-- Edit connection protocol -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.protocol' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION.FIELD_HEADER_PROTOCOL' | translate}}</th>
|
||||
<td>
|
||||
<select ng-model="connection.protocol" ng-options="name as 'protocol.' + protocol.name + '.label' | translate for (name, protocol) in protocols | orderBy: name"></select>
|
||||
<select ng-model="connection.protocol" ng-options="name as getProtocolName(protocol.name) | translate for (name, protocol) in protocols | orderBy: name"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Connection parameters -->
|
||||
<h2>{{'manage.edit.connection.parameters' | translate}}</h2>
|
||||
<h2>{{'MANAGE_CONNECTION.SECTION_HEADER_PARAMETERS' | translate}}</h2>
|
||||
<div class="section" ng-class="{loading: !parameters}">
|
||||
<table class="properties">
|
||||
|
||||
<!-- All the different possible editable field types -->
|
||||
<tr ng-repeat="parameter in protocols[connection.protocol].parameters">
|
||||
<th>{{'protocol.' + connection.protocol + '.parameters.' + parameter.name + '.label' | translate}}:</th>
|
||||
<th>{{getProtocolParameterName(connection.protocol, parameter.name) | translate}}</th>
|
||||
<td>
|
||||
<guac-connection-parameter protocol="protocols[connection.protocol]" name="parameter.name" parameters="parameters"/>
|
||||
</td>
|
||||
@@ -74,21 +74,21 @@ THE SOFTWARE.
|
||||
|
||||
<!-- Form action buttons -->
|
||||
<div class="action-buttons">
|
||||
<button ng-click="saveConnection()">{{'manage.edit.connection.save' | translate}}</button>
|
||||
<button ng-click="cancel()">{{'manage.edit.connection.cancel' | translate}}</button>
|
||||
<button ng-click="deleteConnection()" class="danger">{{'manage.edit.connection.delete' | translate}}</button>
|
||||
<button ng-click="saveConnection()">{{'MANAGE_CONNECTION.ACTION_SAVE' | translate}}</button>
|
||||
<button ng-click="cancel()">{{'MANAGE_CONNECTION.ACTION_CANCEL' | translate}}</button>
|
||||
<button ng-click="deleteConnection()" class="danger">{{'MANAGE_CONNECTION.ACTION_DELETE' | translate}}</button>
|
||||
</div>
|
||||
|
||||
<!-- Connection history -->
|
||||
<h2>{{'manage.edit.connection.history.usageHistory' | translate}}</h2>
|
||||
<h2>{{'MANAGE_CONNECTION.SECTION_HEADER_HISTORY' | translate}}</h2>
|
||||
<div class="history section" ng-class="{loading: !historyEntryWrappers}">
|
||||
<p ng-hide="historyEntryWrappers.length">{{'manage.edit.connection.history.connectionNotUsed' | translate}}</p>
|
||||
<p ng-hide="historyEntryWrappers.length">{{'MANAGE_CONNECTION.INFO_CONNECTION_NOT_USED' | translate}}</p>
|
||||
<table ng-show="historyEntryWrappers.length">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.history.username' | translate}}</th>
|
||||
<th>{{'manage.edit.connection.history.startTime' | translate}}</th>
|
||||
<th>{{'manage.edit.connection.history.duration' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION.TABLE_HEADER_HISTORY_USERNAME' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION.TABLE_HEADER_HISTORY_START' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION.TABLE_HEADER_HISTORY_DURATION' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@@ -21,25 +21,25 @@ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<div class="logout-panel">
|
||||
<a class="back button" href="#/manage/">{{'manage.back' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'home.logout' | translate}}</a>
|
||||
<a class="back button" href="#/manage/">{{'MANAGE_CONNECTION_GROUP.ACTION_NAVIGATE_BACK' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'MANAGE_CONNECTION_GROUP.ACTION_LOGOUT' | translate}}</a>
|
||||
</div>
|
||||
|
||||
<!-- Main property editor -->
|
||||
<h2>{{'manage.edit.connectionGroup.title' | translate}}</h2>
|
||||
<h2>{{'MANAGE_CONNECTION_GROUP.SECTION_HEADER_EDIT_CONNECTION_GROUP' | translate}}</h2>
|
||||
<div class="section">
|
||||
<table class="properties">
|
||||
|
||||
<!-- Edit connection group name -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connectionGroup.name' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION_GROUP.FIELD_HEADER_NAME' | translate}}</th>
|
||||
|
||||
<td><input type="text" ng-model="connectionGroup.name"/></td>
|
||||
</tr>
|
||||
|
||||
<!-- Edit connection group location -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connectionGroup.location' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION_GROUP.FIELD_HEADER_LOCATION' | translate}}</th>
|
||||
|
||||
<td>
|
||||
<location-chooser value="connectionGroup.parentIdentifier" root-group="rootGroup"/>
|
||||
@@ -49,9 +49,9 @@ THE SOFTWARE.
|
||||
|
||||
<!-- Edit connection group type -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connectionGroup.type.label' | translate}}</th>
|
||||
<th>{{'MANAGE_CONNECTION_GROUP.FIELD_HEADER_TYPE' | translate}}</th>
|
||||
<td>
|
||||
<select ng-model="connectionGroup.type" ng-options="type.value as 'manage.edit.connectionGroup.type.' + type.label | translate for type in types | orderBy: name"></select>
|
||||
<select ng-model="connectionGroup.type" ng-options="type.value as type.label | translate for type in types | orderBy: name"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -59,7 +59,7 @@ THE SOFTWARE.
|
||||
|
||||
<!-- Form action buttons -->
|
||||
<div class="action-buttons">
|
||||
<button ng-click="saveConnectionGroup()">{{'manage.edit.connectionGroup.save' | translate}}</button>
|
||||
<button ng-click="cancel()">{{'manage.edit.connectionGroup.cancel' | translate}}</button>
|
||||
<button ng-click="deleteConnectionGroup()" class="danger">{{'manage.edit.connectionGroup.delete' | translate}}</button>
|
||||
<button ng-click="saveConnectionGroup()">{{'MANAGE_CONNECTION_GROUP.ACTION_SAVE' | translate}}</button>
|
||||
<button ng-click="cancel()">{{'MANAGE_CONNECTION_GROUP.ACTION_CANCEL' | translate}}</button>
|
||||
<button ng-click="deleteConnectionGroup()" class="danger">{{'MANAGE_CONNECTION_GROUP.ACTION_DELETE' | translate}}</button>
|
||||
</div>
|
@@ -21,26 +21,26 @@ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<div class="logout-panel">
|
||||
<a class="back button" href="#/manage/">{{'manage.back' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'home.logout' | translate}}</a>
|
||||
<a class="back button" href="#/manage/">{{'MANAGE_USER.ACTION_NAVIGATE_BACK' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'MANAGE_USER.ACTION_LOGOUT' | translate}}</a>
|
||||
</div>
|
||||
|
||||
<!-- Main property editor -->
|
||||
<h2>{{'manage.edit.user.title' | translate}}</h2>
|
||||
<h2>{{'MANAGE_USER.SECTION_HEADER_EDIT_USER' | translate}}</h2>
|
||||
<div class="section">
|
||||
<table class="properties">
|
||||
<tr>
|
||||
<th>{{'manage.edit.user.username' | translate}}</th>
|
||||
<th>{{'MANAGE_USER.FIELD_HEADER_USERNAME' | translate}}</th>
|
||||
|
||||
<td>{{user.username}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{'manage.edit.user.password' | translate}}</th>
|
||||
<th>{{'MANAGE_USER.FIELD_HEADER_PASSWORD' | translate}}</th>
|
||||
|
||||
<td><input ng-model="user.password" type="password" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{'manage.edit.user.passwordMatch' | translate}}</th>
|
||||
<th>{{'MANAGE_USER.FIELD_HEADER_PASSWORD_AGAIN' | translate}}</th>
|
||||
|
||||
<td><input ng-model="passwordMatch" type="password" /></td>
|
||||
</tr>
|
||||
@@ -48,7 +48,7 @@ THE SOFTWARE.
|
||||
</div>
|
||||
|
||||
<!-- System permissions section -->
|
||||
<h2>{{'manage.edit.user.permissions' | translate}}</h2>
|
||||
<h2>{{'MANAGE_USER.SECTION_HEADER_PERMISSIONS' | translate}}</h2>
|
||||
<div class="section">
|
||||
<table class="properties">
|
||||
<tr ng-repeat="systemPermissionType in systemPermissionTypes">
|
||||
@@ -60,7 +60,7 @@ THE SOFTWARE.
|
||||
</div>
|
||||
|
||||
<!-- Connection and connection group permission section -->
|
||||
<h2>{{'manage.edit.user.connections' | translate}}</h2>
|
||||
<h2>{{'MANAGE_USER.SECTION_HEADER_CONNECTIONS' | translate}}</h2>
|
||||
<div class="section" ng-class="{loading: !rootGroup}">
|
||||
<guac-group-list
|
||||
context="groupListContext"
|
||||
@@ -71,7 +71,7 @@ THE SOFTWARE.
|
||||
|
||||
<!-- Form action buttons -->
|
||||
<div class="action-buttons">
|
||||
<button ng-click="saveUser()">{{'manage.edit.user.save' | translate}}</button>
|
||||
<button ng-click="cancel()">{{'manage.edit.user.cancel' | translate}}</button>
|
||||
<button ng-click="deleteUser()" class="danger">{{'manage.edit.user.delete' | translate}}</button>
|
||||
<button ng-click="saveUser()">{{'MANAGE_USER.ACTION_SAVE' | translate}}</button>
|
||||
<button ng-click="cancel()">{{'MANAGE_USER.ACTION_CANCEL' | translate}}</button>
|
||||
<button ng-click="deleteUser()" class="danger">{{'MANAGE_USER.ACTION_DELETE' | translate}}</button>
|
||||
</div>
|
||||
|
@@ -59,15 +59,15 @@ angular.module('manage').factory('HistoryEntryWrapper', ['HistoryEntryDuration',
|
||||
*
|
||||
* @type String
|
||||
*/
|
||||
this.durationText = 'manage.edit.connection.history.formattedDuration';
|
||||
this.durationText = 'MANAGE_CONNECTION.TEXT_HISTORY_DURATION';
|
||||
|
||||
// Notify if connection is active right now
|
||||
if (historyEntry.active)
|
||||
this.durationText = 'manage.edit.connection.history.activeNow';
|
||||
this.durationText = 'MANAGE_CONNECTION.INFO_CONNECTION_ACTIVE_NOW';
|
||||
|
||||
// If connection is not active, inform use if end date is not known
|
||||
else if (!historyEntry.endDate)
|
||||
this.durationText = 'manage.edit.connection.history.unknownEnd';
|
||||
this.durationText = 'MANAGE_CONNECTION.INFO_CONNECTION_DURATION_UNKNOWN';
|
||||
|
||||
// Set the duration if the necessary information is present
|
||||
if (historyEntry.endDate && historyEntry.startDate)
|
||||
|
Reference in New Issue
Block a user