mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: Minor changes on showing configuration at first run.
- Don't show on running some empty parameters on first run. - Add post processing config for openvidu-pro to show postprocessed config parameters correctly on first run.pull/701/head
parent
c972751e42
commit
8220d9e6ed
|
@ -541,8 +541,15 @@ public class OpenviduConfig {
|
||||||
log.error("Exception checking configuration", e);
|
log.error("Exception checking configuration", e);
|
||||||
addError(null, "Exception checking configuration." + e.getClass().getName() + ":" + e.getMessage());
|
addError(null, "Exception checking configuration." + e.getClass().getName() + ":" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
postProcessConfigProps();
|
||||||
userConfigProps = new ArrayList<>(configProps.keySet());
|
userConfigProps = new ArrayList<>(configProps.keySet());
|
||||||
userConfigProps.removeAll(getNonUserProperties());
|
userConfigProps.removeAll(getNonUserProperties());
|
||||||
|
for (String notShowEmptyConfigKey: getNonPrintablePropertiesIfEmpty()) {
|
||||||
|
String value = configProps.get(notShowEmptyConfigKey);
|
||||||
|
if (value == null || value.isEmpty() || value.equals(new JsonArray().toString())) {
|
||||||
|
userConfigProps.remove(notShowEmptyConfigKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
|
@ -550,12 +557,23 @@ public class OpenviduConfig {
|
||||||
this.checkConfiguration(true);
|
this.checkConfiguration(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void postProcessConfigProps() {
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Map<String, String> getPostProcessedProperties() {
|
||||||
|
return new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
protected List<String> getNonUserProperties() {
|
protected List<String> getNonUserProperties() {
|
||||||
return Arrays.asList("server.port", "SERVER_PORT", "DOTENV_PATH", "COTURN_IP", "COTURN_PORT", "COTURN_REDIS_IP",
|
return Arrays.asList("server.port", "SERVER_PORT", "DOTENV_PATH", "COTURN_IP", "COTURN_PORT", "COTURN_REDIS_IP",
|
||||||
"COTURN_REDIS_DBNAME", "COTURN_REDIS_PASSWORD", "COTURN_REDIS_CONNECT_TIMEOUT", "COTURN_INTERNAL_RELAY",
|
"COTURN_REDIS_DBNAME", "COTURN_REDIS_PASSWORD", "COTURN_REDIS_CONNECT_TIMEOUT", "COTURN_INTERNAL_RELAY",
|
||||||
"OPENVIDU_RECORDING_IMAGE", "OPENVIDU_RECORDING_ENABLE_GPU");
|
"OPENVIDU_RECORDING_IMAGE", "OPENVIDU_RECORDING_ENABLE_GPU");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected List<String> getNonPrintablePropertiesIfEmpty() {
|
||||||
|
return Arrays.asList("MEDIA_NODES_PUBLIC_IPS", "OPENVIDU_WEBRTC_ICE_SERVERS");
|
||||||
|
}
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
|
|
||||||
protected void checkConfigurationProperties(boolean loadDotenv) {
|
protected void checkConfigurationProperties(boolean loadDotenv) {
|
||||||
|
|
Loading…
Reference in New Issue