diff --git a/mythtv/programs/mythfrontend/statusbox.cpp b/mythtv/programs/mythfrontend/statusbox.cpp
index e45016af50..73e7792a61 100644
a
|
b
|
using namespace std; |
5 | 5 | |
6 | 6 | #include <QRegExp> |
7 | 7 | #include <QHostAddress> |
| 8 | #include <QNetworkInterface> |
8 | 9 | |
9 | 10 | #include "mythcorecontext.h" |
10 | 11 | #include "filesysteminfo.h" |
… |
… |
void StatusBox::doMachineStatus() |
1271 | 1272 | m_iconState->DisplayState("machine"); |
1272 | 1273 | m_logList->Reset(); |
1273 | 1274 | QString machineStr = tr("Machine Status shows some operating system " |
1274 | | "statistics of this machine"); |
| 1275 | "statistics of this machine."); |
1275 | 1276 | if (!m_isBackendActive) |
1276 | | machineStr.append(" " + tr("and the MythTV server")); |
| 1277 | machineStr = tr("Machine Status shows some operating system " |
| 1278 | "statistics of this machine and the MythTV server."); |
1277 | 1279 | |
1278 | 1280 | if (m_helpText) |
1279 | 1281 | m_helpText->SetText(machineStr); |
… |
… |
void StatusBox::doMachineStatus() |
1291 | 1293 | line = tr("This machine:"); |
1292 | 1294 | AddLogLine(line, machineStr); |
1293 | 1295 | |
| 1296 | // Hostname & IP |
| 1297 | line = " " + tr("Hostname") + ": " + gCoreContext->GetHostName(); |
| 1298 | line.append(" " + tr("IP") + ": "); |
| 1299 | QString sep = " "; |
| 1300 | foreach(QNetworkInterface iface, QNetworkInterface::allInterfaces()) |
| 1301 | { |
| 1302 | QNetworkInterface::InterfaceFlags f = iface.flags(); |
| 1303 | if (!(f & QNetworkInterface::IsUp)) |
| 1304 | continue; |
| 1305 | if (!(f & QNetworkInterface::IsRunning)) |
| 1306 | continue; |
| 1307 | if (f & QNetworkInterface::IsLoopBack) |
| 1308 | continue; |
| 1309 | |
| 1310 | sep = ", "; |
| 1311 | QString sep2 = ""; |
| 1312 | foreach(QNetworkAddressEntry addr, iface.addressEntries()) |
| 1313 | { |
| 1314 | if (addr.ip().protocol() == QAbstractSocket::IPv4Protocol || addr.ip().protocol() == QAbstractSocket::IPv6Protocol) |
| 1315 | { |
| 1316 | line += sep2 + addr.ip().toString(); |
| 1317 | sep2 = ", "; |
| 1318 | } |
| 1319 | } |
| 1320 | line += ""; |
| 1321 | } |
| 1322 | AddLogLine(line, machineStr); |
| 1323 | |
1294 | 1324 | // uptime |
1295 | 1325 | if (!getUptime(uptime)) |
1296 | 1326 | uptime = 0; |
1297 | 1327 | line = uptimeStr(uptime); |
1298 | 1328 | |
1299 | 1329 | // weighted average loads |
1300 | | line.append(". " + tr("Load") + ": "); |
| 1330 | line.append(" " + tr("Load") + ": "); |
1301 | 1331 | |
1302 | 1332 | #if defined(_WIN32) || defined(Q_OS_ANDROID) |
1303 | 1333 | line.append(tr("unknown") + " - getloadavg() " + tr("failed")); |
… |
… |
void StatusBox::doMachineStatus() |
1339 | 1369 | line = tr("MythTV server") + ':'; |
1340 | 1370 | AddLogLine(line, machineStr); |
1341 | 1371 | |
| 1372 | // Hostname & IP |
| 1373 | line = " " + tr("Hostname") + ": " + gCoreContext->GetSetting("MasterServerName"); |
| 1374 | line.append(" " + tr("IP") + ": " + gCoreContext->GetSetting("MasterServerIP")); |
| 1375 | AddLogLine(line, machineStr); |
| 1376 | |
1342 | 1377 | // uptime |
1343 | 1378 | if (!RemoteGetUptime(uptime)) |
1344 | 1379 | uptime = 0; |
1345 | 1380 | line = uptimeStr(uptime); |
1346 | 1381 | |
1347 | 1382 | // weighted average loads |
1348 | | line.append(". " + tr("Load") + ": "); |
| 1383 | line.append(" " + tr("Load") + ": "); |
1349 | 1384 | float floads[3]; |
1350 | 1385 | if (RemoteGetLoad(floads)) |
1351 | 1386 | { |