# HG changeset patch # User Michiel Broek # Date 1676210728 -3600 # Node ID 6aa29aaa3f4d94a53747aa047f8fb10098c2e470 # Parent 49ac23d25f61d1fed67cfbdb49b51554c1b03d51 Version 0.4.1. Adjusted monitor nodes debug messages. diff -r 49ac23d25f61 -r 6aa29aaa3f4d CMakeLists.txt --- a/CMakeLists.txt Sun Feb 12 13:58:36 2023 +0100 +++ b/CMakeLists.txt Sun Feb 12 15:05:28 2023 +0100 @@ -9,7 +9,7 @@ SET( bmsapp_VERSION_MAJOR 0 ) SET( bmsapp_VERSION_MINOR 4 ) -SET( bmsapp_VERSION_PATCH 0 ) +SET( bmsapp_VERSION_PATCH 1 ) # Compile flags diff -r 49ac23d25f61 -r 6aa29aaa3f4d src/DetailNode.cpp --- a/src/DetailNode.cpp Sun Feb 12 13:58:36 2023 +0100 +++ b/src/DetailNode.cpp Sun Feb 12 15:05:28 2023 +0100 @@ -31,7 +31,9 @@ { QSqlQuery query; +#ifdef DEBUG_MONITOR qDebug() << "DetailNode record:" << id; +#endif ui->setupUi(this); this->recno = id; setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint); @@ -48,8 +50,6 @@ { QSqlQuery query; - qDebug() << "refreshTable node rec:" << this->recno; - query.prepare("SELECT * FROM mon_nodes WHERE record = :recno"); query.bindValue(":recno", this->recno); query.exec(); @@ -59,14 +59,17 @@ _group_id = query.value("group_id").toString(); _uuid = query.value("uuid").toString(); + bool online = (query.value("online").toInt() != 0) ? true:false; + ui->uuidEdit->setText(_uuid); ui->systemEdit->setText(_node); ui->typeEdit->setText(_group_id); ui->firstEdit->setText(query.value("firstseen").toDateTime().toString("dd MMM yyyy HH:mm:ss")); ui->lastEdit->setText(query.value("lastseen").toDateTime().toString("dd MMM yyyy HH:mm:ss")); - if (query.value("online").toInt()) { + if (online) { ui->statusEdit->setText(tr("Online")); + ui->statusEdit->setStyleSheet(""); ui->makerEdit->show(); ui->modelEdit->show(); ui->osEdit->show(); @@ -140,7 +143,7 @@ } else { /* Offline */ ui->statusEdit->setText(tr("Offline")); - + ui->statusEdit->setStyleSheet("background-color: red"); ui->makerEdit->hide(); ui->modelEdit->hide(); ui->osEdit->hide(); @@ -176,7 +179,6 @@ DetailNode::~DetailNode() { - qDebug() << "DetailNode done"; delete ui; emit entry_changed(); } @@ -210,7 +212,9 @@ return; QString msg = QString("{\"node\":\""+_node+"\",\"group_id\":\""+_group_id+"\",\"control\":\"reboot\"}"); +#ifdef DEBUG_MONITOR qDebug() << msg; +#endif webSocket->sendTextMessage(msg); } @@ -218,7 +222,9 @@ void DetailNode::control_rebirth() { QString msg = QString("{\"node\":\""+_node+"\",\"group_id\":\""+_group_id+"\",\"control\":\"rebirth\"}"); +#ifdef DEBUG_MONITOR qDebug() << msg; +#endif webSocket->sendTextMessage(msg); } diff -r 49ac23d25f61 -r 6aa29aaa3f4d translations/bmsapp_en.ts --- a/translations/bmsapp_en.ts Sun Feb 12 13:58:36 2023 +0100 +++ b/translations/bmsapp_en.ts Sun Feb 12 15:05:28 2023 +0100 @@ -827,32 +827,32 @@ - + BMSapp - Details System - + Online - + version: - + Offline - + Reboot application - + Remote application is running, really reboot? diff -r 49ac23d25f61 -r 6aa29aaa3f4d translations/bmsapp_nl.ts --- a/translations/bmsapp_nl.ts Sun Feb 12 13:58:36 2023 +0100 +++ b/translations/bmsapp_nl.ts Sun Feb 12 15:05:28 2023 +0100 @@ -907,32 +907,32 @@ Terug - + BMSapp - Details System BMSapp - Details Systeem - + Online Online - + version: versie: - + Offline Offline - + Reboot application Herstart applicatie - + Remote application is running, really reboot? De applicatie draait nu, echt herstarten?