From: Kern Sibbald Date: Sat, 3 Mar 2007 09:20:25 +0000 (+0000) Subject: Merge trunk into branch-2.0 gui/bweb X-Git-Tag: Release-2.0.3~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eadbd31d0aca860464d780a48e20e1543a30b1fa;p=bacula%2Fbacula Merge trunk into branch-2.0 gui/bweb git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.0@4299 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/INSTALL b/gui/bweb/INSTALL index bdc2dcaec7..4ef27bc559 100644 --- a/gui/bweb/INSTALL +++ b/gui/bweb/INSTALL @@ -4,9 +4,9 @@ Bweb works well with 1.39 release or later. -1) install perl lib +1) install Perl lib 2) copy your files -3) intialise your configuration file +3) initialize your configuration file 4) do some sql stuff (for postgresql users) 5) use the -n option on bconsole so that it works with Expect 6) get bacula log more useful @@ -14,16 +14,26 @@ Bweb works well with 1.39 release or later. 8) using sudo with autochanger 9) using bfileview.pl 10) accessing to bweb +11) setting mysql read-only account +12) get more statistics ################ FILE COPY ##################################### - # you must get bweb cvs files - cvs -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula login - cvs -z3 -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula co -P gui - cd gui + # you must get bweb svn files + svn checkout https://bacula.svn.sourceforge.net/svnroot/bacula/trunk/gui/bweb bweb # or get them from the released tar files or from the apt or rpms. - # first, copy the bweb perl library into your PERL5 INC path + # + # Once you have the gui directory loaded, follow the instructions below + # or edit the environment variables in the file install_bweb + # then execute it. install_web does everything to the next + # set of #######'s. + # + + # first, copy the bweb Perl library into your PERL5 INC path + perl Makefile.PL + make install + # or install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5 # copy the bweb perl program to your cgi location @@ -42,11 +52,11 @@ Bweb works well with 1.39 release or later. # copy the bweb graphics elements (bweb elements must reside in /bweb) mkdir /var/www/bweb - install -m 644 -o root -g root bweb/html/*.{js,png,css,gif,ico} /var/www/bweb + install -m 644 -o root -g root bweb/html/*.{js,png,css,gif,ico,html} /var/www/bweb # done ! - WARNING : Your www-data user must be able to execute bconsole and able + WARNING : Your www-data (or wwwrun on SuSE) user must be able to execute bconsole and able to read the bconsole.conf file! You can create an bconsole group for that. @@ -58,8 +68,8 @@ Simply use lang/fr/tpl/*.tpl files instead of tpl/*.tpl - perl modules - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql) - - Gd::Graph - - Gd + - GD::Graph + - GD - HTML::Template - CGI - Expect @@ -73,9 +83,31 @@ Simply use lang/fr/tpl/*.tpl files instead of tpl/*.tpl apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl apt-get install libdbd-mysql-perl libdbd-pg-perl libdbi-perl libtime-modules-perl + Note: the best way to test if you have all the dependencies + fullfilled for Perl is to: + + cd /var/www/cgi-bin/bweb + ./bweb.pl + + you might also want to try: + + ./bgraph.pl + + To make sure the graphing modules are loaded. However, running it + will spray binary graphics data on your terminal. Otherwise, you will + get an error. + + That should show you if any of the pre-requisites are missing. + On SuSE 10.2, I was able to load all the appropriate modules via rpms, + with the exception of Expect and Time::ParseDate, which I loaded manually + using perl. + + If you experience problems, always consult the Apache error_log + file. + ################ APACHE CONFIGURATION ########################## -It could be a good idea to protect your bweb installation. +It could be a good idea to protect your bweb installation (optional). Put this in your httpd.conf, and add user with htpasswd @@ -88,9 +120,21 @@ Put this in your httpd.conf, and add user with htpasswd Require valid-user +On SuSE 10.2, the following in /etc/apache2/default-server.conf works. +However, it is not secure: + +Directory "/srv/www/cgi-bin/bweb"> + AllowOverride None + Options +ExecCGI -Includes + Order allow,deny + Allow from all + + ################ CONFIGURATION ################################# +Note, this is automatically installed by the install_bweb script. + /etc/bacula/bweb.conf looks like : (you can edit it inside bweb) $VAR1 = bless( { 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf', @@ -133,23 +177,35 @@ $VAR1 = bless( { ################ BRESTORE ###################################### If you want to use brestore with bweb, you must associate a mime type -text/brestore with your brestore.pl. +text/brestore with your brestore.pl, and you must install brestore. +See gui/brestore/README for instructions on installing brestore.pl. ################ POSTGRESQL NOTES ############################## If you want to use PostgreSQL instead of MySQL, you must add a function to the PostgreSQL Bacula database to get Bweb to work. -psql -u bacula bacula < script/bweb-postgresql.sql +psql -U bacula bacula < script/bweb-postgresql.sql + +Tips: PL must be enable in your cluster, you can do this with postgres user +postgres:~$ echo 'CREATE PROCEDURAL LANGUAGE plpgsql;' | psql bacula ################ BCONSOLE NOTES ################################ You must use bconsole without conio/readline support. For that, use -the bconsole -n option. +the bconsole -n option. This is done automatically with the standard +configuration file. In addition, please ensure that the binary +bconsole file can be executed by your web server. It is normally +located in /usr/bin/bconsole (or some such file), and must have +modes 755 or it will not be executable by your web server. The +normal Bacula installation usually sets mode 750. ################ BACULA LOG #################################### -To use Bweb log engine you MUST use catalog message type. +If you want Bweb to be able to show listings of the Job output, +you must add a "catalog = all, !skipped, !saved" to your +messages resource in bacula-dir.conf and restart your Bacula +server. This is shown below: Messages { Name = Standard @@ -196,7 +252,7 @@ chown www-data /var/spool/bweb You have to remove "" from tpl/display_job_zoom.tpl. -You must use brestore.pl -b to initialise the database, and +You must use brestore.pl -b to initialize the database, and you can use bfileview.pl mode=batch jobid=xxx where=/ to compute tree size. At this time, it's a good idea to schedule brestore.pl -b after your @@ -216,9 +272,42 @@ To upgrade from an old installation, you can use : ALTER TABLE brestore_pathvisibility ADD Size int8; ALTER TABLE brestore_pathvisibility ADD Files int4; -################ ACCESSING TO BWEB ############################### +################ ACCESSING TO BWEB ############################ Now, you are able to launch firefox/mozilla and go on http://your-server/bweb +################ SETTING MYSQL ACCOUNT ######################## + +At this time, Bweb needs a write access to : +- Location +- LocationLog +- Media::LocationId +- Media::Comment +- Media::RecyclePoolId (it will change soon) + +If your doesn't use Location feature, you can use ReadOnly access +for all tables, or setup something like : + +GRANT SELECT ON bacula.* TO 'bweb'@'%' IDENTIFIED BY 'password'; +GRANT INSERT,UPDATE,DELETE ON bacula.Location + TO 'bweb'@'%' IDENTIFIED BY 'password'; +GRANT INSERT,UPDATE,DELETE ON bacula.LocationLog + TO 'bweb'@'%' IDENTIFIED BY 'password'; +GRANT UPDATE (LocationId,Comment,RecyclePoolId) ON bacula.Media + TO 'bweb'@'%' IDENTIFIED BY 'password'; + +################ GET MORE STATISTICS ########################### + +You keep Jobs informations across retention into a job_old table. +You have to setup stat_job_table = job_old in bweb configuration. + +CREATE TABLE job_old (LIKE Job); + +And run this on crontab when you want : +INSERT INTO job_old + (SELECT * FROM Job WHERE JobId NOT IN (SELECT JobId FROM job_old) ); + +################################################################ + Enjoy ! diff --git a/gui/bweb/ReleaseNotes b/gui/bweb/ReleaseNotes index 760b550353..c334dfbda5 100644 --- a/gui/bweb/ReleaseNotes +++ b/gui/bweb/ReleaseNotes @@ -1,5 +1,33 @@ Release Notes for bweb 2.0 +2007/03/01 + - Add display_time_log option to get timestamp in display_log + - Add Warning filter on display_job (see jobstatus=T and joberrors > 0) + +2007/02/28 + - Add limit and offset params to display_log + +2007/02/25 + - Update INSTALL notes (GRANT options for mysql) + - You can choose a other table than Job to do your statistics + Job is purged by Media or Job retention, it's not very useful + to follow trends. + +2007/02/14 + - Add EndTime to display_job if you want add it to your tpl + +2007/01/25 + - Add spanish translation, thanks to Santiago Alberch + +2007/01/15 + - fix do_update_media timeout bug + +2007/01/09 + - fix stats bug on main page + +2007/01/01 + - Add an index.html page on /bweb + 2006/12/31 - Move /etc/bweb/config to /etc/bacula/bweb.conf diff --git a/gui/bweb/cgi/bfileview.pl b/gui/bweb/cgi/bfileview.pl index 6092af2058..4feb1d3166 100755 --- a/gui/bweb/cgi/bfileview.pl +++ b/gui/bweb/cgi/bfileview.pl @@ -79,8 +79,9 @@ unless ($where and $jobid) { exit 0; } -unless (-w $base_fich) { - $bweb->error("$base_fich is not writable"); +unless ($base_fich and -w $base_fich) { + $bweb->error("fv_write_path ($base_fich) is not writable." . + " See Bweb configuration."); exit 0; } diff --git a/gui/bweb/cgi/bgraph.pl b/gui/bweb/cgi/bgraph.pl index 2e13cf57cf..2f1af39f2f 100755 --- a/gui/bweb/cgi/bgraph.pl +++ b/gui/bweb/cgi/bgraph.pl @@ -4,7 +4,7 @@ use strict; =head1 LICENSE Bweb - A Bacula web interface - Bacula® - The Network Backup Solution + Bacula® - The Network Backup Solution Copyright (C) 2000-2006 Free Software Foundation Europe e.V. @@ -27,7 +27,7 @@ use strict; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Bacula® is a registered trademark of John Walker. + Bacula® is a registered trademark of John Walker. The licensor of Bacula is the Free Software Foundation Europe (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zurich, Switzerland, email:ftf@fsfeurope.org. @@ -44,36 +44,43 @@ use Data::Dumper; use CGI; use POSIX qw/strftime/; +use File::Basename qw/basename dirname/; my $conf = new Bweb::Config(config_file => $Bweb::config_file); $conf->load(); - my $bweb = new Bweb(info => $conf); $bweb->connect_db(); my $dbh = $bweb->{dbh}; my $debug = $bweb->{debug}; +# Job table keep use Media or Job retention, so it's quite enought +# for good statistics +# CREATE TABLE job_old (LIKE Job); +# INSERT INTO job_old +# (SELECT * FROM Job WHERE JobId NOT IN (SELECT JobId FROM job_old) ); +my $jobt = $conf->{stat_job_table} || 'Job'; + my $graph = CGI::param('graph') || 'job_size'; my $legend = CGI::param('legend') || 'on' ; $legend = ($legend eq 'on')?1:0; -my $arg = $bweb->get_form(qw/width height limit offset age +my $arg = $bweb->get_form(qw/width height limit offset age where jobid jfilesets level status jjobnames jclients/); my ($limitq, $label) = $bweb->get_limit(age => $arg->{age}, limit => $arg->{limit}, offset=> $arg->{offset}, - order => 'Job.StartTime ASC', + order => "$jobt.StartTime ASC", ); my $statusq=''; if ($arg->{status} and $arg->{status} ne 'Any') { - $statusq = " AND Job.JobStatus = '$arg->{status}' "; + $statusq = " AND $jobt.JobStatus = '$arg->{status}' "; } my $levelq=''; if ($arg->{level} and $arg->{level} ne 'Any') { - $levelq = " AND Job.Level = '$arg->{level}' "; + $levelq = " AND $jobt.Level = '$arg->{level}' "; } my $filesetq=''; @@ -83,7 +90,7 @@ if ($arg->{jfilesets}) { my $jobnameq=''; if ($arg->{jjobnames}) { - $jobnameq = " AND Job.Name IN ($arg->{jjobnames}) "; + $jobnameq = " AND $jobt.Name IN ($arg->{jjobnames}) "; } else { $arg->{jjobnames} = 'all'; # skip warning } @@ -186,14 +193,14 @@ if ($graph eq 'job_size') { my $query = " SELECT - UNIX_TIMESTAMP(Job.StartTime) AS starttime, + UNIX_TIMESTAMP($jobt.StartTime) AS starttime, Client.Name AS clientname, - Job.Name AS jobname, - Job.JobBytes AS jobbytes -FROM Job, Client, FileSet -WHERE Job.ClientId = Client.ClientId - AND Job.FileSetId = FileSet.FileSetId - AND Job.Type = 'B' + $jobt.Name AS jobname, + $jobt.JobBytes AS jobbytes +FROM $jobt, Client, FileSet +WHERE $jobt.ClientId = Client.ClientId + AND $jobt.FileSetId = FileSet.FileSetId + AND $jobt.Type = 'B' $clientq $statusq $filesetq @@ -223,14 +230,60 @@ if ($graph eq 'job_file') { my $query = " SELECT - UNIX_TIMESTAMP(Job.StartTime) AS starttime, + UNIX_TIMESTAMP($jobt.StartTime) AS starttime, Client.Name AS clientname, + $jobt.Name AS jobname, + $jobt.JobFiles AS jobfiles +FROM $jobt, Client, FileSet +WHERE $jobt.ClientId = Client.ClientId + AND $jobt.FileSetId = FileSet.FileSetId + AND $jobt.Type = 'B' + $clientq + $statusq + $filesetq + $levelq + $jobnameq +$limitq +"; + + print STDERR $query if ($debug); + + my $obj = get_graph('title' => "Job Files : $arg->{jclients}/$arg->{jjobnames}", + 'y_label' => 'Number Files', + 'y_min_value' => 0, + ); + + my $all = $dbh->selectall_arrayref($query) ; + + my ($d, $ret) = make_tab($all); + if ($legend) { + $obj->set_legend(keys %$ret); + } + print $obj->plot([$d, values %$ret])->png; +} + +# it works only with postgresql at this time +# we dont use $jobt because we use File, so job is in Job table +elsif ($graph eq 'file_histo' and $arg->{where}) { + + my $dir = $dbh->quote(dirname($arg->{where}) . '/'); + my $file = $dbh->quote(basename($arg->{where})); + + my $query = " +SELECT UNIX_TIMESTAMP(Job.StartTime) AS starttime, + Client.Name AS client, Job.Name AS jobname, - Job.JobFiles AS jobfiles -FROM Job, Client, FileSet + base64_decode_lstat(8,LStat) AS lstat + +FROM Job, Client, FileSet, Filename, Path, File WHERE Job.ClientId = Client.ClientId AND Job.FileSetId = FileSet.FileSetId AND Job.Type = 'B' + AND File.JobId = Job.JobId + AND File.FilenameId = Filename.FilenameId + AND File.PathId = Path.PathId + AND Path.Path = $dir + AND Filename.Name = $file $clientq $statusq $filesetq @@ -241,13 +294,64 @@ $limitq print STDERR $query if ($debug); - my $obj = get_graph('title' => "Job Files : $arg->{jclients}/$arg->{jjobnames}", - 'y_label' => 'Number Files', + my $all = $dbh->selectall_arrayref($query) ; + + my $obj = get_graph('title' => "File size : $arg->{where}", + 'y_label' => 'File size', + 'y_min_value' => 0, 'y_min_value' => 0, + 'y_number_format' => \&Bweb::human_size, ); + + my ($d, $ret) = make_tab($all); + if ($legend) { + $obj->set_legend(keys %$ret); + } + print $obj->plot([$d, values %$ret])->png; +} + +# it works only with postgresql at this time +# TODO: use brestore_missing_path +elsif ($graph eq 'rep_histo' and $arg->{where}) { + + my $dir = $arg->{where}; + $dir .= '/' if ($dir !~ m!/$!); + $dir = $dbh->quote($dir); + + my $query = " +SELECT UNIX_TIMESTAMP(Job.StartTime) AS starttime, + Client.Name AS client, + Job.Name AS jobname, + brestore_pathvisibility.size AS size + +FROM Job, Client, FileSet, Path, brestore_pathvisibility +WHERE Job.ClientId = Client.ClientId + AND Job.FileSetId = FileSet.FileSetId + AND Job.Type = 'B' + AND Job.JobId = brestore_pathvisibility.JobId + AND Path.PathId = brestore_pathvisibility.PathId + AND Path.Path = $dir + $clientq + $statusq + $filesetq + $levelq + $jobnameq +$limitq +"; + + print STDERR $query if ($debug); + my $all = $dbh->selectall_arrayref($query) ; + my $obj = get_graph('title' => "Directory size : $arg->{where}", + 'y_label' => 'Directory size', + 'y_min_value' => 0, + 'y_min_value' => 0, + 'y_number_format' => \&Bweb::human_size, + ); + + my ($d, $ret) = make_tab($all); if ($legend) { $obj->set_legend(keys %$ret); @@ -259,19 +363,19 @@ elsif ($graph eq 'job_rate') { my $query = " SELECT - UNIX_TIMESTAMP(Job.StartTime) AS starttime, + UNIX_TIMESTAMP($jobt.StartTime) AS starttime, Client.Name AS clientname, - Job.Name AS jobname, - Job.JobBytes / + $jobt.Name AS jobname, + $jobt.JobBytes / ($bweb->{sql}->{SEC_TO_INT}( $bweb->{sql}->{UNIX_TIMESTAMP}(EndTime) - $bweb->{sql}->{UNIX_TIMESTAMP}(StartTime)) + 0.01) AS rate -FROM Job, Client, FileSet -WHERE Job.ClientId = Client.ClientId - AND Job.FileSetId = FileSet.FileSetId - AND Job.Type = 'B' +FROM $jobt, Client, FileSet +WHERE $jobt.ClientId = Client.ClientId + AND $jobt.FileSetId = FileSet.FileSetId + AND $jobt.Type = 'B' $clientq $statusq $filesetq @@ -303,16 +407,16 @@ elsif ($graph eq 'job_duration') { my $query = " SELECT - UNIX_TIMESTAMP(Job.StartTime) AS starttime, + UNIX_TIMESTAMP($jobt.StartTime) AS starttime, Client.Name AS clientname, - Job.Name AS jobname, + $jobt.Name AS jobname, $bweb->{sql}->{SEC_TO_INT}( $bweb->{sql}->{UNIX_TIMESTAMP}(EndTime) - $bweb->{sql}->{UNIX_TIMESTAMP}(StartTime)) AS duration -FROM Job, Client, FileSet -WHERE Job.ClientId = Client.ClientId - AND Job.FileSetId = FileSet.FileSetId - AND Job.Type = 'B' +FROM $jobt, Client, FileSet +WHERE $jobt.ClientId = Client.ClientId + AND $jobt.FileSetId = FileSet.FileSetId + AND $jobt.Type = 'B' $clientq $statusq $filesetq @@ -360,15 +464,18 @@ $limitq if ($t eq 'sum' or $t eq 'avg') { push @arg, ('y_number_format' => \&Bweb::human_size); } + + my $stime = $bweb->{sql}->{"STARTTIME_$d"}; + $stime =~ s/Job\./$jobt\./; my $query = " SELECT - " . ($per_t?"":"UNIX_TIMESTAMP") . "(" . $bweb->{sql}->{"STARTTIME_$d"} . ") AS A, + " . ($per_t?"":"UNIX_TIMESTAMP") . "($stime) AS A, $t(JobBytes) AS nb -FROM Job, Client, FileSet -WHERE Job.ClientId = Client.ClientId - AND Job.FileSetId = FileSet.FileSetId - AND Job.Type = 'B' +FROM $jobt, Client, FileSet +WHERE $jobt.ClientId = Client.ClientId + AND $jobt.FileSetId = FileSet.FileSetId + AND $jobt.Type = 'B' $clientq $statusq $filesetq diff --git a/gui/bweb/cgi/bweb.pl b/gui/bweb/cgi/bweb.pl index d4a8cf573a..6b3dd7d10a 100755 --- a/gui/bweb/cgi/bweb.pl +++ b/gui/bweb/cgi/bweb.pl @@ -220,8 +220,15 @@ if ($action eq 'begin') { # main display $bweb->help_extern_compute(); } elsif ($action eq 'extern') { - $bweb->eject_media(); + print "
"; + my @achs = $bweb->eject_media(); + for my $ach (@achs) { + CGI::param('ach', $ach); + $bweb->update_slots(); + } + print "
"; $bweb->move_media(); + print "
"; } elsif ($action eq 'move_email') { $bweb->move_email(); diff --git a/gui/bweb/html/bweb.js b/gui/bweb/html/bweb.js index 774347438f..72b50e8f0e 100644 --- a/gui/bweb/html/bweb.js +++ b/gui/bweb/html/bweb.js @@ -1,19 +1,31 @@ -// Copyright (C) 2006 Eric Bollengier -// All rights reserved. +// Bweb - A Bacula web interface +// Bacula® - The Network Backup Solution // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// any later version. +// Copyright (C) 2000-2006 Free Software Foundation Europe e.V. // -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// The main author of Bweb is Eric Bollengier. +// The main author of Bacula is Kern Sibbald, with contributions from +// many others, a complete list can be found in the file AUTHORS. +// +// This program is Free Software; you can redistribute it and/or +// modify it under the terms of version two of the GNU General Public +// License as published by the Free Software Foundation plus additions +// that are listed in the file LICENSE. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301, USA. +// +// Bacula® is a registered trademark of John Walker. +// The licensor of Bacula is the Free Software Foundation Europe +// (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zurich, +// Switzerland, email:ftf@fsfeurope.org. var even_cell_color = "#FFFFFF"; var odd_cell_color = "#EEEEEE"; diff --git a/gui/bweb/lang/es/tpl/about.tpl b/gui/bweb/lang/es/tpl/about.tpl new file mode 100644 index 0000000000..01d944bcf6 --- /dev/null +++ b/gui/bweb/lang/es/tpl/about.tpl @@ -0,0 +1,39 @@ +
+
+

Acerca

+
+
+
+   Bweb - A Bacula web interface
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2000-2006 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
+   many others, a complete list can be found in the file AUTHORS.
+
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zurich,
+   Switzerland, email:ftf@fsfeurope.org.
+
+   nrsTable Copyright 2005 New Roads School (GPL)
+   kaiska css Copyright Willy Morin (BWL)
+
+
diff --git a/gui/bweb/lang/es/tpl/ach_add.tpl b/gui/bweb/lang/es/tpl/ach_add.tpl new file mode 100644 index 0000000000..ddf03a2645 --- /dev/null +++ b/gui/bweb/lang/es/tpl/ach_add.tpl @@ -0,0 +1,72 @@ +
+
+

Nueva Autochanger

+
+
+ Tiene que crear una Ubicación, la cual deberá tener el mismo nombre.

+ +
+ + + + + + + + + + + + + + + + + + + + +
Nombre : + +
Pre-comando : +
Comando mtx : +
Device : +
Drives
+ index +
+ +
+
+ + diff --git a/gui/bweb/lang/es/tpl/ach_content.tpl b/gui/bweb/lang/es/tpl/ach_content.tpl new file mode 100644 index 0000000000..63e61f5233 --- /dev/null +++ b/gui/bweb/lang/es/tpl/ach_content.tpl @@ -0,0 +1,161 @@ +
+
+

+Autochanger : ( Drives + IMPORT/EXPORT)

+
+
+
+ + + Debe ejecutar el comando update slot, El estado del Autochanger es diferente al de las slots de bacula +
+
+ + + + +
+
+ Tools +
+
+ + + + + + +

+ + + +
+
+ + Drives:
+

+
+ Contenido:
+
+
+
+ + diff --git a/gui/bweb/lang/es/tpl/begin.tpl b/gui/bweb/lang/es/tpl/begin.tpl new file mode 100644 index 0000000000..2c63817a60 --- /dev/null +++ b/gui/bweb/lang/es/tpl/begin.tpl @@ -0,0 +1,66 @@ + + + +Bweb - Bacula Web Interface + + + + + + + + + + + + + + +
+ + + +
+ +
+
diff --git a/gui/bweb/lang/es/tpl/change_location.tpl b/gui/bweb/lang/es/tpl/change_location.tpl new file mode 100644 index 0000000000..496c61ab06 --- /dev/null +++ b/gui/bweb/lang/es/tpl/change_location.tpl @@ -0,0 +1,37 @@ +
+
+

+ Mover medio +

+
+
+ +
+ + + + + + + +
Para:
Asunto:
+ +
+ +
+
+update nowActualizar Ahora +
diff --git a/gui/bweb/lang/es/tpl/client_job_status.tpl b/gui/bweb/lang/es/tpl/client_job_status.tpl new file mode 100644 index 0000000000..ecd64e164c --- /dev/null +++ b/gui/bweb/lang/es/tpl/client_job_status.tpl @@ -0,0 +1,40 @@ +
+
+

+ Job ejecutándose en +

+
+
+ + + + + + + + + + + + + + + + +
Nombre Job: () +
Archivo en proceso:
Velocidad: B/s
Archivos Examinados:
Bytes:
+
+  + + +  +
+
+ + + diff --git a/gui/bweb/lang/es/tpl/client_list.tpl b/gui/bweb/lang/es/tpl/client_list.tpl new file mode 100644 index 0000000000..b200cf915a --- /dev/null +++ b/gui/bweb/lang/es/tpl/client_list.tpl @@ -0,0 +1,70 @@ +
+
+

Clientes

+
+
+
+
+
+ Acciones   +
+
+ +   +   +   +   + +
+ +
+
+ + diff --git a/gui/bweb/lang/es/tpl/command.tpl b/gui/bweb/lang/es/tpl/command.tpl new file mode 100644 index 0000000000..ce9a9065ca --- /dev/null +++ b/gui/bweb/lang/es/tpl/command.tpl @@ -0,0 +1,9 @@ +
+
+

:

+
+
+
+
+  
+
diff --git a/gui/bweb/lang/es/tpl/config_edit.tpl b/gui/bweb/lang/es/tpl/config_edit.tpl new file mode 100644 index 0000000000..3c9b6900be --- /dev/null +++ b/gui/bweb/lang/es/tpl/config_edit.tpl @@ -0,0 +1,55 @@ +
+
+

Configuración

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SQL Connection
DBI : + +
Usuario : +
Clave : +
Opciones Generales
email_media : +
Configuración Bweb
graph_font : +
template_dir : +
fv_write_path : +
stat_job_table : +
bconsole : +
display_log_time : checked='checked' value='on' > +
debug : checked='checked' value='on' > +
+ +
+
diff --git a/gui/bweb/lang/es/tpl/config_view.tpl b/gui/bweb/lang/es/tpl/config_view.tpl new file mode 100644 index 0000000000..7380b743d8 --- /dev/null +++ b/gui/bweb/lang/es/tpl/config_view.tpl @@ -0,0 +1,64 @@ +
+
+

Configuración

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Conexión SQL
DBI :
Ususario :
Clave : xxxxx
Opciones Generales
email_media :
Configuración Bweb
config_file :
template_dir :
graph_font :
fv_write_path :
stat_job_table : Job
bconsole :
display_log_time :
debug :
Libreria
+
+ + + + + + +
+ +
+
+ + + + + +

+ +
+ + +
+ + + info :
+
+
diff --git a/gui/bweb/lang/es/tpl/display_client_job.tpl b/gui/bweb/lang/es/tpl/display_client_job.tpl new file mode 100644 index 0000000000..ba62845fd3 --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_client_job.tpl @@ -0,0 +1,65 @@ +
+
+

ültimos jobs de () +

+
+
+ +
+ + + backup size + + + backup duration + + + backup rate + +
+ + + diff --git a/gui/bweb/lang/es/tpl/display_client_stats.tpl b/gui/bweb/lang/es/tpl/display_client_stats.tpl new file mode 100644 index 0000000000..da4f445416 --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_client_stats.tpl @@ -0,0 +1,59 @@ +
+
+

Cliente : ()

+
+
+
+ Not enough data   + Not enough data   + Not enough data   + +
+
+ + diff --git a/gui/bweb/lang/es/tpl/display_form_job.tpl b/gui/bweb/lang/es/tpl/display_form_job.tpl new file mode 100644 index 0000000000..acc13b76f9 --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_form_job.tpl @@ -0,0 +1,127 @@ +
+
+ Filter   +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+

Nivel

+ +
+

Estado

+ +
+

Pool

+ +
+

Tiempo

+ +
+

Number of items

+ +
+

Tipo Job

+ +
+

Clientes

+ +
+ + +
+
+ + diff --git a/gui/bweb/lang/es/tpl/display_form_media.tpl b/gui/bweb/lang/es/tpl/display_form_media.tpl new file mode 100644 index 0000000000..fccaa3102c --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_form_media.tpl @@ -0,0 +1,91 @@ +
+ Filter   +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+

Tipo Medio

+ +
+

Ubicación

+ +
+

Estado

+ +
+

Pool

+ +
+

Nombre

+ value= + class='formulaire' size='8'> +
+

Number of items

+ +
+ + +
+
+ + diff --git a/gui/bweb/lang/es/tpl/display_job.tpl b/gui/bweb/lang/es/tpl/display_job.tpl new file mode 100644 index 0000000000..73d97abd30 --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_job.tpl @@ -0,0 +1,81 @@ +
+

Últimos Jobs ()

+
+
+
+
+ + diff --git a/gui/bweb/lang/es/tpl/display_job_zoom.tpl b/gui/bweb/lang/es/tpl/display_job_zoom.tpl new file mode 100644 index 0000000000..fd9f86bb6a --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_job_zoom.tpl @@ -0,0 +1,129 @@ +
+

Información acerca jobs

+
+
+
+ + + + + + + +
+
+ + +
+
+
+ + + + +
+
+
+ + +
+
+
+ + + + +
+
+
+ + +
+
+
+ + + +
+
+
+ + diff --git a/gui/bweb/lang/es/tpl/display_location.tpl b/gui/bweb/lang/es/tpl/display_location.tpl new file mode 100644 index 0000000000..14c1d2f903 --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_location.tpl @@ -0,0 +1,66 @@ +
+
+

Ubicaciones

+
+
+
+
+   +   +   + + +
+
+ + diff --git a/gui/bweb/lang/es/tpl/display_log.tpl b/gui/bweb/lang/es/tpl/display_log.tpl new file mode 100644 index 0000000000..f71f2098c9 --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_log.tpl @@ -0,0 +1,9 @@ +
+
+

Log : en ()

+
+
+
+
+  
+
diff --git a/gui/bweb/lang/es/tpl/display_media.tpl b/gui/bweb/lang/es/tpl/display_media.tpl new file mode 100644 index 0000000000..f803c6e3b7 --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_media.tpl @@ -0,0 +1,91 @@ +
+

+ Medios +

+
+
+ + +

+Pool : + + +

+
+ +

+Location : +

+
+ +
+
+   +   +   +   + + +
+
+ + diff --git a/gui/bweb/lang/es/tpl/display_media_zoom.tpl b/gui/bweb/lang/es/tpl/display_media_zoom.tpl new file mode 100644 index 0000000000..6f7b564f4c --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_media_zoom.tpl @@ -0,0 +1,163 @@ + + + +
+
+

Medium :

+
+
+ Medium Infos
+
+ Medium Stats
+
+ Job List
+
+ Actions
+
+ +  +   + +   + +   +   +   + + + +
+
+
+ diff --git a/gui/bweb/lang/es/tpl/display_pool.tpl b/gui/bweb/lang/es/tpl/display_pool.tpl new file mode 100644 index 0000000000..e1d3fd74e2 --- /dev/null +++ b/gui/bweb/lang/es/tpl/display_pool.tpl @@ -0,0 +1,88 @@ +
+
+

Pools

+
+
+
+
+ + + > + +
+
+ Nota: Para modificar las propiedades de un pool, se debe editar la configuración de Bacula + y aplicar el comando "reload", Luego se debe ejecutar "update pool=mypool" con la bconsole. +
+ + diff --git a/gui/bweb/lang/es/tpl/end.tpl b/gui/bweb/lang/es/tpl/end.tpl new file mode 100644 index 0000000000..072a52b2bb --- /dev/null +++ b/gui/bweb/lang/es/tpl/end.tpl @@ -0,0 +1,5 @@ +
+
+
+ + diff --git a/gui/bweb/lang/es/tpl/error.tpl b/gui/bweb/lang/es/tpl/error.tpl new file mode 100644 index 0000000000..56ea6973e7 --- /dev/null +++ b/gui/bweb/lang/es/tpl/error.tpl @@ -0,0 +1,4 @@ +

Un error ha ocurrido :

+
+
+
diff --git a/gui/bweb/lang/es/tpl/fileset_view.tpl b/gui/bweb/lang/es/tpl/fileset_view.tpl new file mode 100644 index 0000000000..17d666b0fd --- /dev/null +++ b/gui/bweb/lang/es/tpl/fileset_view.tpl @@ -0,0 +1,20 @@ +
+

+ FileSet +

+
+
+ + included Incluido : +
+
+
+ + excluded Excluido : +
+
+
+ +Nota: Cuidado, este es el fileset actual, puede haber cambiado... + +
diff --git a/gui/bweb/lang/es/tpl/fv_file_attribs.tpl b/gui/bweb/lang/es/tpl/fv_file_attribs.tpl new file mode 100644 index 0000000000..613c854c6f --- /dev/null +++ b/gui/bweb/lang/es/tpl/fv_file_attribs.tpl @@ -0,0 +1,12 @@ +
+

Información acerca

+
+
+ + + + + + +
size :
ctime :
mtime :
atime :
md5 :
+
diff --git a/gui/bweb/lang/es/tpl/general.tpl b/gui/bweb/lang/es/tpl/general.tpl new file mode 100644 index 0000000000..f8da969e54 --- /dev/null +++ b/gui/bweb/lang/es/tpl/general.tpl @@ -0,0 +1,30 @@ + + +
+

+ Informaciones +

+
+
+ + + + + + + + + + + + + + + + +
Cantidad Clientes: Bytes Almacenados: Cantidad Medios:
Tamaño Base de Datos: Cantidad Pools: Cantidad Jobs:
Jobs fallados (): class='joberr' > + +
+
diff --git a/gui/bweb/lang/es/tpl/graph.tpl b/gui/bweb/lang/es/tpl/graph.tpl new file mode 100644 index 0000000000..7683901351 --- /dev/null +++ b/gui/bweb/lang/es/tpl/graph.tpl @@ -0,0 +1,172 @@ +
+
+

Estadísticas

+
+
+ + + +
+
+
+ Options   +
+
+ + + + + + + + + + + + + + + + + + + + +
+

Nivel

+ +
+

Estado

+ +
+

Tiempo

+ +
+

Tamaño

+ Ancho:  
+ Alto:
+
+

Clients

+ +
+

Nombre Job

+ +

Tipo

+ +
+

Número de items

+ +

Tipo de Gráfico

+
+ + +
+
+ +
+
+ +
+ Current   +
+
+ Nothing to display, Try a bigger date range +
+ +
+
+ + diff --git a/gui/bweb/lang/es/tpl/help_extern.tpl b/gui/bweb/lang/es/tpl/help_extern.tpl new file mode 100644 index 0000000000..d46cdaa669 --- /dev/null +++ b/gui/bweb/lang/es/tpl/help_extern.tpl @@ -0,0 +1,45 @@ +
+
+

Ayuda para expulsar medios (part 1/2)

+
+
+Se seleccionará el mejor candidato para expulsar. Se le pedirá +realizar su selección en la próxima pantalla. +
+ + + + + + + + + + + + + + + + +
Pool: +
Tipo Medio: +
Ubicación : +
Número de medio
a expulsar:
+ +
+
+
diff --git a/gui/bweb/lang/es/tpl/help_extern_compute.tpl b/gui/bweb/lang/es/tpl/help_extern_compute.tpl new file mode 100644 index 0000000000..ac1a3db8e4 --- /dev/null +++ b/gui/bweb/lang/es/tpl/help_extern_compute.tpl @@ -0,0 +1,67 @@ +
+
+

Ayuda para expulsar medios (part 2/2)

+
+
+ Ahora puede verificar la selección y expulsar el medio. +
+
+ + + + + + diff --git a/gui/bweb/lang/es/tpl/help_intern.tpl b/gui/bweb/lang/es/tpl/help_intern.tpl new file mode 100644 index 0000000000..314764cc17 --- /dev/null +++ b/gui/bweb/lang/es/tpl/help_intern.tpl @@ -0,0 +1,52 @@ +
+
+

Ayuda para cargar medios (part 1/2)

+
+
+Se seleccionará el mejor candidato para cargar. Se le pedirá +realizar su selección en la próxima pantalla. +
+
+ + + +
+ + + + + + + + + + + + + + + + + + +
Pool: +
Tipo Medio: +
+ Ubicación : + +
Expiración :
Número de medio
a cargar:
+ +
+ +
diff --git a/gui/bweb/lang/es/tpl/help_intern_compute.tpl b/gui/bweb/lang/es/tpl/help_intern_compute.tpl new file mode 100644 index 0000000000..8a8cd5c22d --- /dev/null +++ b/gui/bweb/lang/es/tpl/help_intern_compute.tpl @@ -0,0 +1,67 @@ +
+
+

Ayuda para cargar medios (part 2/2)

+
+
+ Ahora puede verificar la selección y cargar el medio +
+
+ + + + + + diff --git a/gui/bweb/lang/es/tpl/install.tpl b/gui/bweb/lang/es/tpl/install.tpl new file mode 100644 index 0000000000..749c5d2447 --- /dev/null +++ b/gui/bweb/lang/es/tpl/install.tpl @@ -0,0 +1,9 @@ +
+
+

Install notes

+
+
+ + + +
diff --git a/gui/bweb/lang/es/tpl/location_add.tpl b/gui/bweb/lang/es/tpl/location_add.tpl new file mode 100644 index 0000000000..7b5ab200e4 --- /dev/null +++ b/gui/bweb/lang/es/tpl/location_add.tpl @@ -0,0 +1,28 @@ +
+
+

Nueva Ubicación

+
+
+
+
+ + + +
+ + + + + + + + + +
Ubicación : + +
Cost : +
Activado : +
+ + + +Tips: It's a good idea to have a location per autochanger. + +
diff --git a/gui/bweb/lang/es/tpl/location_edit.tpl b/gui/bweb/lang/es/tpl/location_edit.tpl new file mode 100644 index 0000000000..11856be10c --- /dev/null +++ b/gui/bweb/lang/es/tpl/location_edit.tpl @@ -0,0 +1,26 @@ +
+
+

Ubicación :

+
+
+
+ + + + + + + + + + + +
Ubicación : + +
Cost : +
Activado : checked > +
+ +
+
diff --git a/gui/bweb/lang/es/tpl/move_media.tpl b/gui/bweb/lang/es/tpl/move_media.tpl new file mode 100644 index 0000000000..797d766190 --- /dev/null +++ b/gui/bweb/lang/es/tpl/move_media.tpl @@ -0,0 +1,85 @@ +
+
+

Mover Medio

+
+
+
+
+ + + +
Nueva Ubicación: + +
Estado: + +
Usuario: + +
Comentario: + +
+ +
+
+ + diff --git a/gui/bweb/lang/es/tpl/run_job.tpl b/gui/bweb/lang/es/tpl/run_job.tpl new file mode 100644 index 0000000000..f0692e4331 --- /dev/null +++ b/gui/bweb/lang/es/tpl/run_job.tpl @@ -0,0 +1,33 @@ +
+
+

Jobs Definidos:

+
+
+
+ + + +
Nombre Job: + +
+
+ + + +
+
diff --git a/gui/bweb/lang/es/tpl/run_job_mod.tpl b/gui/bweb/lang/es/tpl/run_job_mod.tpl new file mode 100644 index 0000000000..02291222cb --- /dev/null +++ b/gui/bweb/lang/es/tpl/run_job_mod.tpl @@ -0,0 +1,138 @@ +
+
+

Ejecutar Job : on

+
+
+
+ + + +
Nombre del Job: + +
Pool: + + +
Cliente: + + + +
FileSet: + + +
Almacenamiento: + + +
Nivel: + + +
+
+ + + +
+
+ + diff --git a/gui/bweb/lang/es/tpl/running_job.tpl b/gui/bweb/lang/es/tpl/running_job.tpl new file mode 100644 index 0000000000..7acda4e640 --- /dev/null +++ b/gui/bweb/lang/es/tpl/running_job.tpl @@ -0,0 +1,96 @@ +
+
+

Jobs en Ejecución

+
+
+
+
+
+ + +
+ +
+ + diff --git a/gui/bweb/lang/es/tpl/scheduled_job.tpl b/gui/bweb/lang/es/tpl/scheduled_job.tpl new file mode 100644 index 0000000000..4b23904211 --- /dev/null +++ b/gui/bweb/lang/es/tpl/scheduled_job.tpl @@ -0,0 +1,71 @@ +
+
+

Próximos Jobs

+
+
+
+
+ + +
+
+ + diff --git a/gui/bweb/lang/es/tpl/stats.tpl b/gui/bweb/lang/es/tpl/stats.tpl new file mode 100644 index 0000000000..a3bd1ce9db --- /dev/null +++ b/gui/bweb/lang/es/tpl/stats.tpl @@ -0,0 +1,9 @@ +
+

Estadísticas

+
+
+ +Nothing to display + +
+ diff --git a/gui/bweb/lang/es/tpl/update_location.tpl b/gui/bweb/lang/es/tpl/update_location.tpl new file mode 100644 index 0000000000..11b4335f2a --- /dev/null +++ b/gui/bweb/lang/es/tpl/update_location.tpl @@ -0,0 +1,65 @@ +
+
+

Actualizar Ubicación del Medio

+
+
+
+
+ New location : + +
+
+ + diff --git a/gui/bweb/lang/es/tpl/update_media.tpl b/gui/bweb/lang/es/tpl/update_media.tpl new file mode 100644 index 0000000000..e9f41beb5a --- /dev/null +++ b/gui/bweb/lang/es/tpl/update_media.tpl @@ -0,0 +1,159 @@ +
+
+

Actualizar Medio

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nombre del Volumen: +
Pool: +
Estado: +
Slot: + +
Cargado: + checked> +
Ubicación : +
Período de Retención: + +
Use duration: + +
Jobs Máximos: + +
Archivos Máximos: + +
Bytes Máximos: + +
Recycle Pool: +
Comentario: + +
+ + + +
+ + + + +
+ + +
+
+
+ + diff --git a/gui/bweb/lang/fr/tpl/config_edit.tpl b/gui/bweb/lang/fr/tpl/config_edit.tpl index d5fdb7cf3c..847c404059 100644 --- a/gui/bweb/lang/fr/tpl/config_edit.tpl +++ b/gui/bweb/lang/fr/tpl/config_edit.tpl @@ -38,11 +38,17 @@ fv_write_path : + stat_job_table : + + bconsole : + display_log_time : + checked='checked' value='on' > + debug : - + checked='checked' value='on' > diff --git a/gui/bweb/lang/fr/tpl/config_view.tpl b/gui/bweb/lang/fr/tpl/config_view.tpl index a028858e71..c179d74b81 100644 --- a/gui/bweb/lang/fr/tpl/config_view.tpl +++ b/gui/bweb/lang/fr/tpl/config_view.tpl @@ -15,7 +15,9 @@ template_dir : graph_font : fv_write_path : + stat_job_table : Job bconsole : + display_log_time : debug : Robotique (Autochanger) diff --git a/gui/bweb/lang/fr/tpl/display_form_job.tpl b/gui/bweb/lang/fr/tpl/display_form_job.tpl index f205dd0407..0402547dab 100644 --- a/gui/bweb/lang/fr/tpl/display_form_job.tpl +++ b/gui/bweb/lang/fr/tpl/display_form_job.tpl @@ -22,6 +22,7 @@ diff --git a/gui/bweb/lang/fr/tpl/fileset_view.tpl b/gui/bweb/lang/fr/tpl/fileset_view.tpl index 15b508173a..3ac58e2cbf 100644 --- a/gui/bweb/lang/fr/tpl/fileset_view.tpl +++ b/gui/bweb/lang/fr/tpl/fileset_view.tpl @@ -5,16 +5,16 @@
- included Ce qui est inclu : + included Ce qui est inclus :
 
 
- excluded Ce qui est exclu : + excluded Ce qui est exclus :
 
 
-Tips : Attention, ceci est le FileSet courant, sur une ancienne sauvegarde, il peut avoir changé. +Tips : Attention ceci est le FileSet courant. Il peut avoir changà sur une ancienne sauvegarde.
diff --git a/gui/bweb/lang/fr/tpl/location_add.tpl b/gui/bweb/lang/fr/tpl/location_add.tpl index f85c0090d1..49b5c5529f 100644 --- a/gui/bweb/lang/fr/tpl/location_add.tpl +++ b/gui/bweb/lang/fr/tpl/location_add.tpl @@ -14,7 +14,7 @@ - Enabled : + En ligne : diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index c178dc3a65..8676a3f8a5 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -207,7 +207,7 @@ use CGI; our %k_re = ( dbi => qr/^(dbi:(Pg|mysql):(?:\w+=[\w\d\.-]+;?)+)$/i, user => qr/^([\w\d\.-]+)$/i, password => qr/^(.*)$/i, - fv_write_path => qr!^([/\w\d\.-]+)$!, + fv_write_path => qr!^([/\w\d\.-]*)$!, template_dir => qr!^([/\w\d\.-]+)$!, debug => qr/^(on)?$/, email_media => qr/^([\w\d\.-]+@[\d\w\.-]+)$/, @@ -215,6 +215,8 @@ our %k_re = ( dbi => qr/^(dbi:(Pg|mysql):(?:\w+=[\w\d\.-]+;?)+)$/i, bconsole => qr!^(.+)?$!, syslog_file => qr!^(.+)?$!, log_dir => qr!^(.+)?$!, + stat_job_table => qr!^(\w*)$!, + display_log_time => qr!^(on)?$!, ); =head1 FUNCTION @@ -860,12 +862,13 @@ sub send_to_io sub transfer { my ($self, $src, $dst) = @_ ; - print "
$self->{precmd} $self->{mtxcmd} -f $self->{device} transfer $src $dst
\n"; + if ($self->{debug}) { + print "
$self->{precmd} $self->{mtxcmd} -f $self->{device} transfer $src $dst
\n"; + } my $out = `$self->{precmd} $self->{mtxcmd} -f $self->{device} transfer $src $dst 2>&1`; if ($? == 0) { my $content = $self->get_slot($src); - print "$content ($src) => $dst
"; $self->{slot}->[$src] = 'empty'; $self->set_slot($dst, $content); return 1; @@ -901,13 +904,17 @@ sub clear_io if ($self->slot_is_full($slot)) { my $free = $self->slot_get_first_free() ; - print "want to move $slot to $free\n"; + print "move $slot to $free :\n"; if ($free) { - $self->transfer($slot, $free) || print "$self->{error}\n"; + if ($self->transfer($slot, $free)) { + print "ok
\n"; + } else { + print "ok
\n"; + } } else { - $self->{error} = "E : Can't find free slot"; + $self->{error} = "ok
\n"; } } } @@ -969,7 +976,7 @@ WHERE Media.VolumeName IN ($media_list) } else { # empty or no label push @{ $param }, {realslot => $slot, - volstatus => 'Unknow', + volstatus => 'Unknown', volumename => $self->{slot}->[$slot]} ; } } else { # empty @@ -1834,7 +1841,9 @@ sub get_param $ret{status} = $1; if ($1 eq 'f') { $limit .= "AND Job.JobStatus IN ('f','E') "; - } else { + } elsif ($1 eq 'W') { + $limit .= "AND Job.JobStatus = 'T' AND Job.JobErrors > 0 "; + } else { $limit .= "AND Job.JobStatus = '$1' "; } } @@ -1923,6 +1932,7 @@ SELECT Job.JobId AS jobid, Job.Name AS jobname, Level AS level, StartTime AS starttime, + EndTime AS endtime, Pool.Name AS poolname, JobFiles AS jobfiles, JobBytes AS jobbytes, @@ -2406,7 +2416,7 @@ sub change_location } my $newloc = CGI::param('newlocation'); - my $user = CGI::param('user') || 'unknow'; + my $user = CGI::param('user') || 'unknown'; my $comm = CGI::param('comment') || ''; $comm = $self->dbh_quote("$user: $comm"); @@ -2432,7 +2442,7 @@ INSERT LocationLog (Date, Comment, MediaId, LocationId, NewVolStatus) $self->display({ email => $self->{info}->{email_media}, url => $url, newlocation => $newloc, - # [ { volumename => 'vol1' }, { volumename => 'vol2' },..] + # [ { volumename => 'vol1' }, { volumename => 'vol2' },..] medias => [ values %$medias ], }, "change_location.tpl"); @@ -2618,9 +2628,11 @@ WHERE JobStatus IN ('C','R','B','e','D','F','S','m','M','s','j','c','d','t','p') "running_job.tpl") ; } +# return the autochanger list to update sub eject_media { my ($self) = @_; + my %ret; my $arg = $self->get_form('jmedias'); unless ($arg->{jmedias}) { @@ -2643,6 +2655,7 @@ WHERE Media.VolumeName IN ($arg->{jmedias}) foreach my $vol (values %$all) { my $a = $self->ach_get($vol->{location}); next unless ($a) ; + $ret{$vol->{location}} = 1; unless ($a->{have_status}) { $a->status(); @@ -2651,11 +2664,12 @@ WHERE Media.VolumeName IN ($arg->{jmedias}) print "eject $vol->{volumename} from $vol->{storage} : "; if ($a->send_to_io($vol->{slot})) { - print "ok
"; + print "ok
"; } else { - print "err
"; + print "err
"; } } + return keys %ret; } sub move_email @@ -2712,7 +2726,8 @@ sub ach_get return undef; } - $a->{bweb} = $self; + $a->{bweb} = $self; + $a->{debug} = $self->{debug}; return $a; } @@ -2868,28 +2883,23 @@ sub do_update_media $update .= " pool=$arg->{pool} " ; } - $arg->{volretention} ||= 0 ; - if ($arg->{volretention}) { + if (defined $arg->{volretention}) { $update .= " volretention=\"$arg->{volretention}\" " ; } - $arg->{voluseduration} ||= 0 ; - if ($arg->{voluseduration}) { + if (defined $arg->{voluseduration}) { $update .= " voluse=\"$arg->{voluseduration}\" " ; } - $arg->{maxvoljobs} ||= 0; - if ($arg->{maxvoljobs}) { + if (defined $arg->{maxvoljobs}) { $update .= " maxvoljobs=$arg->{maxvoljobs} " ; } - $arg->{maxvolfiles} ||= 0; - if ($arg->{maxvolfiles}) { + if (defined $arg->{maxvolfiles}) { $update .= " maxvolfiles=$arg->{maxvolfiles} " ; } - $arg->{maxvolbytes} ||= 0; - if ($arg->{maxvolbytes}) { + if (defined $arg->{maxvolbytes}) { $update .= " maxvolbytes=$arg->{maxvolbytes} " ; } @@ -2949,12 +2959,16 @@ sub get_job_log { my ($self) = @_; - my $arg = $self->get_form('jobid'); + my $arg = $self->get_form('jobid', 'limit', 'offset'); unless ($arg->{jobid}) { return $self->error("Can't get jobid"); } - my $t = CGI::param('time') || ''; + if ($arg->{limit} == 100) { + $arg->{limit} = 1000; + } + + my $t = CGI::param('time') || $self->{info}->{display_log_time} || ''; my $query = " SELECT Job.Name as name, Client.Name as clientname @@ -2975,7 +2989,9 @@ SELECT Time AS time, LogText AS log OR (Log.JobId = 0 AND Time >= (SELECT StartTime FROM Job WHERE JobId=$arg->{jobid}) AND Time <= (SELECT COALESCE(EndTime,NOW()) FROM Job WHERE JobId=$arg->{jobid}) ) - ORDER BY LogId; + ORDER BY LogId + LIMIT $arg->{limit} + OFFSET $arg->{offset} "; my $log = $self->dbh_selectall_arrayref($query); @@ -2995,6 +3011,8 @@ SELECT Time AS time, LogText AS log jobid => $arg->{jobid}, name => $row->{name}, client => $row->{clientname}, + offset => $arg->{offset}, + limit => $arg->{limit}, }, 'display_log.tpl'); } @@ -3009,6 +3027,16 @@ sub label_barcodes return $self->error("Can't find autochanger name"); } + my $a = $self->ach_get($arg->{ach}); + unless ($a) { + return $self->error("Can't find autochanger name in configuration"); + } + + my $storage = $a->get_drive_name($arg->{drive}); + unless ($storage) { + return $self->error("Can't get your drive name"); + } + my $slots = ''; my $t = 300 ; if ($arg->{slots}) { @@ -3019,12 +3047,27 @@ sub label_barcodes my $b = new Bconsole(pref => $self->{info}, timeout => $t,log_stdout => 1); print "

This command can take long time, be patient...

"; print "
" ;
-    $b->label_barcodes(storage => $arg->{ach},
+    $b->label_barcodes(storage => $storage,
 		       drive => $arg->{drive},
 		       pool  => 'Scratch',
 		       slots => $slots) ;
     $b->close();
     print "
"; + + $self->dbh_do(" + UPDATE Media + SET LocationId = (SELECT LocationId + FROM Location + WHERE Location = '$arg->{ach}'), + + RecyclePoolId = PoolId + + WHERE Media.PoolId = (SELECT PoolId + FROM Pool + WHERE Name = 'Scratch') + AND (LocationId = 0 OR LocationId IS NULL) +"); + } sub purge diff --git a/gui/bweb/tpl/begin.tpl b/gui/bweb/tpl/begin.tpl index 8ac9df276f..316ea223d6 100644 --- a/gui/bweb/tpl/begin.tpl +++ b/gui/bweb/tpl/begin.tpl @@ -14,7 +14,7 @@ @@ -30,13 +30,13 @@ if (navigator.appName == 'Konqueror') {
  • Restore
  • -
  • Medias +
  • Media
  • diff --git a/gui/bweb/tpl/config_edit.tpl b/gui/bweb/tpl/config_edit.tpl index 3e7fe994fe..c918cf2988 100644 --- a/gui/bweb/tpl/config_edit.tpl +++ b/gui/bweb/tpl/config_edit.tpl @@ -37,12 +37,17 @@ fv_write_path : + stat_job_table : + bconsole : + display_log_time : + checked='checked' value='on' > + debug : - + checked='checked' value='on'
    > diff --git a/gui/bweb/tpl/config_view.tpl b/gui/bweb/tpl/config_view.tpl index a505b03759..5056458da2 100644 --- a/gui/bweb/tpl/config_view.tpl +++ b/gui/bweb/tpl/config_view.tpl @@ -15,7 +15,9 @@ template_dir : graph_font : fv_write_path : + stat_job_table : Job bconsole : + display_log_time : debug : Autochanger diff --git a/gui/bweb/tpl/display_client_stats.tpl b/gui/bweb/tpl/display_client_stats.tpl index 19a7c4df35..d93cd8e242 100644 --- a/gui/bweb/tpl/display_client_stats.tpl +++ b/gui/bweb/tpl/display_client_stats.tpl @@ -52,8 +52,8 @@ nrsTable.setup( odd_cell_color: odd_cell_color, header_color: header_color, page_nav: true, - rows_per_page: rows_per_page, -// disable_sorting: new Array(1) +// disable_sorting: new Array(1), + rows_per_page: rows_per_page } ); diff --git a/gui/bweb/tpl/display_form_job.tpl b/gui/bweb/tpl/display_form_job.tpl index 370a8e1493..5368ed591e 100644 --- a/gui/bweb/tpl/display_form_job.tpl +++ b/gui/bweb/tpl/display_form_job.tpl @@ -22,6 +22,7 @@ diff --git a/gui/bweb/tpl/display_job_zoom.tpl b/gui/bweb/tpl/display_job_zoom.tpl index 8203ef13ca..f8b29fe1b8 100644 --- a/gui/bweb/tpl/display_job_zoom.tpl +++ b/gui/bweb/tpl/display_job_zoom.tpl @@ -51,18 +51,18 @@ -
    ---> + diff --git a/gui/bweb/tpl/display_media.tpl b/gui/bweb/tpl/display_media.tpl index 2ebbc35e6d..e4a029b44f 100644 --- a/gui/bweb/tpl/display_media.tpl +++ b/gui/bweb/tpl/display_media.tpl @@ -22,8 +22,8 @@ Location :
        -   -   +   +   @@ -34,8 +34,8 @@ Location :

    - Informations + Information

    diff --git a/gui/bweb/tpl/graph.tpl b/gui/bweb/tpl/graph.tpl index 5ad94e1aa0..c80a58f645 100644 --- a/gui/bweb/tpl/graph.tpl +++ b/gui/bweb/tpl/graph.tpl @@ -6,7 +6,7 @@ @@ -71,15 +71,15 @@ - - - + + + - - + + @@ -89,7 +89,7 @@ @@ -169,4 +169,3 @@ - diff --git a/gui/bweb/tpl/help_extern.tpl b/gui/bweb/tpl/help_extern.tpl index 0c15d2c271..15fd285639 100644 --- a/gui/bweb/tpl/help_extern.tpl +++ b/gui/bweb/tpl/help_extern.tpl @@ -1,10 +1,10 @@
    -

    Help to eject media (part 1/2)

    +

    Help ejecting media (part 1/2)

    -This tool will select for you best candidate to eject. You will -be asked for choose inside the selection in the next screen. +This tool will select the best candidates to eject. You will +be asked to make your selection on the next screen.
    -
    +
    Options  
    @@ -42,9 +42,9 @@

    Size

    Width:  
    + name='width' value='' size='4'>
    Height:
    + name='height' value='' size='4'>

    Number of items

    + class='formulaire' size='4'>
    diff --git a/gui/bweb/tpl/help_extern_compute.tpl b/gui/bweb/tpl/help_extern_compute.tpl index 449a0226a0..816353d8f9 100644 --- a/gui/bweb/tpl/help_extern_compute.tpl +++ b/gui/bweb/tpl/help_extern_compute.tpl @@ -3,7 +3,7 @@

    Help to eject media (part 2/2)

    - Now, you can verify the selection and eject media. + Now, you can verify the selection and eject the media.
    Pool:
    @@ -18,7 +18,7 @@ diff --git a/gui/bweb/tpl/running_job.tpl b/gui/bweb/tpl/running_job.tpl index 0ed0b4a066..cf3655d66d 100644 --- a/gui/bweb/tpl/running_job.tpl +++ b/gui/bweb/tpl/running_job.tpl @@ -12,7 +12,7 @@ @@ -21,16 +21,16 @@