mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-586: Add localized data source names. Display data sources as tabs within user edit screen.
This commit is contained in:
@@ -33,6 +33,14 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"DATA_SOURCE_MYSQL" : {
|
||||||
|
"NAME" : "MySQL"
|
||||||
|
},
|
||||||
|
|
||||||
|
"DATA_SOURCE_POSTGRESQL" : {
|
||||||
|
"NAME" : "PostgreSQL"
|
||||||
|
},
|
||||||
|
|
||||||
"USER_ATTRIBUTES" : {
|
"USER_ATTRIBUTES" : {
|
||||||
|
|
||||||
"FIELD_HEADER_DISABLED" : "Login disabled:",
|
"FIELD_HEADER_DISABLED" : "Login disabled:",
|
||||||
|
@@ -7,6 +7,10 @@
|
|||||||
|
|
||||||
"authProviders" : [
|
"authProviders" : [
|
||||||
"net.sourceforge.guacamole.net.auth.ldap.LDAPAuthenticationProvider"
|
"net.sourceforge.guacamole.net.auth.ldap.LDAPAuthenticationProvider"
|
||||||
|
],
|
||||||
|
|
||||||
|
"translations" : [
|
||||||
|
"translations/en.json"
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
"DATA_SOURCE_LDAP" : {
|
||||||
|
"NAME" : "LDAP"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -7,6 +7,10 @@
|
|||||||
|
|
||||||
"authProviders" : [
|
"authProviders" : [
|
||||||
"net.sourceforge.guacamole.net.auth.noauth.NoAuthenticationProvider"
|
"net.sourceforge.guacamole.net.auth.noauth.NoAuthenticationProvider"
|
||||||
|
],
|
||||||
|
|
||||||
|
"translations" : [
|
||||||
|
"translations/en.json"
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
"DATA_SOURCE_NOAUTH" : {
|
||||||
|
"NAME" : "NoAuth"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -28,18 +28,20 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
|||||||
|
|
||||||
// Required types
|
// Required types
|
||||||
var ConnectionGroup = $injector.get('ConnectionGroup');
|
var ConnectionGroup = $injector.get('ConnectionGroup');
|
||||||
|
var PageDefinition = $injector.get('PageDefinition');
|
||||||
var PermissionFlagSet = $injector.get('PermissionFlagSet');
|
var PermissionFlagSet = $injector.get('PermissionFlagSet');
|
||||||
var PermissionSet = $injector.get('PermissionSet');
|
var PermissionSet = $injector.get('PermissionSet');
|
||||||
|
|
||||||
// Required services
|
// Required services
|
||||||
var $location = $injector.get('$location');
|
var $location = $injector.get('$location');
|
||||||
var $routeParams = $injector.get('$routeParams');
|
var $routeParams = $injector.get('$routeParams');
|
||||||
var authenticationService = $injector.get('authenticationService');
|
var authenticationService = $injector.get('authenticationService');
|
||||||
var connectionGroupService = $injector.get('connectionGroupService');
|
var connectionGroupService = $injector.get('connectionGroupService');
|
||||||
var guacNotification = $injector.get('guacNotification');
|
var guacNotification = $injector.get('guacNotification');
|
||||||
var permissionService = $injector.get('permissionService');
|
var permissionService = $injector.get('permissionService');
|
||||||
var schemaService = $injector.get('schemaService');
|
var schemaService = $injector.get('schemaService');
|
||||||
var userService = $injector.get('userService');
|
var translationStringService = $injector.get('translationStringService');
|
||||||
|
var userService = $injector.get('userService');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An action to be provided along with the object sent to showStatus which
|
* An action to be provided along with the object sent to showStatus which
|
||||||
@@ -120,6 +122,28 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
|||||||
*/
|
*/
|
||||||
$scope.attributes = null;
|
$scope.attributes = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The pages associated with each user account having the given username.
|
||||||
|
* Each user account will be associated with a particular data source.
|
||||||
|
*
|
||||||
|
* @type PageDefinition[]
|
||||||
|
*/
|
||||||
|
$scope.accountPages = (function getAccountPages(dataSources) {
|
||||||
|
|
||||||
|
var accountPages = [];
|
||||||
|
|
||||||
|
// Add an account page for each applicable data source
|
||||||
|
angular.forEach(dataSources, function addAccountPage(dataSource) {
|
||||||
|
accountPages.push(new PageDefinition(
|
||||||
|
translationStringService.canonicalize('DATA_SOURCE_' + dataSource) + '.NAME',
|
||||||
|
'/manage/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(username)
|
||||||
|
));
|
||||||
|
});
|
||||||
|
|
||||||
|
return accountPages;
|
||||||
|
|
||||||
|
})(authenticationService.getAvailableDataSources());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether critical data has completed being loaded.
|
* Returns whether critical data has completed being loaded.
|
||||||
*
|
*
|
||||||
|
25
guacamole/src/main/webapp/app/manage/styles/manage-user.css
Normal file
25
guacamole/src/main/webapp/app/manage/styles/manage-user.css
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2015 Glyptodon LLC
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.manage-user .username.header {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright 2014 Glyptodon LLC.
|
Copyright 2015 Glyptodon LLC.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -20,28 +20,25 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div class="view" ng-class="{loading: !isLoaded()}">
|
<div class="manage-user view" ng-class="{loading: !isLoaded()}">
|
||||||
|
|
||||||
<!-- Main property editor -->
|
<!-- Main property editor -->
|
||||||
<div class="header">
|
<div class="username header">
|
||||||
<h2>{{'MANAGE_USER.SECTION_HEADER_EDIT_USER' | translate}}</h2>
|
<h2>{{user.username}}</h2>
|
||||||
<guac-user-menu></guac-user-menu>
|
<guac-user-menu></guac-user-menu>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="settings-tabs">
|
||||||
|
<guac-page-list pages="accountPages"></guac-page-list>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<table class="properties">
|
<table class="properties">
|
||||||
<tr>
|
|
||||||
<th>{{'MANAGE_USER.FIELD_HEADER_USERNAME' | translate}}</th>
|
|
||||||
|
|
||||||
<td>{{user.username}}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{'MANAGE_USER.FIELD_HEADER_PASSWORD' | translate}}</th>
|
<th>{{'MANAGE_USER.FIELD_HEADER_PASSWORD' | translate}}</th>
|
||||||
|
|
||||||
<td><input ng-model="user.password" type="password" /></td>
|
<td><input ng-model="user.password" type="password" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{'MANAGE_USER.FIELD_HEADER_PASSWORD_AGAIN' | translate}}</th>
|
<th>{{'MANAGE_USER.FIELD_HEADER_PASSWORD_AGAIN' | translate}}</th>
|
||||||
|
|
||||||
<td><input ng-model="passwordMatch" type="password" /></td>
|
<td><input ng-model="passwordMatch" type="password" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -125,6 +125,10 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"DATA_SOURCE_DEFAULT" : {
|
||||||
|
"NAME" : "Default (XML)"
|
||||||
|
},
|
||||||
|
|
||||||
"FORM" : {
|
"FORM" : {
|
||||||
|
|
||||||
"FIELD_PLACEHOLDER_DATE" : "YYYY-MM-DD",
|
"FIELD_PLACEHOLDER_DATE" : "YYYY-MM-DD",
|
||||||
|
Reference in New Issue
Block a user