]> git.sur5r.net Git - bacula/bacula/commitdiff
First cut of bat rerun a Job from Jobs Run
authorKern Sibbald <kern@sibbald.com>
Mon, 20 Sep 2010 14:49:01 +0000 (16:49 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 20 Sep 2010 14:52:01 +0000 (16:52 +0200)
bacula/src/dird/ua_run.c
bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/joblist/joblist.h
bacula/src/qt-console/joblist/joblist.ui
bacula/src/qt-console/pages.cpp
bacula/src/qt-console/run/run.cpp
bacula/src/qt-console/run/runcmd.cpp

index 7dde36effb7a2df143539faac616d6c332335ecf..d08bfc557f6907664e2fffc1a7bdf09c0a7a0dd3 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-2010 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -31,7 +31,6 @@
  *
  *     Kern Sibbald, December MMI
  *
- *   Version $Id$
  */
 
 #include "bacula.h"
@@ -750,8 +749,24 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
       char ec1[30];
       char dt[MAX_TIME_LENGTH];
    case JT_ADMIN:
-      if (ua->api) ua->signal(BNET_RUN_CMD);   
-      ua->send_msg(_("Run %s job\n"
+      if (ua->api) {
+         ua->signal(BNET_RUN_CMD);   
+         ua->send_msg("Type: Admin\n"
+                     "Title: Run Admin Job\n"
+                     "JobName:  %s\n"
+                     "FileSet:  %s\n"
+                     "Client:   %s\n"
+                     "Storage:  %s\n"
+                     "When:     %s\n"
+                     "Priority: %d\n",
+                 job->name(),
+                 jcr->fileset->name(),
+                 NPRT(jcr->client->name()),
+                 jcr->wstore?jcr->wstore->name():"*None*",
+                 bstrutime(dt, sizeof(dt), jcr->sched_time),
+                 jcr->JobPriority);
+      } else {
+         ua->send_msg(_("Run %s job\n"
                      "JobName:  %s\n"
                      "FileSet:  %s\n"
                      "Client:   %s\n"
@@ -765,13 +780,38 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
                  jcr->wstore?jcr->wstore->name():"*None*",
                  bstrutime(dt, sizeof(dt), jcr->sched_time),
                  jcr->JobPriority);
+      }
       jcr->set_JobLevel(L_FULL);
       break;
    case JT_BACKUP:
    case JT_VERIFY:
       if (jcr->getJobType() == JT_BACKUP) {
-         if (ua->api) ua->signal(BNET_RUN_CMD);   
-         ua->send_msg(_("Run %s job\n"
+         if (ua->api) {
+            ua->signal(BNET_RUN_CMD);   
+            ua->send_msg("Type: Backup\n"
+                        "Title: Run Backup Job\n"
+                        "JobName:  %s\n"
+                        "Level:    %s\n"
+                        "Client:   %s\n"
+                        "FileSet:  %s\n"
+                        "Pool:     %s\n"
+                        "Storage:  %s\n"
+                        "When:     %s\n"
+                        "Priority: %d\n"
+                        "%s%s%s",
+                 job->name(),
+                 level_to_str(jcr->getJobLevel()),
+                 jcr->client->name(),
+                 jcr->fileset->name(),
+                 NPRT(jcr->pool->name()),
+                 jcr->wstore?jcr->wstore->name():"*None*",
+                 bstrutime(dt, sizeof(dt), jcr->sched_time),
+                 jcr->JobPriority,
+                 jcr->plugin_options?"Plugin Options: ":"",
+                 jcr->plugin_options?jcr->plugin_options:"",
+                 jcr->plugin_options?"\n":"");
+         } else {
+            ua->send_msg(_("Run %s job\n"
                         "JobName:  %s\n"
                         "Level:    %s\n"
                         "Client:   %s\n"
@@ -781,7 +821,6 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
                         "When:     %s\n"
                         "Priority: %d\n"
                         "%s%s%s"),
-                 _("Backup"),
                  job->name(),
                  level_to_str(jcr->getJobLevel()),
                  jcr->client->name(),
@@ -793,6 +832,7 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
                  jcr->plugin_options?"Plugin Options: ":"",
                  jcr->plugin_options?jcr->plugin_options:"",
                  jcr->plugin_options?"\n":"");
+         }
       } else {  /* JT_VERIFY */
          const char *Name;
          if (jcr->verify_job) {
@@ -806,8 +846,32 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
          if (!verify_list) {
             verify_list = "";
          }
-         if (ua->api) ua->signal(BNET_RUN_CMD);   
-         ua->send_msg(_("Run %s job\n"
+         if (ua->api) {
+            ua->signal(BNET_RUN_CMD);   
+            ua->send_msg("Type: Verify\n"
+                        "Title: Run Verify Job\n"
+                        "JobName:     %s\n"
+                        "Level:       %s\n"
+                        "Client:      %s\n"
+                        "FileSet:     %s\n"
+                        "Pool:        %s (From %s)\n"
+                        "Storage:     %s (From %s)\n"
+                        "Verify Job:  %s\n"
+                        "Verify List: %s\n"
+                        "When:        %s\n"
+                        "Priority:    %d\n",
+              job->name(),
+              level_to_str(jcr->getJobLevel()),
+              jcr->client->name(),
+              jcr->fileset->name(),
+              NPRT(jcr->pool->name()), jcr->pool_source,
+              jcr->rstore->name(), jcr->rstore_source,
+              Name,
+              verify_list,
+              bstrutime(dt, sizeof(dt), jcr->sched_time),
+              jcr->JobPriority);
+         } else {
+            ua->send_msg(_("Run %s job\n"
                         "JobName:     %s\n"
                         "Level:       %s\n"
                         "Client:      %s\n"
@@ -829,6 +893,7 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
               verify_list,
               bstrutime(dt, sizeof(dt), jcr->sched_time),
               jcr->JobPriority);
+         }
       }
       break;
    case JT_RESTORE:
@@ -845,10 +910,38 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
       jcr->set_JobLevel(L_FULL);      /* default level */
       Dmsg1(800, "JobId to restore=%d\n", jcr->RestoreJobId);
       if (jcr->RestoreJobId == 0) {
-         if (ua->api) ua->signal(BNET_RUN_CMD);   
          /* RegexWhere is take before RestoreWhere */
          if (jcr->RegexWhere || (job->RegexWhere && !jcr->where)) {
-            ua->send_msg(_("Run Restore job\n"
+            if (ua->api) {
+               ua->signal(BNET_RUN_CMD);   
+               ua->send_msg("Type: Restore\n"
+                        "Title: Run Restore Job\n"
+                        "JobName:         %s\n"
+                        "Bootstrap:       %s\n"
+                        "RegexWhere:      %s\n"
+                        "Replace:         %s\n"
+                        "FileSet:         %s\n"
+                        "Backup Client:   %s\n"
+                        "Restore Client:  %s\n"
+                        "Storage:         %s\n"
+                        "When:            %s\n"
+                        "Catalog:         %s\n"
+                        "Priority:        %d\n"
+                        "Plugin Options:  %s\n",
+                 job->name(),
+                 NPRT(jcr->RestoreBootstrap), 
+                 jcr->RegexWhere?jcr->RegexWhere:job->RegexWhere,
+                 replace,
+                 jcr->fileset->name(),
+                 client_name,
+                 jcr->client->name(),
+                 jcr->rstore->name(),
+                 bstrutime(dt, sizeof(dt), jcr->sched_time),
+                 jcr->catalog->name(),
+                 jcr->JobPriority,
+                 NPRT(jcr->plugin_options));
+            } else {
+               ua->send_msg(_("Run Restore job\n"
                         "JobName:         %s\n"
                         "Bootstrap:       %s\n"
                         "RegexWhere:      %s\n"
@@ -873,9 +966,38 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
                  jcr->catalog->name(),
                  jcr->JobPriority,
                  NPRT(jcr->plugin_options));
-
+            }
          } else {
-            ua->send_msg(_("Run Restore job\n"
+            if (ua->api) {
+               ua->signal(BNET_RUN_CMD);   
+               ua->send_msg("Type: Restore\n"
+                        "Title: Run Restore job\n"
+                        "JobName:         %s\n"
+                        "Bootstrap:       %s\n"
+                        "Where:           %s\n"
+                        "Replace:         %s\n"
+                        "FileSet:         %s\n"
+                        "Backup Client:   %s\n"
+                        "Restore Client:  %s\n"
+                        "Storage:         %s\n"
+                        "When:            %s\n"
+                        "Catalog:         %s\n"
+                        "Priority:        %d\n"
+                        "Plugin Options:  %s\n",
+                 job->name(),
+                 NPRT(jcr->RestoreBootstrap), 
+                 jcr->where?jcr->where:NPRT(job->RestoreWhere), 
+                 replace,
+                 jcr->fileset->name(),
+                 client_name,
+                 jcr->client->name(),
+                 jcr->rstore->name(),
+                 bstrutime(dt, sizeof(dt), jcr->sched_time),
+                 jcr->catalog->name(),
+                 jcr->JobPriority,
+                 NPRT(jcr->plugin_options));
+            } else {
+               ua->send_msg(_("Run Restore job\n"
                         "JobName:         %s\n"
                         "Bootstrap:       %s\n"
                         "Where:           %s\n"
@@ -900,9 +1022,11 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
                  jcr->catalog->name(),
                  jcr->JobPriority,
                  NPRT(jcr->plugin_options));
+            }
          }
 
       } else {
+         /* ***FIXME*** This needs to be fixed for bat */
          if (ua->api) ua->signal(BNET_RUN_CMD);   
          ua->send_msg(_("Run Restore job\n"
                         "JobName:    %s\n"
@@ -939,15 +1063,46 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
       break;
    case JT_COPY:
    case JT_MIGRATE:
-      const char *prt_type;
-      if (jcr->getJobType() == JT_COPY) {
-         prt_type = _("Run Copy job\n");
-      } else {
-         prt_type = _("Run Migration job\n");
-      }
+      char *prt_type;
       jcr->set_JobLevel(L_FULL);      /* default level */
-      if (ua->api) ua->signal(BNET_RUN_CMD);   
-      ua->send_msg("%s"
+      if (ua->api) {
+         ua->signal(BNET_RUN_CMD);
+         if (jcr->getJobType() == JT_COPY) {
+            prt_type = (char *)"Type: Copy\nTitle: Run Copy Job\n";
+         } else {
+            prt_type = (char *)"Type: Migration\nTitle: Run Migration Job\n";
+         }
+         ua->send_msg("%s"
+                     "JobName:       %s\n"
+                     "Bootstrap:     %s\n"
+                     "Client:        %s\n"
+                     "FileSet:       %s\n"
+                     "Pool:          %s\n"
+                     "Read Storage:  %s\n"
+                     "Write Storage: %s\n"
+                     "JobId:         %s\n"
+                     "When:          %s\n"
+                     "Catalog:       %s\n"
+                     "Priority:      %d\n",
+           prt_type,
+           job->name(),
+           NPRT(jcr->RestoreBootstrap),
+           jcr->client->name(),
+           jcr->fileset->name(),
+           NPRT(jcr->pool->name()),
+           jcr->rstore->name(),
+           jcr->wstore?jcr->wstore->name():"*None*",
+           jcr->MigrateJobId==0?"*None*":edit_uint64(jcr->MigrateJobId, ec1),
+           bstrutime(dt, sizeof(dt), jcr->sched_time),
+           jcr->catalog->name(),
+           jcr->JobPriority);
+      } else {
+         if (jcr->getJobType() == JT_COPY) {
+            prt_type = _("Run Copy job\n");
+         } else {
+            prt_type = _("Run Migration job\n");
+         }
+         ua->send_msg("%s"
                      "JobName:       %s\n"
                      "Bootstrap:     %s\n"
                      "Client:        %s\n"
@@ -971,6 +1126,7 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
            bstrutime(dt, sizeof(dt), jcr->sched_time),
            jcr->catalog->name(),
            jcr->JobPriority);
+      }
       break;
    default:
       ua->error_msg(_("Unknown Job Type=%d\n"), jcr->getJobType());
index c81663158a3ee7255459edc87f7d99dd83d9d296..2cffc47ef170edfa342e8811ded318836f76dd04 100644 (file)
@@ -56,7 +56,6 @@ JobList::JobList(const QString &mediaName, const QString &clientName,
    m_clientName = clientName;
    m_jobName = jobName;
    m_filesetName = filesetName;
-   m_filesetName = filesetName;
    pgInitialize("", parentTreeWidgetItem);
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/emblem-system.png")));
@@ -134,6 +133,10 @@ void JobList::populateTable()
    m_startIndex = headerlist.indexOf(tr("Job Starttime"));
    m_filesIndex = headerlist.indexOf(tr("Job Files"));
    m_bytesIndex = headerlist.indexOf(tr("Job Bytes"));
+   m_levelIndex = headerlist.indexOf(tr("Job Level"));
+   m_nameIndex = headerlist.indexOf(tr("Job Name"));
+   m_filesetIndex = headerlist.indexOf(tr("File Set"));
+   m_clientIndex = headerlist.indexOf(tr("Client"));
 
    /* Initialize the QTableWidget */
    m_checkCurrentWidget = false;
@@ -415,6 +418,7 @@ void JobList::createConnections()
    connect(actionListFilesOnJob, SIGNAL(triggered()), this, SLOT(consoleListFilesOnJob()));
    connect(actionListJobMedia, SIGNAL(triggered()), this, SLOT(consoleListJobMedia()));
    connect(actionDeleteJob, SIGNAL(triggered()), this, SLOT(consoleDeleteJob()));
+   connect(actionRestartJob, SIGNAL(triggered()), this, SLOT(consoleRestartJob()));
    connect(actionPurgeFiles, SIGNAL(triggered()), this, SLOT(consolePurgeFiles()));
    connect(actionRestoreFromJob, SIGNAL(triggered()), this, SLOT(preRestoreFromJob()));
    connect(actionRestoreFromTime, SIGNAL(triggered()), this, SLOT(preRestoreFromTime()));
@@ -453,6 +457,7 @@ void JobList::consoleListJobTotals()
    if (mainWin->m_longList) { cmd.prepend("l"); }
    consoleCommand(cmd);
 }
+
 void JobList::consoleDeleteJob()
 {
    if (QMessageBox::warning(this, "Bat",
@@ -472,6 +477,23 @@ void JobList::consoleDeleteJob()
    consoleCommand(cmd, false);
    populateTable();
 }
+
+void JobList::consoleRestartJob()
+{
+   QString cmd;
+
+   cmd = tr("run job=\"%1\" client=\"%2\" level=%3").arg(m_jobName).arg(m_clientName).arg(m_levelName);
+   if (m_filesetName != "" && m_filesetName != "*None*") {
+      cmd += tr(" fileset=\"%1\"").arg(m_filesetName);
+   }
+
+   if (mainWin->m_commandDebug) Pmsg1(000, "Run cmd : %s\n",cmd.toUtf8().data());
+   consoleCommand(cmd, false);
+   populateTable();
+}
+
+
+
 void JobList::consolePurgeFiles()
 {
    if (QMessageBox::warning(this, "Bat",
@@ -639,6 +661,7 @@ void JobList::selectionChanged()
    if (m_selectedJobsCount == 1) {
       mp_tableWidget->addAction(actionListFilesOnJob);
       mp_tableWidget->addAction(actionListJobMedia);
+      mp_tableWidget->addAction(actionRestartJob);
       mp_tableWidget->addAction(actionRestoreFromJob);
       mp_tableWidget->addAction(actionRestoreFromTime);
       mp_tableWidget->addAction(actionShowLogForJob);
@@ -653,7 +676,19 @@ void JobList::selectionChanged()
    if (m_checkCurrentWidget) {
       int row = mp_tableWidget->currentRow();
       QTableWidgetItem* jobitem = mp_tableWidget->item(row, 0);
-      m_currentJob = jobitem->text();
+      m_currentJob = jobitem->text();    /* get JobId */
+      jobitem = mp_tableWidget->item(row, m_clientIndex);
+      m_clientName = jobitem->text();    /* get Client Name */
+      jobitem = mp_tableWidget->item(row, m_nameIndex);
+      m_jobName = jobitem->text();    /* get Job Name */
+      jobitem = mp_tableWidget->item(row, m_levelIndex);
+      m_levelName = jobitem->text();    /* get level */
+      jobitem = mp_tableWidget->item(row, m_filesetIndex);
+      if (jobitem) {
+         m_filesetName = jobitem->text();    /* get FileSet Name */
+      } else {
+         m_filesetName = "";
+      }
 
       /* include purged action or not */
       jobitem = mp_tableWidget->item(row, m_purgedIndex);
@@ -662,6 +697,7 @@ void JobList::selectionChanged()
       if (purged == tr("No") ) {
          mp_tableWidget->addAction(actionPurgeFiles);
       }*/
+
       /* include restore from time and job action or not */
       jobitem = mp_tableWidget->item(row, m_typeIndex);
       QString type = jobitem->text();
@@ -673,6 +709,7 @@ void JobList::selectionChanged()
             mp_tableWidget->addAction(actionRestoreFromTime);
          }
       }
+
       /* include cancel action or not */
       jobitem = mp_tableWidget->item(row, m_statusIndex);
       QString status = jobitem->text();
index 6e9a022729791e4c8c95ff51510f4691002ed7c3..dceaf205fee6a8a751b58b0c49ff6f70849ce2de 100644 (file)
@@ -60,6 +60,7 @@ private slots:
    void consoleListJobMedia();
    void consoleListJobTotals();
    void consoleDeleteJob();
+   void consoleRestartJob();
    void consolePurgeFiles();
    void preRestoreFromJob();
    void preRestoreFromTime();
@@ -76,6 +77,7 @@ private:
    void prepareFilterWidgets();
    void fillQueryString(QString &query);
    QSplitter *m_splitter;
+
    QString m_groupText;
    QString m_splitText;
    QString m_mediaName;
@@ -83,11 +85,17 @@ private:
    QString m_jobName;
    QString m_filesetName;
    QString m_currentJob;
+   QString m_levelName;
+
    bool m_populated;
    bool m_checkCurrentWidget;
    int m_jobIdIndex;
    int m_purgedIndex;
    int m_typeIndex;
+   int m_levelIndex;
+   int m_clientIndex;
+   int m_nameIndex;
+   int m_filesetIndex;
    int m_statusIndex;
    int m_startIndex;
    int m_bytesIndex;
index dd40d2c52fc46f419f4664b409c8ebc3c70503ce..5d5947558a14ee2b389bb3be063ce184235b9c74 100644 (file)
      <normaloff>:/images/utilities-terminal.png</normaloff>:/images/utilities-terminal.png</iconset>
    </property>
    <property name="text">
-    <string>ListJobMedia</string>
+    <string>List Job Volumes</string>
    </property>
   </action>
   <action name="actionListVolumes">
      <normaloff>:/images/utilities-terminal.png</normaloff>:/images/utilities-terminal.png</iconset>
    </property>
    <property name="text">
-    <string>ListVolumes</string>
+    <string>List Volumes</string>
    </property>
   </action>
   <action name="actionDeleteJob">
      <normaloff>:/images/weather-severe-alert.png</normaloff>:/images/weather-severe-alert.png</iconset>
    </property>
    <property name="text">
-    <string>DeleteJob</string>
+    <string>Delete Job</string>
    </property>
   </action>
   <action name="actionPurgeFiles">
      <normaloff>:/images/weather-severe-alert.png</normaloff>:/images/weather-severe-alert.png</iconset>
    </property>
    <property name="text">
-    <string>PurgeFiles</string>
+    <string>Purge Files</string>
+   </property>
+  </action>
+  <action name="actionRestartJob">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/weather-severe-alert.png</normaloff>:/images/weather-severe-alert.png</iconset>
+   </property>
+   <property name="text">
+    <string>Restart Job</string>
    </property>
   </action>
   <action name="actionRestoreFromJob">
      <normaloff>:/images/joblog.png</normaloff>:/images/joblog.png</iconset>
    </property>
    <property name="text">
-    <string>Show Log for Job</string>
+    <string>Show Job Log</string>
    </property>
   </action>
   <action name="actionShowInfoForJob">
      <normaloff>:/images/joblog.png</normaloff>:/images/joblog.png</iconset>
    </property>
    <property name="text">
-    <string>Show Info for Job</string>
+    <string>Show Job Info</string>
    </property>
   </action>
   <action name="actionCancelJob">
      <normaloff>:/images/utilities-terminal.png</normaloff>:/images/utilities-terminal.png</iconset>
    </property>
    <property name="text">
-    <string>List Job Totals in Console</string>
+    <string>List Job Totals on Console</string>
    </property>
   </action>
  </widget>
index 8537604b029a31d0f9ffa4c0870a571867bb49e0..e1160a7a2ab17ec5d4cb21a51fd2e652e547f242 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
+   Copyright (C) 2007-2010 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -225,9 +225,11 @@ void Pages::closeStackPage()
    /* First get the tree widget item and destroy it */
    QTreeWidgetItem *item=mainWin->getFromHash(this);
    /* remove the QTreeWidgetItem <-> page from the hash */
-   mainWin->hashRemove(item, this);
-   /* remove the item from the page selector by destroying it */
-   delete item;
+   if (item) {
+      mainWin->hashRemove(item, this);
+      /* remove the item from the page selector by destroying it */
+      delete item;
+   }
    /* remove this */
    delete this;
 }
@@ -285,6 +287,7 @@ void Pages::consoleCommand(QString &command)
 {
    consoleCommand(command, true);
 }
+
 void Pages::consoleCommand(QString &command, bool setCurrent)
 {
    int conn;
@@ -298,10 +301,12 @@ void Pages::consoleCommand(QString &command, bool setCurrent)
       if (donotify) { m_console->notify(conn, true); }
    }
 }
+
 void Pages::consoleCommand(QString &command, int conn)
 {
    consoleCommand(command, conn, true);
 }
+
 void Pages::consoleCommand(QString &command, int conn, bool setCurrent)
 {
    /* Bring this director's console to the front of the stack */
index 60c59b3972249f81e9df6fa286c3ae77c737af04..3c98acb6743e6ac372b3f2bd954f116aaa677af7 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
+   Copyright (C) 2007-2010 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -31,7 +31,6 @@
  *
  *   Kern Sibbald, February MMVII
  *
- *  $Id$
  */ 
 
 #include "bat.h"
@@ -111,7 +110,7 @@ void runPage::init()
    connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
 
    // find a way to place the new window at the cursor position
-   // or in the midle of the page
+   // or in the middle of the page
 //   dockPage();
    setCurrent();
 }
index 1926c35e47301a17866b848d20178466a706e0df..6b21a4b46da3b5fe45ac6b71533be9f1fb029840 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
+   Copyright (C) 2007-2010 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -37,7 +37,6 @@
  *
  *   Kern Sibbald, March MMVII
  *
- *  $Id$
  */ 
 
 #include "bat.h"
@@ -84,15 +83,15 @@ void runCmdPage::fill()
    m_console->read(m_conn);
    item = m_console->msg(m_conn);
    items = item.split("\n");
-   label->setText(items[0]);
-   Dmsg1(200, "Title=%s\n", items[0].toUtf8().data());
-   items.removeFirst();               /* remove title */
    foreach(item, items) {
       rx.indexIn(item);
       val = rx.cap(1);
-      Dmsg1(200, "Item=%s\n", item.toUtf8().data());
-      Dmsg1(200, "Value=%s\n", val.toUtf8().data());
+      Dmsg1(000, "Item=%s\n", item.toUtf8().data());
+      Dmsg1(000, "Value=%s\n", val.toUtf8().data());
 
+      if (item.startsWith("Title:")) {
+         run->setText(val);
+      }
       if (item.startsWith("JobName:")) {
          jobCombo->addItem(val);
          continue;