mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-1949 add requiresServerName to the gql schema (#780)
* CB-1949 add requiresServerName to the gql schema * CB-1949 add requiresServerName to the gql schema
This commit is contained in:
@@ -194,6 +194,7 @@ type DriverInfo {
|
||||
driverPropertiesURL: String
|
||||
embedded: Boolean
|
||||
enabled: Boolean!
|
||||
requiresServerName: Boolean
|
||||
|
||||
# this fields must be removed and be replaced by DriverAuthModel
|
||||
allowsEmptyPassword: Boolean @deprecated
|
||||
|
||||
+9
@@ -42,6 +42,7 @@ import java.util.Map;
|
||||
*/
|
||||
public class WebDatabaseDriverConfig {
|
||||
|
||||
public static final String URL_SERVER_FIELD = "{server}";
|
||||
private final WebSession webSession;
|
||||
private final DBPDriver driver;
|
||||
private String id;
|
||||
@@ -239,4 +240,12 @@ public class WebDatabaseDriverConfig {
|
||||
public boolean isEnabled() {
|
||||
return ConfigurationUtils.isDriverEnabled(driver);
|
||||
}
|
||||
|
||||
@Property
|
||||
public boolean getRequiresServerName() {
|
||||
if (driver.getSampleURL() == null) {
|
||||
return false;
|
||||
}
|
||||
return driver.getSampleURL().contains(URL_SERVER_FIELD);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user