mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1629: Use TextField for KSM configuration since it's always one line.
This commit is contained in:
@@ -24,7 +24,7 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.apache.guacamole.form.Form;
|
||||
import org.apache.guacamole.form.MultilineField;
|
||||
import org.apache.guacamole.form.TextField;
|
||||
import org.apache.guacamole.vault.conf.VaultAttributeService;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
@@ -47,7 +47,7 @@ public class KsmAttributeService implements VaultAttributeService {
|
||||
* per-connection-group basis.
|
||||
*/
|
||||
public static final Form KSM_CONFIGURATION_FORM = new Form("ksm-config",
|
||||
Arrays.asList(new MultilineField(KSM_CONFIGURATION_ATTRIBUTE)));
|
||||
Arrays.asList(new TextField(KSM_CONFIGURATION_ATTRIBUTE)));
|
||||
|
||||
/**
|
||||
* All KSM-specific connection group attributes, organized by form.
|
||||
|
@@ -215,7 +215,7 @@ public class KsmClient {
|
||||
cacheLock.writeLock().lock();
|
||||
try {
|
||||
|
||||
// Client may have been updated since the read-only check. Re-verify
|
||||
// Cache may have been updated since the read-only check. Re-verify
|
||||
// that the cache has expired before continuing with a full refresh
|
||||
if (currentTime - cacheTimestamp < CACHE_INTERVAL)
|
||||
return;
|
||||
@@ -258,7 +258,7 @@ public class KsmClient {
|
||||
|
||||
});
|
||||
|
||||
// Client has been refreshed
|
||||
// Cache has been refreshed
|
||||
this.cacheTimestamp = System.currentTimeMillis();
|
||||
|
||||
}
|
||||
|
@@ -84,14 +84,12 @@ public class KsmSecretService implements VaultSecretService {
|
||||
|
||||
/**
|
||||
* A map of base-64 encoded JSON KSM config blobs to associated KSM client instances.
|
||||
* The `null` entry in this Map is associated with the KSM configuration parsed
|
||||
* from the guacamole.properties config file. A distinct KSM client will exist for
|
||||
* every KSM config.
|
||||
* A distinct KSM client will exist for every KSM config.
|
||||
*/
|
||||
private final ConcurrentMap<String, KsmClient> ksmClientMap = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* Create and return a KSM cache for the provided KSM config if not already
|
||||
* Create and return a KSM client for the provided KSM config if not already
|
||||
* present in the cache map, otherwise return the existing cache entry.
|
||||
*
|
||||
* @param ksmConfig
|
||||
@@ -100,11 +98,11 @@ public class KsmSecretService implements VaultSecretService {
|
||||
* this configuration.
|
||||
*
|
||||
* @return
|
||||
* A KSM cache for the provided KSM config if not already present in the
|
||||
* A KSM client for the provided KSM config if not already present in the
|
||||
* cache map, otherwise the existing cache entry.
|
||||
*
|
||||
* @throws GuacamoleException
|
||||
* If an error occurs while creating the KSM cache.
|
||||
* If an error occurs while creating the KSM client.
|
||||
*/
|
||||
private KsmClient getClient(@Nonnull String ksmConfig)
|
||||
throws GuacamoleException {
|
||||
|
Reference in New Issue
Block a user