From: Kern Sibbald Date: Thu, 26 Apr 2007 20:21:55 +0000 (+0000) Subject: Make restore job yes/mod/no print in one command so GUI works. X-Git-Tag: Release-7.0.0~6489 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=033a1abbcd869ffdc4c5f8af278b96b6f782b067;p=bacula%2Fbacula Make restore job yes/mod/no print in one command so GUI works. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4639 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/ua_run.c b/bacula/src/dird/ua_run.c index c5603dd3f8..7bbafe5e60 100644 --- a/bacula/src/dird/ua_run.c +++ b/bacula/src/dird/ua_run.c @@ -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" diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index feab8359f2..3472cbbf46 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -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); diff --git a/bacula/src/qt-console/run/runcmd.cpp b/bacula/src/qt-console/run/runcmd.cpp index b038b2a15e..4eb8680b1c 100644 --- a/bacula/src/qt-console/run/runcmd.cpp +++ b/bacula/src/qt-console/run/runcmd.cpp @@ -29,6 +29,10 @@ /* * 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; } diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index cf2e9ac79e..abee15e7b3 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -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