diff --git a/notes.md b/notes.md index 9a7a04e3..71d42f1f 100644 --- a/notes.md +++ b/notes.md @@ -1,3 +1,4 @@ +* Server Add form prepopulate details of currently selected server * Export as Excel * Fixing timezone bug * Adding server and query details into a separate tab diff --git a/src/studio/kdb/Config.java b/src/studio/kdb/Config.java index ca4d6705..26aeed1f 100755 --- a/src/studio/kdb/Config.java +++ b/src/studio/kdb/Config.java @@ -2,7 +2,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import studio.core.AuthenticationManager; import studio.core.Credentials; import studio.core.DefaultAuthenticationMechanism; import studio.kdb.config.AbstractConfig; @@ -721,9 +720,6 @@ private void addServerInternal(Server server) { if (name.contains("/")) { throw new IllegalArgumentException("Server name can't contains /"); } - if (AuthenticationManager.getInstance().lookup(server.getAuthenticationMechanism()) == null) { - throw new IllegalArgumentException("Unknown Authentication Mechanism: " + server.getAuthenticationMechanism()); - } server.getFolderPath() .stream() diff --git a/src/studio/ui/AddServerForm.java b/src/studio/ui/AddServerForm.java index b7d21dda..bbffae0b 100755 --- a/src/studio/ui/AddServerForm.java +++ b/src/studio/ui/AddServerForm.java @@ -5,7 +5,7 @@ import java.awt.*; public class AddServerForm extends ServerForm { - public AddServerForm(Window owner) { - super(owner, "Add a new server", Server.newServer()); + public AddServerForm(Window owner, Server server) { + super(owner, "Add a new server", server); } } diff --git a/src/studio/ui/StudioWindow.java b/src/studio/ui/StudioWindow.java index 02c4674a..bef8acc9 100755 --- a/src/studio/ui/StudioWindow.java +++ b/src/studio/ui/StudioWindow.java @@ -567,7 +567,7 @@ private void initActions() { addServerAction = UserAction.create(I18n.getString("Add"), Util.ADD_SERVER_ICON, "Configure a new server", KeyEvent.VK_A, null, e -> { - AddServerForm f = new AddServerForm(this); + AddServerForm f = new AddServerForm(this, editor.getServer()); f.alignAndShow(); if (f.getResult() == ACCEPTED) { Server s = f.getServer();