From 408f18acd9e19abacfbdf510537b6f01c0d21ba3 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 12 Feb 2008 18:33:11 +0000 Subject: [PATCH] ebl Update btime to use pool filter git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6405 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/cgi/btime.pl | 13 ++++++++----- gui/bweb/tpl/btime.tpl | 20 ++++++++++++++++++-- gui/bweb/tpl/client_list.tpl | 1 + 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/gui/bweb/cgi/btime.pl b/gui/bweb/cgi/btime.pl index e5ccc2a612..6b682e130f 100755 --- a/gui/bweb/cgi/btime.pl +++ b/gui/bweb/cgi/btime.pl @@ -45,8 +45,11 @@ my $conf = new Bweb::Config(config_file => $Bweb::config_file); $conf->load(); my $bweb = new Bweb(info => $conf); -my $arg = $bweb->get_form(qw/qiso_begin qiso_end qusage qpool qnojob +$bweb->can_do('r_view_stat'); + +my $arg = $bweb->get_form(qw/qiso_begin qiso_end qusage qpools qpoolusage qnojob jclient_groups db_client_groups qclient_groups/); +my ($filter1, undef) = $bweb->get_param('pool'); if (!$arg->{qiso_begin}) { $arg->{qiso_begin} = strftime('\'%F %H:%M:00\'', localtime(time - 60*60*12)); @@ -54,7 +57,7 @@ if (!$arg->{qiso_begin}) { } use Digest::MD5 qw(md5_hex); my $md5_rep = md5_hex("$arg->{qiso_begin}:$arg->{qiso_end}:$arg->{qusage}:" . - "$arg->{jclient_groups}:$arg->{qpool};$arg->{qnojob}") ; + "$arg->{jclient_groups}:$arg->{qpoolusage};$arg->{qnojob}") ; print CGI::header('text/html'); $bweb->display_begin(); @@ -128,8 +131,8 @@ FROM Log INNER JOIN Job USING (JobId) JOIN Pool USING (PoolId) AND Job.StartTime < $arg->{qiso_end} AND ( $filter ) AND Job.Type = 'B' -ORDER BY Job.JobId,Log.LogId,Log.Time -"; + $filter1 + ORDER BY Job.JobId,Log.LogId,Log.Time "; print STDERR $query if ($conf->{debug}); @@ -250,7 +253,7 @@ if (!$arg->{qnojob} && $last_name) { $top->add_job(label => $last_name, data => $data); } -if ($arg->{qpool}) { +if ($arg->{qpoolusage}) { foreach my $d (sort keys %$pool) { $top->add_job(label => $d, data => $pool->{$d}); diff --git a/gui/bweb/tpl/btime.tpl b/gui/bweb/tpl/btime.tpl index fe2aa2b261..4c79ce59ca 100644 --- a/gui/bweb/tpl/btime.tpl +++ b/gui/bweb/tpl/btime.tpl @@ -34,8 +34,8 @@ checked name="usage"> __Drive usage__
checked - name="pool"> __Pool usage__
+ checked + name="poolusage"> __Pool usage__
checked name="nojob"> __Hide Job__
@@ -50,6 +50,18 @@ + + + + +

__Pools__

+ + +
@@ -137,6 +149,10 @@ document.getElementById('group_' + ).selected = true; + + document.getElementById('pool_' + ).selected = true; + + document.getElementById('client_' + ).selected = true; diff --git a/gui/bweb/tpl/client_list.tpl b/gui/bweb/tpl/client_list.tpl index cea85decc5..a452f4b164 100644 --- a/gui/bweb/tpl/client_list.tpl +++ b/gui/bweb/tpl/client_list.tpl @@ -12,6 +12,7 @@ + -- 2.39.5