From bd8fe54e8ede0680748f77b6f6e41f5331cb0fc2 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 20 Jun 2008 10:00:17 +0000 Subject: [PATCH] ebl update stats page git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7189 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/lib/Bweb.pm | 17 ++++++++++++++--- gui/bweb/tpl/display_stats.tpl | 16 ++++++++++++---- gui/bweb/tpl/graph.tpl | 15 +++++++++++++++ 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 655854f163..aa3db9715c 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -4056,17 +4056,19 @@ sub display_group_stats my $filter = $self->get_client_group_filter(); + my $jobt = $self->get_stat_table(); + my ($limit, $label) = $self->get_limit(%$arg); my ($where, undef) = $self->get_param('client_groups', 'level'); my $query = " -SELECT client_group_name AS name, nb_byte, nb_file, nb_job, nb_resto +SELECT client_group_name AS name, nb_byte, nb_file, nb_job, nb_err, nb_resto FROM ( SELECT sum(JobBytes) AS nb_byte, sum(JobFiles) AS nb_file, count(1) AS nb_job, client_group_name - FROM job_old JOIN client_group_member USING (ClientId) + FROM $jobt AS Job JOIN client_group_member USING (ClientId) JOIN client_group USING (client_group_id) $filter WHERE JobStatus = 'T' AND Type IN ('M', 'B', 'g') $where $limit @@ -4074,8 +4076,17 @@ SELECT client_group_name AS name, nb_byte, nb_file, nb_job, nb_resto ) AS T1 LEFT JOIN ( + SELECT count(1) AS nb_err, client_group_name + FROM $jobt AS Job JOIN client_group_member USING (ClientId) + JOIN client_group USING (client_group_id) + WHERE JobStatus IN ('E','e','f','A') AND Type = 'B' + $where $limit + GROUP BY client_group_name ORDER BY client_group_name + + ) AS T3 USING (client_group_name) LEFT JOIN ( + SELECT count(1) AS nb_resto, client_group_name - FROM job_old JOIN client_group_member USING (ClientId) + FROM $jobt AS Job JOIN client_group_member USING (ClientId) JOIN client_group USING (client_group_id) WHERE JobStatus = 'T' AND Type = 'R' $where $limit diff --git a/gui/bweb/tpl/display_stats.tpl b/gui/bweb/tpl/display_stats.tpl index 74df15817d..9db53be64c 100644 --- a/gui/bweb/tpl/display_stats.tpl +++ b/gui/bweb/tpl/display_stats.tpl @@ -8,18 +8,26 @@ -- 2.39.5