]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/status/clientstat.cpp
ebl Add more tests in migration time test (like for copy time test)
[bacula/bacula] / bacula / src / qt-console / status / clientstat.cpp
index b4fe0579bf09d40f96775dc7724d82f2302d6b60..c215cccefb969b7b542f6e32d30992509906e6e1 100644 (file)
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -43,9 +43,8 @@ ClientStat::ClientStat(QString &client, QTreeWidgetItem *parentTreeWidgetItem)
 {
    m_client = client;
    setupUi(this);
-   m_name = tr("Client Status") + " " + m_client;
    m_closeable = true;
-   pgInitialize(parentTreeWidgetItem);
+   pgInitialize(tr("Client Status %1").arg(m_client), parentTreeWidgetItem);
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/status.png")));
    m_cursor = new QTextCursor(textEditHeader->document());
@@ -113,6 +112,8 @@ void ClientStat::timerTriggered()
 void ClientStat::populateHeader()
 {
    QString command = QString(".status client=\"" + m_client + "\" header");
+   if (mainWin->m_commandDebug)
+      Pmsg1(000, "sending command : %s\n",command.toUtf8().data());
    QStringList results;
    textEditHeader->clear();
 
@@ -130,6 +131,8 @@ void ClientStat::populateHeader()
 void ClientStat::populateTerminated()
 {
    QString command = QString(".status client=\"" + m_client + "\" terminated");
+   if (mainWin->m_commandDebug)
+      Pmsg1(000, "sending command : %s\n",command.toUtf8().data());
    QStringList results;
    QBrush blackBrush(Qt::black);
 
@@ -162,11 +165,12 @@ void ClientStat::populateTerminated()
             p_tableitem->setFlags(0);
             if (flaglist[column].contains("R"))
                p_tableitem->setTextAlignment(Qt::AlignRight);
-            if (flaglist[column].contains("C"))
+            if (flaglist[column].contains("C")) {
                if (field == "OK")
                   p_tableitem->setBackground(Qt::green);
                else
-                  p_tableitem->setBackground(Qt::red);
+                p_tableitem->setBackground(Qt::red);
+           }
             terminatedTable->setItem(results.size() - row - 1, column, p_tableitem);
             column += 1;
          }
@@ -184,7 +188,8 @@ void ClientStat::populateTerminated()
 void ClientStat::populateRunning()
 {
    QString command = QString(".status client=\"" + m_client + "\" running");
-   Pmsg1(100, "Clients running cmd : %s\n",command.toUtf8().data());
+   if (mainWin->m_commandDebug)
+      Pmsg1(000, "sending command : %s\n",command.toUtf8().data());
    QStringList results;
    textEditRunning->clear();