]> git.sur5r.net Git - bacula/bacula/commitdiff
Make restore job yes/mod/no print in one command so GUI works.
authorKern Sibbald <kern@sibbald.com>
Thu, 26 Apr 2007 20:21:55 +0000 (20:21 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 26 Apr 2007 20:21:55 +0000 (20:21 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4639 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/ua_run.c
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/run/runcmd.cpp
bacula/technotes-2.1

index c5603dd3f80646455f3e6003e016005c63c12cb0..7bbafe5e60f7bfa7a0fe020867cfd5d57d00fb32 100644 (file)
@@ -1144,22 +1144,38 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, char *veri
       Dmsg1(800, "JobId to restore=%d\n", jcr->RestoreJobId);
       if (jcr->RestoreJobId == 0) {
          if (ua->api) ua->signal(BNET_RUN_CMD);   
-         ua->send_msg(_("Run Restore job\n"
-                        "JobName:    %s\n"
-                        "Bootstrap:  %s\n"),
-                      job->name(),
-                      NPRT(jcr->RestoreBootstrap));
-
          /* RegexWhere is take before RestoreWhere */
          if (jcr->RegexWhere || (job->RegexWhere && !jcr->where)) {
-            ua->send_msg(_("RegexWhere: %s\n"),
-                         jcr->RegexWhere?jcr->RegexWhere:job->RegexWhere);
-         } else {
-            ua->send_msg(_("Where:      %s\n"),
-                         jcr->where?jcr->where:NPRT(job->RestoreWhere));
-         }
+            ua->send_msg(_("Run Restore job\n"
+                        "JobName:        f%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"),
+                 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);
 
-         ua->send_msg(_("Replace:         %s\n"
+         } else {
+            ua->send_msg(_("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"
@@ -1167,14 +1183,19 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, char *veri
                         "When:            %s\n"
                         "Catalog:         %s\n"
                         "Priority:        %d\n"),
-              replace,
-              jcr->fileset->name(),
-              client_name,
-              jcr->client->name(),
-              jcr->rstore->name(),
-              bstrutime(dt, sizeof(dt), jcr->sched_time),
-              jcr->catalog->name(),
-              jcr->JobPriority);
+                 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);
+         }
+
       } else {
          if (ua->api) ua->signal(BNET_RUN_CMD);   
          ua->send_msg(_("Run Restore job\n"
index feab8359f246d7e299826a1a93e988bc45befa5f..3472cbbf467ef163836129dd00b1a02f9b2eead0 100644 (file)
@@ -111,7 +111,7 @@ void MainWin::createPages()
 
       /* create instances of the rest of the classes that will by default exist
       * under each director */
-      createPagebRestore();
+//    createPagebRestore();
       createPageMediaList();
       QString emptymedia(""), emptyclient("");
       createPageJobList(emptymedia, emptyclient, NULL);
index b038b2a15e8e173054327c29e69f76db9771fa56..4eb8680b1c7f06d1c630eaaa1b6630a0216c76f5 100644 (file)
 /*
  *  Run Command Dialog class
  *
+ *  This is called when a Run Command signal is received from the
+ *    Director. We parse the Director's output and throw up a 
+ *    dialog box.
+ *
  *   Kern Sibbald, March MMVII
  *
  *  $Id: $
@@ -54,7 +58,7 @@ void runCmdDialog::fillRunDialog()
 {
    QString item, val;
    QStringList items;
-   QRegExp rx("^.*:\\s*(\\S.*$)");
+   QRegExp rx("^.*:\\s*(\\S.*$)");   /* Regex to get value */
 
    m_console->read();
    item = m_console->msg();
@@ -76,7 +80,7 @@ void runCmdDialog::fillRunDialog()
          bootstrap->setText(val);
          continue;
       }
-      if (item.startsWith("Client:")) {
+      if (item.startsWith("Backup Client:")) {
          clientCombo->addItem(val);
          continue;
       }
index cf2e9ac79ed6fcc39bf177e58a8f47f34aae1069..abee15e7b31d2db75f96d5b8d4738a59ff53c650 100644 (file)
@@ -1,7 +1,8 @@
               Technical notes on version 2.1
 
 General:
-25Apr07
+26Apr07
+kes  Make restore job yes/mod/no print in one command so GUI works.
 kes  First cut implementing backup and restore client.
 kes  Correct editing in Verify output that caused a seg fault.
 25Apr07