From: Eric Bollengier Date: Fri, 20 Jun 2008 10:00:17 +0000 (+0000) Subject: ebl update stats page X-Git-Tag: Release-3.0.0~1271 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bd8fe54e8ede0680748f77b6f6e41f5331cb0fc2;p=bacula%2Fbacula ebl update stats page git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7189 91ce42f0-d328-0410-95d8-f526ca767f89 --- 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 @@