]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix status alignment output reported by Wanderlei Huttel
authorKern Sibbald <kern@sibbald.com>
Wed, 21 Sep 2016 14:45:20 +0000 (16:45 +0200)
committerKern Sibbald <kern@sibbald.com>
Wed, 21 Sep 2016 14:45:20 +0000 (16:45 +0200)
bacula/src/dird/ua_status.c
bacula/src/lib/status.h
regress/tests/short-incremental-test

index c0faaa880e979882c808a564fd2df37992e7e950..52d25c34b6876a8d12e9c4c31b9bdd3abc16e6fe 100644 (file)
@@ -1090,7 +1090,7 @@ static void list_terminated_jobs(UAContext *ua)
    struct s_last_job *je;
    if (!ua->api) {
       ua->send_msg(_("\nTerminated Jobs:\n"));
-      ua->send_msg(_(" JobId  Level    Files      Bytes   Status   Finished        Name \n"));
+      ua->send_msg(_(" JobId  Level      Files    Bytes   Status   Finished        Name \n"));
       ua->send_msg(_("====================================================================\n"));
    }
    foreach_dlist(je, last_jobs) {
@@ -1159,7 +1159,7 @@ static void list_terminated_jobs(UAContext *ua)
             termstat,
             dt, JobName);
       } else {
-         ua->send_msg(_("%6d  %-6s %8s %10s  %-7s  %-8s %s\n"),
+         ua->send_msg(_("%6d  %-7s %8s %10s  %-7s  %-8s %s\n"),
             je->JobId,
             level,
             edit_uint64_with_commas(je->JobFiles, b1),
index 59271f7f871064c9be349db2a2197fa7191dedbe..d38bf4334ecbfd6c5febb99b060f1bde75a03cbf 100644 (file)
@@ -81,7 +81,7 @@ static void list_terminated_jobs(STATUS_PKT *sp)
       return;
    }
    lock_last_jobs_list();
-   msg =  _(" JobId  Level    Files      Bytes   Status   Finished        Name \n");
+   msg =  _(" JobId  Level      Files    Bytes   Status   Finished        Name \n");
    if (!sp->api) sendit(msg, strlen(msg), sp);
    msg =  _("===================================================================\n");
    if (!sp->api) sendit(msg, strlen(msg), sp);
@@ -93,8 +93,9 @@ static void list_terminated_jobs(STATUS_PKT *sp)
       bstrftime_nc(dt, sizeof(dt), je->end_time);
       switch (je->JobType) {
       case JT_ADMIN:
+         bstrncpy(level, "Admin", sizeof(level));
       case JT_RESTORE:
-         bstrncpy(level, "    ", sizeof(level));
+         bstrncpy(level, "Restore", sizeof(level));
          break;
       default:
          bstrncpy(level, job_level_to_str(je->JobLevel), sizeof(level));
@@ -137,7 +138,7 @@ static void list_terminated_jobs(STATUS_PKT *sp)
          }
       }
       if (sp->api == 1) {
-         bsnprintf(buf, sizeof(buf), _("%6d\t%-6s\t%8s\t%10s\t%-7s\t%-8s\t%s\n"),
+         bsnprintf(buf, sizeof(buf), _("%6d\t%-7s\t%8s\t%10s\t%-7s\t%-8s\t%s\n"),
             je->JobId,
             level,
             edit_uint64_with_commas(je->JobFiles, b1),
@@ -145,7 +146,7 @@ static void list_terminated_jobs(STATUS_PKT *sp)
             termstat,
             dt, JobName);
       } else {
-         bsnprintf(buf, sizeof(buf), _("%6d  %-6s %8s %10s  %-7s  %-8s %s\n"),
+         bsnprintf(buf, sizeof(buf), _("%6d  %-7s %8s %10s  %-7s  %-8s %s\n"),
             je->JobId,
             level,
             edit_uint64_with_commas(je->JobFiles, b1),
index 7556e4a0e643b58afecded1cccad5b49d2e0bdf6..a6596dbee2d1d7b9cbb7ed062b3af9c16396af56 100755 (executable)
@@ -82,6 +82,7 @@ setdebug level=10 storage=File
 restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
 yes
 wait
+status dir
 status client
 status storage=File
 messages