1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 23:55:13 -05:00

Added information about O/S, CPU architecture and application name where it was missing

This commit is contained in:
f4exb 2018-01-07 01:33:57 +01:00
parent 85e1606962
commit 7bdc161c91
14 changed files with 122 additions and 14 deletions

View File

@ -54,7 +54,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelSrv");
QCoreApplication::setApplicationVersion("3.9.0");
QCoreApplication::setApplicationVersion("3.10.0");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

View File

@ -1137,7 +1137,7 @@ margin-bottom: 20px;
"description" : "Summarized information about logical devices from hardware devices attached to this SDRangel instance"
};
defs.InstanceSummaryResponse = {
"required" : [ "devicesetlist", "qtVersion", "version" ],
"required" : [ "appname", "devicesetlist", "qtVersion", "version" ],
"properties" : {
"version" : {
"type" : "string",
@ -1147,6 +1147,18 @@ margin-bottom: 20px;
"type" : "string",
"description" : "Qt version with which the software was compiled"
},
"appname" : {
"type" : "string",
"description" : "Application name: SDRangel for a GUI instance and SDRangelSrv for a server instance"
},
"architecture" : {
"type" : "string",
"description" : "Codename of the CPU architecture on which the instance is running (available with Qt >= 5.4)"
},
"os" : {
"type" : "string",
"description" : "Descriptive text of the operating system running the instance (available with Qt >= 5.4)"
},
"logging" : {
"$ref" : "#/definitions/LoggingInfo"
},
@ -16894,7 +16906,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-01-06T09:41:18.709+01:00
Generated 2018-01-07T01:23:55.663+01:00
</div>
</div>
</div>

View File

@ -605,7 +605,8 @@ void MainWindow::createStatusBar()
{
QString qtVersionStr = QString("Qt %1 ").arg(QT_VERSION_STR);
#if QT_VERSION >= 0x050400
m_showSystemWidget = new QLabel("SDRangel v" + qApp->applicationVersion() + " " + qtVersionStr + QSysInfo::prettyProductName(), this);
m_showSystemWidget = new QLabel("SDRangel v" + qApp->applicationVersion() + " " + qtVersionStr
+ QSysInfo::currentCpuArchitecture() + " " + QSysInfo::prettyProductName(), this);
#else
m_showSystemWidget = new QLabel("SDRangel v" + qApp->applicationVersion() + " " + qtVersionStr, this);
#endif

View File

@ -634,16 +634,14 @@ Self explanatory
Qt version with which this copy of SDRangel was compiled.
<h4>8.3. System</h4>
<h4>8.3. Architecture</h4>
Pretty print of the system in which SDRangel is running.
Codename of the CPU architecture in which SDRangel is running.
<h4>8.4. Local date</h4>
<h4>8.4. Operating system</h4>
Local date according to system clock
<h4>8.5. Local time</h4>
Local time according to system clock followed by the time zone code.
Pretty print of the operating system in which SDRangel is running.
<h4>8.5. Local date and time</h4>
Local time timestamp according to system clock

View File

@ -18,6 +18,7 @@
#include <QApplication>
#include <QList>
#include <QSysInfo>
#include <unistd.h>
@ -72,8 +73,13 @@ int WebAPIAdapterGUI::instanceSummary(
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
{
*response.getAppname() = qApp->applicationName();
*response.getVersion() = qApp->applicationVersion();
*response.getQtVersion() = QString(QT_VERSION_STR);
#if QT_VERSION >= 0x050400
*response.getArchitecture() = QString(QSysInfo::currentCpuArchitecture());
*response.getOs() = QString(QSysInfo::prettyProductName());
#endif
SWGSDRangel::SWGLoggingInfo *logging = response.getLogging();
logging->init();

View File

@ -19,6 +19,7 @@
#include <QCoreApplication>
#include <QList>
#include <QTextStream>
#include <QSysInfo>
#include <unistd.h>
@ -68,8 +69,13 @@ int WebAPIAdapterSrv::instanceSummary(
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
{
*response.getAppname() = QCoreApplication::instance()->applicationName();
*response.getVersion() = QCoreApplication::instance()->applicationVersion();
*response.getQtVersion() = QString(QT_VERSION_STR);
#if QT_VERSION >= 0x050400
*response.getArchitecture() = QString(QSysInfo::currentCpuArchitecture());
*response.getOs() = QString(QSysInfo::prettyProductName());
#endif
SWGSDRangel::SWGLoggingInfo *logging = response.getLogging();
logging->init();

View File

@ -1010,6 +1010,7 @@ definitions:
required:
- version
- qtVersion
- appname
- devicesetlist
properties:
version:
@ -1018,6 +1019,15 @@ definitions:
qtVersion:
description: "Qt version with which the software was compiled"
type: string
appname:
description: "Application name: SDRangel for a GUI instance and SDRangelSrv for a server instance"
type: string
architecture:
description: "Codename of the CPU architecture on which the instance is running (available with Qt >= 5.4)"
type: string
os:
description: "Descriptive text of the operating system running the instance (available with Qt >= 5.4)"
type: string
logging:
$ref: "#/definitions/LoggingInfo"
devicesetlist:

View File

@ -1137,7 +1137,7 @@ margin-bottom: 20px;
"description" : "Summarized information about logical devices from hardware devices attached to this SDRangel instance"
};
defs.InstanceSummaryResponse = {
"required" : [ "devicesetlist", "qtVersion", "version" ],
"required" : [ "appname", "devicesetlist", "qtVersion", "version" ],
"properties" : {
"version" : {
"type" : "string",
@ -1147,6 +1147,18 @@ margin-bottom: 20px;
"type" : "string",
"description" : "Qt version with which the software was compiled"
},
"appname" : {
"type" : "string",
"description" : "Application name: SDRangel for a GUI instance and SDRangelSrv for a server instance"
},
"architecture" : {
"type" : "string",
"description" : "Codename of the CPU architecture on which the instance is running (available with Qt >= 5.4)"
},
"os" : {
"type" : "string",
"description" : "Descriptive text of the operating system running the instance (available with Qt >= 5.4)"
},
"logging" : {
"$ref" : "#/definitions/LoggingInfo"
},
@ -16894,7 +16906,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-01-06T09:41:18.709+01:00
Generated 2018-01-07T01:23:55.663+01:00
</div>
</div>
</div>

View File

@ -39,6 +39,9 @@ void
SWGInstanceSummaryResponse::init() {
version = new QString("");
qt_version = new QString("");
appname = new QString("");
architecture = new QString("");
os = new QString("");
logging = new SWGLoggingInfo();
devicesetlist = new SWGDeviceSetList();
}
@ -54,6 +57,18 @@ SWGInstanceSummaryResponse::cleanup() {
delete qt_version;
}
if(appname != nullptr) {
delete appname;
}
if(architecture != nullptr) {
delete architecture;
}
if(os != nullptr) {
delete os;
}
if(logging != nullptr) {
delete logging;
}
@ -76,6 +91,9 @@ void
SWGInstanceSummaryResponse::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&version, pJson["version"], "QString", "QString");
::SWGSDRangel::setValue(&qt_version, pJson["qtVersion"], "QString", "QString");
::SWGSDRangel::setValue(&appname, pJson["appname"], "QString", "QString");
::SWGSDRangel::setValue(&architecture, pJson["architecture"], "QString", "QString");
::SWGSDRangel::setValue(&os, pJson["os"], "QString", "QString");
::SWGSDRangel::setValue(&logging, pJson["logging"], "SWGLoggingInfo", "SWGLoggingInfo");
::SWGSDRangel::setValue(&devicesetlist, pJson["devicesetlist"], "SWGDeviceSetList", "SWGDeviceSetList");
}
@ -98,6 +116,12 @@ SWGInstanceSummaryResponse::asJsonObject() {
toJsonValue(QString("qtVersion"), qt_version, obj, QString("QString"));
toJsonValue(QString("appname"), appname, obj, QString("QString"));
toJsonValue(QString("architecture"), architecture, obj, QString("QString"));
toJsonValue(QString("os"), os, obj, QString("QString"));
toJsonValue(QString("logging"), logging, obj, QString("SWGLoggingInfo"));
toJsonValue(QString("devicesetlist"), devicesetlist, obj, QString("SWGDeviceSetList"));
@ -123,6 +147,33 @@ SWGInstanceSummaryResponse::setQtVersion(QString* qt_version) {
this->qt_version = qt_version;
}
QString*
SWGInstanceSummaryResponse::getAppname() {
return appname;
}
void
SWGInstanceSummaryResponse::setAppname(QString* appname) {
this->appname = appname;
}
QString*
SWGInstanceSummaryResponse::getArchitecture() {
return architecture;
}
void
SWGInstanceSummaryResponse::setArchitecture(QString* architecture) {
this->architecture = architecture;
}
QString*
SWGInstanceSummaryResponse::getOs() {
return os;
}
void
SWGInstanceSummaryResponse::setOs(QString* os) {
this->os = os;
}
SWGLoggingInfo*
SWGInstanceSummaryResponse::getLogging() {
return logging;

View File

@ -50,6 +50,15 @@ public:
QString* getQtVersion();
void setQtVersion(QString* qt_version);
QString* getAppname();
void setAppname(QString* appname);
QString* getArchitecture();
void setArchitecture(QString* architecture);
QString* getOs();
void setOs(QString* os);
SWGLoggingInfo* getLogging();
void setLogging(SWGLoggingInfo* logging);
@ -60,6 +69,9 @@ public:
private:
QString* version;
QString* qt_version;
QString* appname;
QString* architecture;
QString* os;
SWGLoggingInfo* logging;
SWGDeviceSetList* devicesetlist;
};