mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-10 15:11:22 +00:00
Initial stab at fixing the CRUD servlets and service JS.
This commit is contained in:
@@ -47,8 +47,8 @@ public class Create extends AuthenticatingHttpServlet {
|
||||
HttpServletRequest request, HttpServletResponse response)
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get ID and protocol
|
||||
String identifier = request.getParameter("id");
|
||||
// Get name and protocol
|
||||
String name = request.getParameter("name");
|
||||
String protocol = request.getParameter("protocol");
|
||||
|
||||
// Attempt to get connection directory
|
||||
@@ -75,7 +75,7 @@ public class Create extends AuthenticatingHttpServlet {
|
||||
|
||||
// Create connection skeleton
|
||||
Connection connection = new DummyConnection();
|
||||
connection.setIdentifier(identifier);
|
||||
connection.setName(name);
|
||||
connection.setConfiguration(config);
|
||||
|
||||
// Add connection
|
||||
|
@@ -126,6 +126,7 @@ public class List extends AuthenticatingHttpServlet {
|
||||
// Write connection
|
||||
xml.writeStartElement("connection");
|
||||
xml.writeAttribute("id", identifier);
|
||||
xml.writeAttribute("name", connection.getName());
|
||||
xml.writeAttribute("protocol",
|
||||
connection.getConfiguration().getProtocol());
|
||||
|
||||
|
@@ -47,9 +47,10 @@ public class Update extends AuthenticatingHttpServlet {
|
||||
HttpServletRequest request, HttpServletResponse response)
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get ID and protocol
|
||||
// Get ID, name, and protocol
|
||||
String identifier = request.getParameter("id");
|
||||
String protocol = request.getParameter("protocol");
|
||||
String name = request.getParameter("name");
|
||||
String protocol = request.getParameter("protocol");
|
||||
|
||||
// Attempt to get connection directory
|
||||
Directory<String, Connection> directory =
|
||||
@@ -75,6 +76,7 @@ public class Update extends AuthenticatingHttpServlet {
|
||||
|
||||
// Create connection skeleton
|
||||
Connection connection = directory.get(identifier);
|
||||
connection.setName(name);
|
||||
connection.setConfiguration(config);
|
||||
|
||||
// Update connection
|
||||
|
Reference in New Issue
Block a user