mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: updated config GET response. Version in variable
parent
ff9dec285b
commit
813bf1613b
|
@ -12,7 +12,7 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<name>OpenVidu Server</name>
|
||||
<version>2.7.0</version>
|
||||
<version>${version.openvidu.server}</version>
|
||||
<description>OpenVidu Server</description>
|
||||
<url>https://github.com/OpenVidu/openvidu</url>
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
|||
<properties>
|
||||
<!-- Main class -->
|
||||
<start-class>io.openvidu.server.OpenViduServer</start-class>
|
||||
<version.openvidu.server>2.7.0</version.openvidu.server>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
|
@ -83,15 +84,15 @@
|
|||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-info</id>
|
||||
<goals>
|
||||
<goal>build-info</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<additionalProperties>
|
||||
<version.openvidu.server>${version.openvidu.server}</version.openvidu.server>
|
||||
</additionalProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
@ -143,15 +144,15 @@
|
|||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-info</id>
|
||||
<goals>
|
||||
<goal>build-info</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<additionalProperties>
|
||||
<version.openvidu.server>${version.openvidu.server}</version.openvidu.server>
|
||||
</additionalProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
|
|
@ -95,10 +95,6 @@ public class OpenviduConfig {
|
|||
|
||||
private String finalUrl;
|
||||
|
||||
public String getOpenViduServerVersion() {
|
||||
return this.buildProperties.getVersion();
|
||||
}
|
||||
|
||||
public String getOpenViduPublicUrl() {
|
||||
return this.openviduPublicUrl;
|
||||
}
|
||||
|
@ -218,4 +214,12 @@ public class OpenviduConfig {
|
|||
return roles;
|
||||
}
|
||||
|
||||
public String getOpenViduServerVersion() {
|
||||
return this.buildProperties.get("version.openvidu.server");
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return this.buildProperties.getVersion();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -69,16 +69,25 @@ public class ConfigRestController {
|
|||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
public ResponseEntity<?> getOpenViduConfiguration() {
|
||||
public ResponseEntity<String> getOpenViduConfiguration() {
|
||||
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("openviduServerVersion", openviduConfig.getOpenViduServerVersion());
|
||||
json.addProperty("artifactVersion", openviduConfig.getVersion());
|
||||
json.addProperty("openviduPublicurl", openviduConfig.getOpenViduPublicUrl());
|
||||
json.addProperty("openviduCdr", openviduConfig.isCdrEnabled());
|
||||
json.addProperty("maxRecvBandwidth", openviduConfig.getVideoMaxRecvBandwidth());
|
||||
json.addProperty("minRecvBandwidth", openviduConfig.getVideoMinRecvBandwidth());
|
||||
json.addProperty("maxSendBandwidth", openviduConfig.getVideoMaxSendBandwidth());
|
||||
json.addProperty("minSendBandwidth", openviduConfig.getVideoMinSendBandwidth());
|
||||
json.addProperty("openviduRecording", openviduConfig.isRecordingModuleEnabled());
|
||||
json.addProperty("openviduRecordingPublicAccess", openviduConfig.getOpenViduRecordingPublicAccess());
|
||||
json.addProperty("openviduRecordingPath", openviduConfig.getOpenViduRecordingPath());
|
||||
json.addProperty("openviduRecordingVersion", openviduConfig.getOpenViduRecordingVersion());
|
||||
if (openviduConfig.isRecordingModuleEnabled()) {
|
||||
json.addProperty("openviduRecordingVersion", openviduConfig.getOpenViduRecordingVersion());
|
||||
json.addProperty("openviduRecordingPath", openviduConfig.getOpenViduRecordingPath());
|
||||
json.addProperty("openviduRecordingPublicAccess", openviduConfig.getOpenViduRecordingPublicAccess());
|
||||
json.addProperty("openviduRecordingNotification", openviduConfig.getOpenViduRecordingNotification());
|
||||
json.addProperty("openviduRecordingCustomLayout", openviduConfig.getOpenviduRecordingCustomLayout());
|
||||
}
|
||||
|
||||
HttpHeaders responseHeaders = new HttpHeaders();
|
||||
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
|
||||
|
|
Loading…
Reference in New Issue