implement hyperion restart via webui (#242)

* first try

* implement hyperion restart. core function is good, but needs a beeter structuring- something for next refactoring session ;-)

* several fixes (including osx)
merge with upstream
some refactoring

* add some eye candy to webui
This commit is contained in:
redPanther
2016-09-15 20:42:58 +02:00
committed by GitHub
parent a04f34eab7
commit eeb9b0f7da
33 changed files with 197 additions and 71 deletions

View File

@@ -2,6 +2,7 @@
#include <stdexcept>
#include <cassert>
#include <iomanip>
#include <unistd.h>
// stl includes
#include <iostream>
@@ -15,6 +16,7 @@
#include <QHostInfo>
#include <QString>
#include <QFile>
#include <QCoreApplication>
// hyperion util includes
#include <hyperion/ImageProcessorFactory.h>
@@ -27,6 +29,7 @@
#include <leddevice/LedDevice.h>
#include <HyperionConfig.h>
#include <utils/jsonschema/JsonFactory.h>
#include <utils/Process.h>
// project includes
#include "JsonClientConnection.h"
@@ -883,6 +886,12 @@ void JsonClientConnection::handleConfigCommand(const Json::Value & message, cons
{
handleConfigSetCommand(message, full_command, tan);
}
else if (subcommand == "reload")
{
// restart hyperion, this code must be put in some own class ...
Process::restartHyperion();
sendErrorReply("failed to restart hyperion", full_command, tan);
}
else
{
sendErrorReply("unknown or missing subcommand", full_command, tan);