mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUACAMOLE-5: Expose session as a REST resource. Refactor /api/data to /api/session/data.
This commit is contained in:
@@ -60,7 +60,7 @@ angular.module('rest').factory('activeConnectionService', ['$injector',
|
||||
// Retrieve tunnels
|
||||
return $http({
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/activeConnections',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/activeConnections',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -159,7 +159,7 @@ angular.module('rest').factory('activeConnectionService', ['$injector',
|
||||
// Perform active connection deletion via PATCH
|
||||
return $http({
|
||||
method : 'PATCH',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/activeConnections',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/activeConnections',
|
||||
params : httpParameters,
|
||||
data : activeConnectionPatch
|
||||
});
|
||||
|
@@ -73,7 +73,7 @@ angular.module('rest').factory('connectionGroupService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.connections,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connectionGroups/' + encodeURIComponent(connectionGroupID) + '/tree',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connectionGroups/' + encodeURIComponent(connectionGroupID) + '/tree',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -106,7 +106,7 @@ angular.module('rest').factory('connectionGroupService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.connections,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connectionGroups/' + encodeURIComponent(connectionGroupID),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connectionGroups/' + encodeURIComponent(connectionGroupID),
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -136,7 +136,7 @@ angular.module('rest').factory('connectionGroupService', ['$injector',
|
||||
if (!connectionGroup.identifier) {
|
||||
return $http({
|
||||
method : 'POST',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connectionGroups',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connectionGroups',
|
||||
params : httpParameters,
|
||||
data : connectionGroup
|
||||
})
|
||||
@@ -152,7 +152,7 @@ angular.module('rest').factory('connectionGroupService', ['$injector',
|
||||
else {
|
||||
return $http({
|
||||
method : 'PUT',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connectionGroups/' + encodeURIComponent(connectionGroup.identifier),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connectionGroups/' + encodeURIComponent(connectionGroup.identifier),
|
||||
params : httpParameters,
|
||||
data : connectionGroup
|
||||
})
|
||||
@@ -185,7 +185,7 @@ angular.module('rest').factory('connectionGroupService', ['$injector',
|
||||
// Delete connection group
|
||||
return $http({
|
||||
method : 'DELETE',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connectionGroups/' + encodeURIComponent(connectionGroup.identifier),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connectionGroups/' + encodeURIComponent(connectionGroup.identifier),
|
||||
params : httpParameters
|
||||
})
|
||||
|
||||
|
@@ -56,7 +56,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.connections,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id),
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -84,7 +84,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
// Retrieve connection history
|
||||
return $http({
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id) + '/history',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id) + '/history',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -113,7 +113,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.connections,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id) + '/parameters',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id) + '/parameters',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -143,7 +143,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
if (!connection.identifier) {
|
||||
return $http({
|
||||
method : 'POST',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections',
|
||||
params : httpParameters,
|
||||
data : connection
|
||||
})
|
||||
@@ -159,7 +159,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
else {
|
||||
return $http({
|
||||
method : 'PUT',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(connection.identifier),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(connection.identifier),
|
||||
params : httpParameters,
|
||||
data : connection
|
||||
})
|
||||
@@ -192,7 +192,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
// Delete connection
|
||||
return $http({
|
||||
method : 'DELETE',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(connection.identifier),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(connection.identifier),
|
||||
params : httpParameters
|
||||
})
|
||||
|
||||
|
@@ -76,7 +76,7 @@ angular.module('rest').factory('historyService', ['$injector',
|
||||
// Retrieve connection history
|
||||
return $http({
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/history/connections',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/history/connections',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
|
@@ -62,7 +62,7 @@ angular.module('rest').factory('permissionService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.users,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(userID) + '/permissions',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(userID) + '/permissions',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -235,7 +235,7 @@ angular.module('rest').factory('permissionService', ['$injector',
|
||||
// Patch user permissions
|
||||
return $http({
|
||||
method : 'PATCH',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(userID) + '/permissions',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(userID) + '/permissions',
|
||||
params : httpParameters,
|
||||
data : permissionPatch
|
||||
})
|
||||
|
@@ -58,7 +58,7 @@ angular.module('rest').factory('schemaService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.schema,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/schema/userAttributes',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/schema/userAttributes',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -92,7 +92,7 @@ angular.module('rest').factory('schemaService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.schema,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/schema/connectionAttributes',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/schema/connectionAttributes',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -126,7 +126,7 @@ angular.module('rest').factory('schemaService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.schema,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/schema/connectionGroupAttributes',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/schema/connectionGroupAttributes',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -157,7 +157,7 @@ angular.module('rest').factory('schemaService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.schema,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/schema/protocols',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/schema/protocols',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
|
@@ -70,7 +70,7 @@ angular.module('rest').factory('userService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.users,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/users',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/users',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -103,7 +103,7 @@ angular.module('rest').factory('userService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.users,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(username),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(username),
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -135,7 +135,7 @@ angular.module('rest').factory('userService', ['$injector',
|
||||
// Delete user
|
||||
return $http({
|
||||
method : 'DELETE',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(user.username),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(user.username),
|
||||
params : httpParameters
|
||||
})
|
||||
|
||||
@@ -173,7 +173,7 @@ angular.module('rest').factory('userService', ['$injector',
|
||||
// Create user
|
||||
return $http({
|
||||
method : 'POST',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/users',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/users',
|
||||
params : httpParameters,
|
||||
data : user
|
||||
})
|
||||
@@ -211,7 +211,7 @@ angular.module('rest').factory('userService', ['$injector',
|
||||
// Update user
|
||||
return $http({
|
||||
method : 'PUT',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(user.username),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(user.username),
|
||||
params : httpParameters,
|
||||
data : user
|
||||
})
|
||||
@@ -256,7 +256,7 @@ angular.module('rest').factory('userService', ['$injector',
|
||||
// Update user password
|
||||
return $http({
|
||||
method : 'PUT',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(username) + '/password',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/users/' + encodeURIComponent(username) + '/password',
|
||||
params : httpParameters,
|
||||
data : new UserPasswordUpdate({
|
||||
oldPassword : oldPassword,
|
||||
|
Reference in New Issue
Block a user