Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -24,14 +24,13 @@
namespace ServiceManagement
{
MainHandler::MainHandler(QObject *parent)
: QObject(parent)
MainHandler::MainHandler(QObject *parent) : QObject(parent)
, m_ddsHandler(nullptr)
, m_groupHandler(nullptr)
, m_licenceHandler(nullptr)
, m_serviceHandler(nullptr)
, m_websocketHandler(nullptr)
{
, m_websocketHandler(nullptr),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
QtSingleCoreApplication *sa = qobject_cast<QtSingleCoreApplication*>(QCoreApplication::instance());
Q_ASSERT(sa);
connect(sa, &QtSingleCoreApplication::messageReceived,
@@ -49,18 +48,18 @@ MainHandler::~MainHandler()
bool MainHandler::init(int domainId, const QString &licenceFile)
{
DEBUG_LOG() << "Initializing MainHandler ...";
DEBUG_LOG(m_logger) << "Initializing MainHandler ...";
m_ddsHandler = std::make_shared<DdsHandler>(domainId);
bool bAllPartsInitialized = m_ddsHandler->init();
ERROR_LOG() << "Searching for licence file: " << licenceFile;
ERROR_LOG(m_logger) << "Searching for licence file: " << licenceFile;
QString licenceFileName = NGL::findFile(NGL::FileType::ConfigFile, licenceFile);
m_licenceHandler = std::make_shared<LicenceHandler>(m_ddsHandler, licenceFileName);
if (!m_licenceHandler->init())
{
ERROR_LOG() << "Initialisation LicenceHandler failed.";
ERROR_LOG(m_logger) << "Initialisation LicenceHandler failed.";
return false;
}
@@ -78,15 +77,15 @@ bool MainHandler::init(int domainId, const QString &licenceFile)
m_websocketHandler = std::make_shared<WebSocketInterface::WebSocketInterfaceHandler>(this);
if (!m_websocketHandler->init())
{
ERROR_LOG() << "Initialisation WebSocketInterfaceHandler failed.";
ERROR_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler failed.";
return false;
}
DEBUG_LOG() << "MainHandler successfully initialized :)";
DEBUG_LOG(m_logger) << "MainHandler successfully initialized :)";
}
else
{
ERROR_LOG() << "MainHandler initialization failed";
ERROR_LOG(m_logger) << "MainHandler initialization failed";
}
return bAllPartsInitialized;
@@ -101,7 +100,7 @@ bool MainHandler::readServices()
{
CodeGen::XmlReader xmlReader;
const QString xmlPath = NGL::directory(NGL::FileType::ConfigFile, QLatin1String("xml"));
DEBUG_LOG() << "Using xml path " << xmlPath;
DEBUG_LOG(m_logger) << "Using xml path " << xmlPath;
QDirIterator directoryIterator(xmlPath);
int serviceCount = 0;
@@ -131,7 +130,7 @@ bool MainHandler::readServices()
if (serviceName.isEmpty() || exeName.length() < 4 || groupNames.isEmpty())
{
INFO_LOG() << currentFileName
INFO_LOG(m_logger) << currentFileName
<< " does not include complete service information.";
}
else
@@ -144,7 +143,7 @@ bool MainHandler::readServices()
const int prioService = xmlReader.getPrio();
if (bDevMode)
{
WARNING_LOG() << "Developer mode for service " << serviceName
WARNING_LOG(m_logger) << "Developer mode for service " << serviceName
<< " activated - no automatic restart on crash!";
}
Service *newService = new Service(serviceName,
@@ -156,7 +155,7 @@ bool MainHandler::readServices()
prioService);
m_serviceHandler->addService(newService);
DEBUG_LOG() << "Added new service \""
DEBUG_LOG(m_logger) << "Added new service \""
<< serviceName
<< "\""
<< " prio=" << prioService;
@@ -165,7 +164,7 @@ bool MainHandler::readServices()
{
if (groupNameMapping.contains(groupName))
{
DEBUG_LOG() << " --> Linking to group \""
DEBUG_LOG(m_logger) << " --> Linking to group \""
<< groupName
<< "\"";
if (serviceName == QStringLiteral("ReportAnalyzer") && (groupName == QStringLiteral("ExercisePaused") || groupName == QStringLiteral("ExerciseAfterActionReview")))
@@ -174,7 +173,7 @@ bool MainHandler::readServices()
m_groupHandler->addServiceLink(newService->id(), groupNameMapping.value(groupName));
}
else
INFO_LOG() << "Found unknown group name: " << groupName;
INFO_LOG(m_logger) << "Found unknown group name: " << groupName;
}
++ serviceCount;
}
@@ -188,7 +187,7 @@ bool MainHandler::readServices()
if (serviceCount)
return true;
ERROR_LOG() << "Could not find any valid service in directory " << xmlPath;
ERROR_LOG(m_logger) << "Could not find any valid service in directory " << xmlPath;
return false;
}