IPv6 support (#1369)

* hyperion-remote - Support IPv6

* LEDDevices - Remove IPv6 limitations

* Separate JsonEditorHostValidation

* Standalone grabbers & JSON/Flatbuffer forwarder: IPv6 support

* remote: Fix setting multiple colors via Hex, add standard logging

* IPv6 Updates -Add db migration activities

* Addressing non-Windows compile issues

* Code cleanup, address clang feedback

* Update address (hostname, IPv4/IPv6) help text

* Apply migration steps to "old" configurations imported

* Show user the UI-Url, if hyperion is already running, address clang findings

* Windows Cmake OpenSLL output

* Minor Text update
This commit is contained in:
LordGrey
2021-11-17 20:30:43 +00:00
committed by GitHub
parent b33466d392
commit ad293b2fb6
61 changed files with 1714 additions and 926 deletions

View File

@@ -860,6 +860,13 @@ void JsonAPI::handleConfigCommand(const QJsonObject &message, const QString &com
{
handleSchemaGetCommand(message, full_command, tan);
}
else if (subcommand == "getconfig")
{
if (_adminAuthorized)
sendSuccessDataReply(QJsonDocument(_hyperion->getQJsonConfig()), full_command, tan);
else
sendErrorReply("No Authorization", command, tan);
}
else if (subcommand == "setconfig")
{
if (_adminAuthorized)
@@ -867,10 +874,10 @@ void JsonAPI::handleConfigCommand(const QJsonObject &message, const QString &com
else
sendErrorReply("No Authorization", command, tan);
}
else if (subcommand == "getconfig")
else if (subcommand == "restoreconfig")
{
if (_adminAuthorized)
sendSuccessDataReply(QJsonDocument(_hyperion->getQJsonConfig()), full_command, tan);
handleConfigRestoreCommand(message, full_command, tan);
else
sendErrorReply("No Authorization", command, tan);
}
@@ -916,6 +923,27 @@ void JsonAPI::handleConfigSetCommand(const QJsonObject &message, const QString &
}
}
void JsonAPI::handleConfigRestoreCommand(const QJsonObject &message, const QString &command, int tan)
{
if (message.contains("config"))
{
QJsonObject config = message["config"].toObject();
if (API::isHyperionEnabled())
{
if ( API::restoreSettings(config) )
{
sendSuccessReply(command, tan);
}
else
{
sendErrorReply("Restore settings failed", command, tan);
}
}
else
sendErrorReply("Restoring configuration while Hyperion is disabled isn't possible", command, tan);
}
}
void JsonAPI::handleSchemaGetCommand(const QJsonObject &message, const QString &command, int tan)
{
// create result