From: Eric Bollengier Date: Sat, 3 Jan 2009 19:40:17 +0000 (+0000) Subject: ebl use special icon for Admin, Copy, Migration control jobs X-Git-Tag: Release-3.0.0~365 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2941f6e0d70642a98b833ad2fb15146957401259;p=bacula%2Fbacula ebl use special icon for Admin, Copy, Migration control jobs git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8299 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/cgi/bresto.pl b/gui/bweb/cgi/bresto.pl index 836696d534..c253973860 100755 --- a/gui/bweb/cgi/bresto.pl +++ b/gui/bweb/cgi/bresto.pl @@ -563,7 +563,7 @@ sub get_all_file_versions } # We have the list of all versions of this file. - # We'll sort it by mtime desc, size, md5, inchanger desc + # We'll sort it by mtime desc, size, md5, inchanger desc, FileId # the rest of the algorithm will be simpler # ('FILE:',filename,jobid,fileindex,mtime,size,inchanger,md5,volname) @versions = sort { $b->[4] <=> $a->[4] @@ -591,7 +591,7 @@ sub get_all_file_versions # we never met this one before... $allready_seen_by_md5{$ref->[7] .'-'. $ref->[5]}=1; } - # Even if it has a md5, we should also work with mtimes + # Even if it has a md5, we should also work with mtimes # We allready have a (better) version next if ( (not $see_all) and $allready_seen_by_mtime{$ref->[4] .'-'. $ref->[5]}); @@ -813,6 +813,7 @@ if (!scalar(@jobid) and $args->{qdate} and $args->{client}) { @jobid = $bvfs->set_job_ids_for_date($args->{client}, $args->{qdate}); } $bvfs->set_curjobids(@jobid); +print STDERR "date=$args->{qdate} currentjobids = ", join(",", @jobid), "\n"; $bvfs->set_limits($args->{limit}, $args->{offset}); if (!scalar(@jobid)) { diff --git a/gui/bweb/html/AT.png b/gui/bweb/html/AT.png new file mode 100644 index 0000000000..7a599105ea Binary files /dev/null and b/gui/bweb/html/AT.png differ diff --git a/gui/bweb/html/bweb.js b/gui/bweb/html/bweb.js index d59f0ef367..98e3cfa5ba 100644 --- a/gui/bweb/html/bweb.js +++ b/gui/bweb/html/bweb.js @@ -309,7 +309,7 @@ function percent_usage(value, parent) return parent; } -function bweb_get_job_img(status, errors) +function bweb_get_job_img(status, errors, type) { var ret; @@ -318,9 +318,12 @@ function bweb_get_job_img(status, errors) ret = "W.png"; } else { - ret = "T.png"; + if (type == 'B' || type == 'R') { // Backup or Restore + ret = "T.png"; + } else { + ret = "AT.png"; // Admin, migration, copy etc... + } } - } else { ret = status + ".png"; } diff --git a/gui/bweb/lang/en/tpl/begin.tpl b/gui/bweb/lang/en/tpl/begin.tpl index 2a70faaf0d..728b8184f6 100644 --- a/gui/bweb/lang/en/tpl/begin.tpl +++ b/gui/bweb/lang/en/tpl/begin.tpl @@ -38,7 +38,7 @@ if ('Main' == ('_' + '_Main_' + '_')) {
  • Last Jobs
  • Running Jobs
  • Next Jobs
  • -
  • Restore
  • +
  • Web Restore
  • diff --git a/gui/bweb/lang/en/tpl/display_job.tpl b/gui/bweb/lang/en/tpl/display_job.tpl index d89b77abdc..7258064596 100644 --- a/gui/bweb/lang/en/tpl/display_job.tpl +++ b/gui/bweb/lang/en/tpl/display_job.tpl @@ -32,7 +32,9 @@ a = document.createElement('A'); a.href='?action=job_zoom;jobid='; img = document.createElement("IMG"); -img.src=bweb_get_job_img("", ); +img.src=bweb_get_job_img("", + , + ""); img.title=jobstatus['']; a.appendChild(img); diff --git a/gui/bweb/lang/en/tpl/display_job_group.tpl b/gui/bweb/lang/en/tpl/display_job_group.tpl index cb39e97285..16bac05b2a 100644 --- a/gui/bweb/lang/en/tpl/display_job_group.tpl +++ b/gui/bweb/lang/en/tpl/display_job_group.tpl @@ -38,7 +38,7 @@ if () { jobstatus='T'; } -img.src=bweb_get_job_img(jobstatus, ); +img.src=bweb_get_job_img(jobstatus, , "B"); img.title=jobstatus[jobstatus]; a.appendChild(img); diff --git a/gui/bweb/lang/en/tpl/display_job_zoom.tpl b/gui/bweb/lang/en/tpl/display_job_zoom.tpl index 4cface8966..44eee8c217 100644 --- a/gui/bweb/lang/en/tpl/display_job_zoom.tpl +++ b/gui/bweb/lang/en/tpl/display_job_zoom.tpl @@ -96,7 +96,9 @@ var header = new Array("JobId", var data = new Array(); img = document.createElement("IMG"); -img.src=bweb_get_job_img("", ); +img.src=bweb_get_job_img("", + , + ''); img.title=jobstatus['']; data.push( new Array( diff --git a/gui/bweb/lang/en/tpl/overview.tpl b/gui/bweb/lang/en/tpl/overview.tpl index dd341de9bc..b9a9c3c194 100644 --- a/gui/bweb/lang/en/tpl/overview.tpl +++ b/gui/bweb/lang/en/tpl/overview.tpl @@ -97,7 +97,7 @@ function add_client(name, infos) // a=document.createElement("A"); // create a link to action=job // a.setAttribute('href', "?action=job;client_group=" + name); img=document.createElement("IMG"); - img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2])); + img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2], 'B')); img.setAttribute("title", infos[j][3]); // a.appendChild(img); td.appendChild(img); diff --git a/gui/bweb/lang/es/tpl/begin.tpl b/gui/bweb/lang/es/tpl/begin.tpl index de6c9390ca..969f1ddde6 100644 --- a/gui/bweb/lang/es/tpl/begin.tpl +++ b/gui/bweb/lang/es/tpl/begin.tpl @@ -38,7 +38,7 @@ if ('Principal' == ('_' + '_Main_' + '_')) {
  • Últimos Jobs
  • Jobs en Ejecución
  • Próximos Jobs
  • -
  • Recuperación
  • +
  • Web Restore
  • diff --git a/gui/bweb/lang/es/tpl/display_job.tpl b/gui/bweb/lang/es/tpl/display_job.tpl index 6ac453c2fe..e3e068c195 100644 --- a/gui/bweb/lang/es/tpl/display_job.tpl +++ b/gui/bweb/lang/es/tpl/display_job.tpl @@ -32,7 +32,9 @@ a = document.createElement('A'); a.href='?action=job_zoom;jobid='; img = document.createElement("IMG"); -img.src=bweb_get_job_img("", ); +img.src=bweb_get_job_img("", + , + ""); img.title=jobstatus['']; a.appendChild(img); diff --git a/gui/bweb/lang/es/tpl/display_job_group.tpl b/gui/bweb/lang/es/tpl/display_job_group.tpl index d1aff16161..971914077c 100644 --- a/gui/bweb/lang/es/tpl/display_job_group.tpl +++ b/gui/bweb/lang/es/tpl/display_job_group.tpl @@ -38,7 +38,7 @@ if () { jobstatus='T'; } -img.src=bweb_get_job_img(jobstatus, ); +img.src=bweb_get_job_img(jobstatus, , "B"); img.title=jobstatus[jobstatus]; a.appendChild(img); diff --git a/gui/bweb/lang/es/tpl/display_job_zoom.tpl b/gui/bweb/lang/es/tpl/display_job_zoom.tpl index 4910401a56..1dc53248ae 100644 --- a/gui/bweb/lang/es/tpl/display_job_zoom.tpl +++ b/gui/bweb/lang/es/tpl/display_job_zoom.tpl @@ -96,7 +96,9 @@ var header = new Array("JobId", var data = new Array(); img = document.createElement("IMG"); -img.src=bweb_get_job_img("", ); +img.src=bweb_get_job_img("", + , + ''); img.title=jobstatus['']; data.push( new Array( diff --git a/gui/bweb/lang/es/tpl/overview.tpl b/gui/bweb/lang/es/tpl/overview.tpl index dd341de9bc..b9a9c3c194 100644 --- a/gui/bweb/lang/es/tpl/overview.tpl +++ b/gui/bweb/lang/es/tpl/overview.tpl @@ -97,7 +97,7 @@ function add_client(name, infos) // a=document.createElement("A"); // create a link to action=job // a.setAttribute('href', "?action=job;client_group=" + name); img=document.createElement("IMG"); - img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2])); + img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2], 'B')); img.setAttribute("title", infos[j][3]); // a.appendChild(img); td.appendChild(img); diff --git a/gui/bweb/lang/fr/tpl/begin.tpl b/gui/bweb/lang/fr/tpl/begin.tpl index 1ac4423c2e..ba00e54fe7 100644 --- a/gui/bweb/lang/fr/tpl/begin.tpl +++ b/gui/bweb/lang/fr/tpl/begin.tpl @@ -38,7 +38,7 @@ if ('Accueil' == ('_' + '_Main_' + '_')) {
  • Historique
  • Jobs en cours
  • Prochains jobs
  • -
  • Restauration
  • +
  • Web Restore
  • diff --git a/gui/bweb/lang/fr/tpl/display_job.tpl b/gui/bweb/lang/fr/tpl/display_job.tpl index b5f68dd0e2..3ebe6fd002 100644 --- a/gui/bweb/lang/fr/tpl/display_job.tpl +++ b/gui/bweb/lang/fr/tpl/display_job.tpl @@ -32,7 +32,9 @@ a = document.createElement('A'); a.href='?action=job_zoom;jobid='; img = document.createElement("IMG"); -img.src=bweb_get_job_img("", ); +img.src=bweb_get_job_img("", + , + ""); img.title=jobstatus['']; a.appendChild(img); diff --git a/gui/bweb/lang/fr/tpl/display_job_group.tpl b/gui/bweb/lang/fr/tpl/display_job_group.tpl index 7ccc053c67..4b52ffb08e 100644 --- a/gui/bweb/lang/fr/tpl/display_job_group.tpl +++ b/gui/bweb/lang/fr/tpl/display_job_group.tpl @@ -38,7 +38,7 @@ if () { jobstatus='T'; } -img.src=bweb_get_job_img(jobstatus, ); +img.src=bweb_get_job_img(jobstatus, , "B"); img.title=jobstatus[jobstatus]; a.appendChild(img); diff --git a/gui/bweb/lang/fr/tpl/display_job_zoom.tpl b/gui/bweb/lang/fr/tpl/display_job_zoom.tpl index 3985eafff0..6c7d212c15 100644 --- a/gui/bweb/lang/fr/tpl/display_job_zoom.tpl +++ b/gui/bweb/lang/fr/tpl/display_job_zoom.tpl @@ -96,7 +96,9 @@ var header = new Array("JobId", var data = new Array(); img = document.createElement("IMG"); -img.src=bweb_get_job_img("", ); +img.src=bweb_get_job_img("", + , + ''); img.title=jobstatus['']; data.push( new Array( diff --git a/gui/bweb/lang/fr/tpl/overview.tpl b/gui/bweb/lang/fr/tpl/overview.tpl index dd341de9bc..b9a9c3c194 100644 --- a/gui/bweb/lang/fr/tpl/overview.tpl +++ b/gui/bweb/lang/fr/tpl/overview.tpl @@ -97,7 +97,7 @@ function add_client(name, infos) // a=document.createElement("A"); // create a link to action=job // a.setAttribute('href', "?action=job;client_group=" + name); img=document.createElement("IMG"); - img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2])); + img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2], 'B')); img.setAttribute("title", infos[j][3]); // a.appendChild(img); td.appendChild(img); diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index b4e8561ca8..9c41e7c931 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -6,7 +6,7 @@ use strict; Bweb - A Bacula web interface Bacula® - The Network Backup Solution - Copyright (C) 2000-2007 Free Software Foundation Europe e.V. + Copyright (C) 2000-2009 Free Software Foundation Europe e.V. The main author of Bweb is Eric Bollengier. The main author of Bacula is Kern Sibbald, with contributions from @@ -2426,6 +2426,7 @@ SELECT Job.JobId AS jobid, JobFiles AS jobfiles, JobBytes AS jobbytes, JobStatus AS jobstatus, + Type AS jobtype, $self->{sql}->{SEC_TO_TIME}( $self->{sql}->{UNIX_TIMESTAMP}(EndTime) - $self->{sql}->{UNIX_TIMESTAMP}(StartTime)) AS duration, @@ -2477,6 +2478,7 @@ SELECT DISTINCT Job.JobId AS jobid, JobBytes AS jobbytes, JobStatus AS jobstatus, JobErrors AS joberrors, + Type AS jobtype, $self->{sql}->{SEC_TO_TIME}( $self->{sql}->{UNIX_TIMESTAMP}(EndTime) - $self->{sql}->{UNIX_TIMESTAMP}(StartTime)) AS duration @@ -2538,7 +2540,7 @@ FROM client_group $filter LEFT JOIN ( FROM Job JOIN client_group_member ON (Job.ClientId = client_group_member.ClientId) JOIN client_group USING (client_group_id) - WHERE JobStatus = 'T' + WHERE Type IN ('B', 'R') AND JobStatus = 'T' $where $limit ) AS jobok USING (client_group_name) LEFT JOIN @@ -2550,7 +2552,7 @@ FROM client_group $filter LEFT JOIN ( FROM Job JOIN client_group_member ON (Job.ClientId = client_group_member.ClientId) JOIN client_group USING (client_group_id) - WHERE JobStatus IN ('f','E', 'A') + WHERE Type IN ('B', 'R') AND JobStatus IN ('f','E', 'A') $where $limit ) AS joberr USING (client_group_name) diff --git a/gui/bweb/technotes-2.3 b/gui/bweb/technotes-2.3 deleted file mode 100644 index 5afe12481d..0000000000 --- a/gui/bweb/technotes-2.3 +++ /dev/null @@ -1,172 +0,0 @@ -10Dec08 -ebl Fix mysql bug in log output -07Nov08 -ebl Fix statistics page -ebl Add new "Cancel missing job" feature to be able - to mark missing job as failed in history table. -ebl Fix a couple of unchecked arguments. - -06Nov08 -ebl Fix a Bconsole.pm with Expect bug on debian lenny -ebl Fix in storage command - -04Nov08 -ebl Display all groups in display_stat page - -21Oct08 -ebl Fix lot of small bugs - -20Oct08 -ebl Rename job_old to JobHistory - -07Oct08 -ebl Add base64_decode_lstat() function to Mysql - -22Sep08 -ebl Add an option to bgraph that shows each levels as different source - -21Sep08 -ebl - bfileview: - - Add error message for pruned of uncomputed jobs - - Bugfix for looking / - Bweb.pm - - Add support for age=1w2d40m - - Add new configuration variable to modify default age - general.tpl - - Add hyperlink to failed job count - TODO: add C.png (with something like zzZZzzz) - -25Aug08 -ebl Fix #1132 about typo in directory creation in install_bweb - -02Jul08 -ebl Add documentation link on missing job view - -31Jun08 -ebl Fix log display in job zoom view - -22Jun08 -ebl Fix bug in missing job view - -20Jun08 -ebl Update check_bacula.pl documentation - -16Jun08 -ebl Take Recycle volumes from the import/export tool. - -03Jun08 -ebl Add a nagios plugin for bacula script/check_bacula.pl - -02Jun08 -ebl Modify missing job view to handle all kind of job - -28Apr08 -ebl Change We from 45 to 66 hours (from friday 18h to monday 12h) - -10Apr08 -ebl Fix group statistics to use client_group param - -03Apr08 -ebl Tweak progress bar and add Backuped files count to job status -ebl Remove progress bar from restore - -02Apr08 -ebl Add group statistics page - -10Mar08 -ebl Use lineal regression to guess backup progress (postgresql) - -09Mar08 -ebl Add progress bar to backup screen (files and bytes estimation) - -07Mar08 -ebl Fix btime.pl - -15Feb08 -ebl Add bcheck.pl script that check various things in - you bacula setup. - - Try to connect to each client - - Reports you big backup size change - - Reports you useless (or unconfigured) Job - -14Feb08 -ebl Cleanup some SQL - -13Feb08 -ebl Can modify client list group for a specific client -ebl Disable use of Enabled flag in volume mgnt -ebl Add comment field to client_group - -09Jan08 -ebl Adapt btime for bacula 2.2.7 - -05Jan08 -ebl Add basic Device managment (mount, umount, release, status) - -02Jan08 -ebl Fix a couple of bug in btime module -ebl Keep level param between overview pages - -31Dec07 -ebl Add new r_view_group role to view group content - -27Dec07 -ebl Fix a bug in user edition. -ebl Add Jobs -> Missing Job feature. Now, you can - check if jobs are missing or have to be re-run. -ebl Add begin/end param to Bweb::Sched object -ebl Fix a couple of small bug in GBalloon module when - we don't find any valid job - -23Dec07 -ebl Each user can have a different template dir (lang). -ebl WARNING: now, bweb/tpl contains main tpl files - for english version, you have to use bweb/lang/en/tpl - -21Dec07 -ebl Use main tpl for editing, and use scripts to - generate other lang. - -19Dec07 -ebl Add a new balloon graphic mode which display - time, bytes and number of files on the same graph - -13Dec07 -ebl Try to extract when= from get_form() more smoothly - -06Dec07 -ebl Add Bweb::Schedule Object to parse show schedule output. - Now, we can make ical events for example... - -05Dec07 -ebl Add truncate to second function -ebl Add btime module - -28Nov07 -ebl Fix the time slice between overview and overview_zoom - -26Nov07 -ebl Fix overview to works with mysql -ebl Add date support to bresto -ebl Make bresto works with mysql (no DISTINCT ON (c1,c2)) -ebl Add the list of media that will be needed for resto - -25Nov07 -ebl Use a automatic rediction when launching a new job -ebl Add new overview view. - -24Nov07 -ebl Add ERR= to error log filter -ebl Set where_field when selecting a directory in the tree -ebl Add a wiki option to integrate a link to jobs documentation - directly in bweb. -ebl Add a tpl field to bweb_user. (To be able to have a tpl for each - user). - -23Nov07 -ebl Add brestore_xxx tables to sql scripts -ebl Add a batch=1 option to bresto.pl to fill bresto tables -ebl Adapt Bconsole.pm to run a restore job -ebl Make bresto.html/js working (you can restore files now) -ebl Improve run job from scheduled view and missing view diff --git a/gui/bweb/technotes-3.0 b/gui/bweb/technotes-3.0 index 448022afbe..95702192de 100644 --- a/gui/bweb/technotes-3.0 +++ b/gui/bweb/technotes-3.0 @@ -1,3 +1,5 @@ +03Jan09 +ebl Use a special icon for Admin/Migration/Copy etc.. job 23Dec08 ebl Update final restore options box with tabpanel 18Dec08 diff --git a/gui/bweb/tpl/display_job.tpl b/gui/bweb/tpl/display_job.tpl index 87da20674a..ef0c25fa0e 100644 --- a/gui/bweb/tpl/display_job.tpl +++ b/gui/bweb/tpl/display_job.tpl @@ -32,7 +32,9 @@ a = document.createElement('A'); a.href='?action=job_zoom;jobid='; img = document.createElement("IMG"); -img.src=bweb_get_job_img("", ); +img.src=bweb_get_job_img("", + , + ""); img.title=jobstatus['']; a.appendChild(img); diff --git a/gui/bweb/tpl/display_job_group.tpl b/gui/bweb/tpl/display_job_group.tpl index 35c4737047..2119d8f4d3 100644 --- a/gui/bweb/tpl/display_job_group.tpl +++ b/gui/bweb/tpl/display_job_group.tpl @@ -38,7 +38,7 @@ if () { jobstatus='T'; } -img.src=bweb_get_job_img(jobstatus, ); +img.src=bweb_get_job_img(jobstatus, , "B"); img.title=jobstatus[jobstatus]; a.appendChild(img); diff --git a/gui/bweb/tpl/display_job_zoom.tpl b/gui/bweb/tpl/display_job_zoom.tpl index 9f5fdbcf67..69ec1f9b8a 100644 --- a/gui/bweb/tpl/display_job_zoom.tpl +++ b/gui/bweb/tpl/display_job_zoom.tpl @@ -96,7 +96,9 @@ var header = new Array("JobId", var data = new Array(); img = document.createElement("IMG"); -img.src=bweb_get_job_img("", ); +img.src=bweb_get_job_img("", + , + ''); img.title=jobstatus['']; data.push( new Array( diff --git a/gui/bweb/tpl/overview.tpl b/gui/bweb/tpl/overview.tpl index 89febbc4e7..9895cca38e 100644 --- a/gui/bweb/tpl/overview.tpl +++ b/gui/bweb/tpl/overview.tpl @@ -97,7 +97,7 @@ function add_client(name, infos) // a=document.createElement("A"); // create a link to action=job // a.setAttribute('href', "?action=job;client_group=" + name); img=document.createElement("IMG"); - img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2])); + img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2], 'B')); img.setAttribute("title", infos[j][3]); // a.appendChild(img); td.appendChild(img);