mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Merge pull request #296 from glyptodon/connection-perm-filter
GUAC-1406: Filter connections/groups within user edit screen.
This commit is contained in:
@@ -53,18 +53,3 @@ div.recent-connections div.connection {
|
|||||||
max-width: 75%;
|
max-width: 75%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection-list-ui .header .filter {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.75em 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.connection-list-ui .header .filter input {
|
|
||||||
-moz-border-radius: 0;
|
|
||||||
-webkit-border-radius: 0;
|
|
||||||
-khtml-border-radius: 0;
|
|
||||||
border-radius: 0;
|
|
||||||
border: none;
|
|
||||||
border-left: 1px solid rgba(0, 0, 0, 0.125);
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
107
guacamole/src/main/webapp/app/index/styles/headers.css
Normal file
107
guacamole/src/main/webapp/app/index/styles/headers.css
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.5em;
|
||||||
|
|
||||||
|
font-size: 2em;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.25em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
padding: 0.75em 0.5em;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.125);
|
||||||
|
background: rgba(0, 0, 0, 0.04);
|
||||||
|
|
||||||
|
margin-bottom: 1em;
|
||||||
|
margin-top: 0;
|
||||||
|
border-top: none;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
/* IE10 */
|
||||||
|
display: -ms-flexbox;
|
||||||
|
-ms-flex-align: stretch;
|
||||||
|
-ms-flex-direction: row;
|
||||||
|
|
||||||
|
/* Ancient Mozilla */
|
||||||
|
display: -moz-box;
|
||||||
|
-moz-box-align: stretch;
|
||||||
|
-moz-box-orient: horizontal;
|
||||||
|
|
||||||
|
/* Ancient WebKit */
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-align: stretch;
|
||||||
|
-webkit-box-orient: horizontal;
|
||||||
|
|
||||||
|
/* Old WebKit */
|
||||||
|
display: -webkit-flex;
|
||||||
|
-webkit-align-items: stretch;
|
||||||
|
-webkit-flex-direction: row;
|
||||||
|
|
||||||
|
/* W3C */
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.header ~ * .header,
|
||||||
|
.header ~ .header {
|
||||||
|
margin-top: 1em;
|
||||||
|
border-top: 1px solid rgba(0, 0, 0, 0.125);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header h2 {
|
||||||
|
-ms-flex: 1 1 auto;
|
||||||
|
-moz-box-flex: 1;
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1 1 auto;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .filter {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.75em 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .filter input {
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-khtml-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
border: none;
|
||||||
|
border-left: 1px solid rgba(0, 0, 0, 0.125);
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2013 Glyptodon LLC
|
* Copyright (C) 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
|
||||||
@@ -39,77 +39,6 @@ img {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
|
||||||
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.5em;
|
|
||||||
|
|
||||||
font-size: 2em;
|
|
||||||
vertical-align: middle;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 1.25em;
|
|
||||||
font-weight: bold;
|
|
||||||
text-transform: uppercase;
|
|
||||||
padding: 0.75em 0.5em;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
|
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
|
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.125);
|
|
||||||
background: rgba(0, 0, 0, 0.04);
|
|
||||||
|
|
||||||
margin-bottom: 1em;
|
|
||||||
margin-top: 0;
|
|
||||||
border-top: none;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
/* IE10 */
|
|
||||||
display: -ms-flexbox;
|
|
||||||
-ms-flex-align: stretch;
|
|
||||||
-ms-flex-direction: row;
|
|
||||||
|
|
||||||
/* Ancient Mozilla */
|
|
||||||
display: -moz-box;
|
|
||||||
-moz-box-align: stretch;
|
|
||||||
-moz-box-orient: horizontal;
|
|
||||||
|
|
||||||
/* Ancient WebKit */
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-align: stretch;
|
|
||||||
-webkit-box-orient: horizontal;
|
|
||||||
|
|
||||||
/* Old WebKit */
|
|
||||||
display: -webkit-flex;
|
|
||||||
-webkit-align-items: stretch;
|
|
||||||
-webkit-flex-direction: row;
|
|
||||||
|
|
||||||
/* W3C */
|
|
||||||
display: flex;
|
|
||||||
align-items: stretch;
|
|
||||||
flex-direction: row;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.header ~ * .header,
|
|
||||||
.header ~ .header {
|
|
||||||
margin-top: 1em;
|
|
||||||
border-top: 1px solid rgba(0, 0, 0, 0.125);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header h2 {
|
|
||||||
-ms-flex: 1 1 auto;
|
|
||||||
-moz-box-flex: 1;
|
|
||||||
-webkit-box-flex: 1;
|
|
||||||
-webkit-flex: 1 1 auto;
|
|
||||||
flex: 1 1 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section {
|
div.section {
|
||||||
margin: 1em;
|
margin: 1em;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@@ -36,7 +36,6 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
|||||||
// 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 $q = $injector.get('$q');
|
|
||||||
var authenticationService = $injector.get('authenticationService');
|
var authenticationService = $injector.get('authenticationService');
|
||||||
var connectionGroupService = $injector.get('connectionGroupService');
|
var connectionGroupService = $injector.get('connectionGroupService');
|
||||||
var dataSourceService = $injector.get('dataSourceService');
|
var dataSourceService = $injector.get('dataSourceService');
|
||||||
@@ -120,7 +119,26 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
|
|||||||
* @type Object.<String, ConnectionGroup>
|
* @type Object.<String, ConnectionGroup>
|
||||||
*/
|
*/
|
||||||
$scope.rootGroups = null;
|
$scope.rootGroups = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of all connection properties that are filterable.
|
||||||
|
*
|
||||||
|
* @type String[]
|
||||||
|
*/
|
||||||
|
$scope.filteredConnectionProperties = [
|
||||||
|
'name',
|
||||||
|
'protocol'
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of all connection group properties that are filterable.
|
||||||
|
*
|
||||||
|
* @type String[]
|
||||||
|
*/
|
||||||
|
$scope.filteredConnectionGroupProperties = [
|
||||||
|
'name'
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of data source identifiers to the set of all permissions
|
* A map of data source identifiers to the set of all permissions
|
||||||
* associated with the current user under that data source, or null if the
|
* associated with the current user under that data source, or null if the
|
||||||
|
@@ -87,11 +87,18 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
<!-- Connection permissions section -->
|
<!-- Connection permissions section -->
|
||||||
<div class="connection-permissions" ng-show="canChangePermissions()">
|
<div class="connection-permissions" ng-show="canChangePermissions()">
|
||||||
<h2 class="header">{{'MANAGE_USER.SECTION_HEADER_CONNECTIONS' | translate}}</h2>
|
<div class="header">
|
||||||
|
<h2>{{'MANAGE_USER.SECTION_HEADER_CONNECTIONS' | translate}}</h2>
|
||||||
|
<guac-group-list-filter connection-groups="rootGroups"
|
||||||
|
filtered-connection-groups="filteredRootGroups"
|
||||||
|
placeholder="'MANAGE_USER.FIELD_PLACEHOLDER_FILTER' | translate"
|
||||||
|
connection-properties="filteredConnectionProperties"
|
||||||
|
connection-group-properties="filteredConnectionGroupProperties"></guac-group-list-filter>
|
||||||
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<guac-group-list
|
<guac-group-list
|
||||||
context="groupListContext"
|
context="groupListContext"
|
||||||
connection-groups="rootGroups"
|
connection-groups="filteredRootGroups"
|
||||||
connection-template="'app/manage/templates/connectionPermission.html'"
|
connection-template="'app/manage/templates/connectionPermission.html'"
|
||||||
connection-group-template="'app/manage/templates/connectionGroupPermission.html'"
|
connection-group-template="'app/manage/templates/connectionGroupPermission.html'"
|
||||||
page-size="20"/>
|
page-size="20"/>
|
||||||
|
@@ -254,6 +254,8 @@
|
|||||||
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
||||||
"FIELD_HEADER_USERNAME" : "Benutzername:",
|
"FIELD_HEADER_USERNAME" : "Benutzername:",
|
||||||
|
|
||||||
|
"FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER",
|
||||||
|
|
||||||
"INFO_READ_ONLY" : "Dieses Benutzerkonto kann nicht bearbeitet werden.",
|
"INFO_READ_ONLY" : "Dieses Benutzerkonto kann nicht bearbeitet werden.",
|
||||||
|
|
||||||
"SECTION_HEADER_CONNECTIONS" : "Verbindungen",
|
"SECTION_HEADER_CONNECTIONS" : "Verbindungen",
|
||||||
|
@@ -254,6 +254,8 @@
|
|||||||
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
||||||
"FIELD_HEADER_USERNAME" : "Username:",
|
"FIELD_HEADER_USERNAME" : "Username:",
|
||||||
|
|
||||||
|
"FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER",
|
||||||
|
|
||||||
"INFO_READ_ONLY" : "Sorry, but this user account cannot be edited.",
|
"INFO_READ_ONLY" : "Sorry, but this user account cannot be edited.",
|
||||||
|
|
||||||
"SECTION_HEADER_CONNECTIONS" : "Connections",
|
"SECTION_HEADER_CONNECTIONS" : "Connections",
|
||||||
|
@@ -245,6 +245,8 @@
|
|||||||
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
||||||
"FIELD_HEADER_USERNAME" : "Identifiant:",
|
"FIELD_HEADER_USERNAME" : "Identifiant:",
|
||||||
|
|
||||||
|
"FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER",
|
||||||
|
|
||||||
"SECTION_HEADER_CONNECTIONS" : "Connexions",
|
"SECTION_HEADER_CONNECTIONS" : "Connexions",
|
||||||
"SECTION_HEADER_EDIT_USER" : "Modifier Utilisateur",
|
"SECTION_HEADER_EDIT_USER" : "Modifier Utilisateur",
|
||||||
"SECTION_HEADER_PERMISSIONS" : "Permissions",
|
"SECTION_HEADER_PERMISSIONS" : "Permissions",
|
||||||
|
@@ -242,6 +242,8 @@
|
|||||||
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
||||||
"FIELD_HEADER_USERNAME" : "Username:",
|
"FIELD_HEADER_USERNAME" : "Username:",
|
||||||
|
|
||||||
|
"FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER",
|
||||||
|
|
||||||
"SECTION_HEADER_CONNECTIONS" : "Connessioni",
|
"SECTION_HEADER_CONNECTIONS" : "Connessioni",
|
||||||
"SECTION_HEADER_EDIT_USER" : "Modifica Utente",
|
"SECTION_HEADER_EDIT_USER" : "Modifica Utente",
|
||||||
"SECTION_HEADER_PERMISSIONS" : "Permessi",
|
"SECTION_HEADER_PERMISSIONS" : "Permessi",
|
||||||
|
@@ -254,6 +254,8 @@
|
|||||||
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
||||||
"FIELD_HEADER_USERNAME" : "Gebruikersnaam:",
|
"FIELD_HEADER_USERNAME" : "Gebruikersnaam:",
|
||||||
|
|
||||||
|
"FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER",
|
||||||
|
|
||||||
"INFO_READ_ONLY" : "Sorry, maar dit gebruikers account kan niet gewijzigd worden",
|
"INFO_READ_ONLY" : "Sorry, maar dit gebruikers account kan niet gewijzigd worden",
|
||||||
|
|
||||||
"SECTION_HEADER_CONNECTIONS" : "Verbindingen",
|
"SECTION_HEADER_CONNECTIONS" : "Verbindingen",
|
||||||
|
@@ -242,6 +242,8 @@
|
|||||||
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
"FIELD_HEADER_PASSWORD_AGAIN" : "@:APP.FIELD_HEADER_PASSWORD_AGAIN",
|
||||||
"FIELD_HEADER_USERNAME" : "Имя пользователя:",
|
"FIELD_HEADER_USERNAME" : "Имя пользователя:",
|
||||||
|
|
||||||
|
"FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER",
|
||||||
|
|
||||||
"SECTION_HEADER_CONNECTIONS" : "Подключения",
|
"SECTION_HEADER_CONNECTIONS" : "Подключения",
|
||||||
"SECTION_HEADER_EDIT_USER" : "Редактировать пользователя",
|
"SECTION_HEADER_EDIT_USER" : "Редактировать пользователя",
|
||||||
"SECTION_HEADER_PERMISSIONS" : "Разрешения",
|
"SECTION_HEADER_PERMISSIONS" : "Разрешения",
|
||||||
|
Reference in New Issue
Block a user