mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 19:29:04 -05:00
Make it possible to set the WebGUI port from the openspace.cfg file (closes #2279)
This commit is contained in:
@@ -98,10 +98,10 @@ namespace {
|
||||
|
||||
struct [[codegen::Dictionary(WebGuiModule)]] Parameters {
|
||||
// [[codegen::verbatim(PortInfo.description)]]
|
||||
std::optional<int> port;
|
||||
std::optional<int> port [[codegen::key("HttpPort")]];
|
||||
|
||||
// [[codegen::verbatim(AddressInfo.description)]]
|
||||
std::optional<std::string> address;
|
||||
std::string address;
|
||||
|
||||
// [[codegen::verbatim(WebSocketInterfaceInfo.description)]]
|
||||
std::optional<std::string> webSocketInterface;
|
||||
@@ -163,12 +163,7 @@ void WebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) {
|
||||
const Parameters p = codegen::bake<Parameters>(configuration);
|
||||
|
||||
_port = p.port.value_or(_port);
|
||||
if (p.address.has_value()) {
|
||||
_address = p.address.value();
|
||||
}
|
||||
else {
|
||||
_address = "192.168.1.8"; //global::windowDelegate
|
||||
}
|
||||
_address = p.address;
|
||||
_webSocketInterface = p.webSocketInterface.value_or(_webSocketInterface);
|
||||
|
||||
auto startOrStop = [this]() {
|
||||
|
||||
Reference in New Issue
Block a user