}
}
} elsif ($action eq 'group_stats') {
+ $bweb->can_do('r_view_stat');
+ print "<div><table border='0'><tr><td valign='top'>\n";
+ my $fields = $bweb->get_form(qw/since age
+ db_client_groups qclient_groups/); # drop this to hide
+ $fields->{action}='group_stats';
+ $fields->{hide_level}=1;
+ $fields->{hide_type}=1;
+ $fields->{hide_status}=1;
+
+ $bweb->display($fields, "display_form_job.tpl");
+
+ print "</td><td valign='top'>";
$bweb->display_group_stats();
-} elsif ($action eq 'group_stats') {
- $bweb->display_group_stats(age => $arg->{age});
+ print "</td></tr></table></div>"
} elsif ($action eq 'running') {
$bweb->display_running_jobs(1);
<tr>
<td> <b> Files Examined: </b> </td> <td> <TMPL_VAR "files examined"></td>
</tr>
+ <tr>
+ <td> <b> Files Backuped: </b> </td> <td> <TMPL_VAR files></td>
+ </tr>
<tr>
<td> <b> Bytes: </b> </td> <td> <TMPL_VAR bytes></td>
</tr>
<div class="otherbox">
<form name='form1' action='?' method='GET'>
<table border='0'>
+<TMPL_UNLESS hide_level>
<tr>
<td valign='top'>
<h2>Level</h2>
</select>
</td>
</tr>
+</TMPL_UNLESS>
<TMPL_UNLESS hide_status>
<tr>
<td valign='top'>
<tr>
<td valign='top'>
<h2>Since</h2>
- <input type='text' id='since' name='since' size='17' title='YYYY-MM-DD'
+ <input type='text' id='since' name='since' size='22' title='YYYY-MM-DD'
value='<TMPL_VAR since>' class='formulaire'>
</td>
</tr>
<td valign='top'>
<h2>Age</h2>
<select name='age' class='formulaire' onclick='document.getElementById("since").value="";'>
+ <option id='age_86400' value='86400'>1 day</option>
+ <option id='age_172800' value='172800'>2 days</option>
<option id='age_604800' value='604800'>1 week</option>
<option id='age_2678400' value='2678400'>30 days</option>
<option id='age_15552000' value='15552000'>6 months</option>
<td valign='top'>
<h2>Age</h2>
<select name='age' class='formulaire'>
+ <option id='age_86400' value='86400'>Last 24h</option>
+ <option id='age_172800' value='172800'>This weekend</option>
<option id='age_604800' value='604800'>This week</option>
<option id='age_2678400' value='2678400'>Last 30 days</option>
<option id='age_15552000' value='15552000'>Last 6 months</option>
-<br/>
<div class='titlediv'>
<h1 class='newstitle'> Statistics (<TMPL_VAR label>)</h1>
</div>
<tr>
<td> <b> Archivos Examinados: </b> </td> <td> <TMPL_VAR "files examined"></td>
</tr>
+ <tr>
+ <td> <b> Files Backuped: </b> </td> <td> <TMPL_VAR files></td>
+ </tr>
<tr>
<td> <b> Bytes: </b> </td> <td> <TMPL_VAR bytes></td>
</tr>
-<br/>
<div class="otherboxtitle">
Filter
</div>
<div class="otherbox">
<form name='form1' action='?' method='GET'>
<table border='0'>
+<TMPL_UNLESS hide_level>
<tr>
<td valign='top'>
<h2>Nivel</h2>
</select>
</td>
</tr>
+</TMPL_UNLESS>
<TMPL_UNLESS hide_status>
<tr>
<td valign='top'>
<tr>
<td valign='top'>
<h2>Tiempo</h2>
- <input type='text' id='since' name='since' size='17' title='YYYY-MM-DD'
+ <input type='text' id='since' name='since' size='22' title='YYYY-MM-DD'
value='<TMPL_VAR since>' class='formulaire'>
</td>
</tr>
<td valign='top'>
<h2>Tiempo</h2>
<select name='age' class='formulaire' onclick='document.getElementById("since").value="";'>
+ <option id='age_86400' value='86400'>1 day</option>
+ <option id='age_172800' value='172800'>2 days</option>
<option id='age_604800' value='604800'>Esta semana</option>
- <option id='age_2678400' value='2678400'>Últimos 30 dias</option>
- <option id='age_15552000' value='15552000'>Últimos 6 meses</option>
+ <option id='age_2678400' value='2678400'>Últimos 30 dias</option>
+ <option id='age_15552000' value='15552000'>Últimos 6 meses</option>
</select>
</td>
</tr>
<td valign='top'>
<h2>Tiempo</h2>
<select name='age' class='formulaire'>
+ <option id='age_86400' value='86400'>Last 24h</option>
+ <option id='age_172800' value='172800'>This weekend</option>
<option id='age_604800' value='604800'>Esta Semana</option>
- <option id='age_2678400' value='2678400'>Últimos 30 días</option>
- <option id='age_15552000' value='15552000'>Últimos 6 meses</option>
+ <option id='age_2678400' value='2678400'>Últimos 30 días</option>
+ <option id='age_15552000' value='15552000'>Últimos 6 meses</option>
</select>
</td>
</tr>
</TMPL_IF>
<tr>
<td valign='bottom'>
- <h2>Número de items</h2>
+ <h2>Número de items</h2>
<input type='text' name='limit' value='<TMPL_VAR limit>'
class='formulaire' size='4'>
</td>
<select name='jobtype' class='formulaire'>
<option id='jobtype_any' value='all type'>Cualquiera</option>
<option id='jobtype_B' value='B'>Backup</option>
- <option id='jobtype_R' value='R'>Recuperación</option>
+ <option id='jobtype_R' value='R'>Recuperación</option>
</select>
</td>
</tr>
<tr>
<td> <b> Fichiers vus : </b> </td> <td> <TMPL_VAR "files examined"></td>
</tr>
+ <tr>
+ <td> <b> Files Backuped: </b> </td> <td> <TMPL_VAR files></td>
+ </tr>
<tr>
<td> <b> Taille : </b> </td> <td> <TMPL_VAR bytes></td>
</tr>
</table>
<form name='form1' action='?' method='GET'>
<button type="submit" class="bp" name='action' value='dsp_cur_job'
-> <img src='/bweb/update.png' title='Rafraîchir' alt=''>Rafraîchir</button>
+> <img src='/bweb/update.png' title='Rafraîchir' alt=''>Rafraîchir</button>
<input type='hidden' name='client' value='<TMPL_VAR Client>'>
<input type='hidden' name='jobid' value='<TMPL_VAR JobId>'>
<button type="submit" class="bp" name='action' value='cancel_job'
-<br/>
<div class="otherboxtitle">
Filtre
</div>
<div class="otherbox">
<form name='form1' action='?' method='GET'>
<table border='0'>
+<TMPL_UNLESS hide_level>
<tr>
<td valign='top'>
<h2>Niveau</h2>
</select>
</td>
</tr>
+</TMPL_UNLESS>
<TMPL_UNLESS hide_status>
<tr>
<td valign='top'>
<TMPL_UNLESS hide_since>
<tr>
<td valign='top'>
- <h2>Hier</h2>
- <input type='text' id='since' name='since' size='17' title='YYYY-MM-DD'
+ <h2>Depuis</h2>
+ <input type='text' id='since' name='since' size='22' title='YYYY-MM-DD'
value='<TMPL_VAR since>' class='formulaire'>
</td>
</tr>
<tr>
<td valign='top'>
- <h2>Période</h2>
+ <h2>Période</h2>
<select name='age' class='formulaire' onclick='document.getElementById("since").value="";'>
+ <option id='age_86400' value='86400'>1 day</option>
+ <option id='age_172800' value='172800'>2 days</option>
<option id='age_604800' value='604800'>Cette semaine</option>
<option id='age_2678400' value='2678400'>30 derniers jours</option>
<option id='age_15552000' value='15552000'>6 derniers mois</option>
<TMPL_ELSE>
<tr>
<td valign='top'>
- <h2>Période</h2>
+ <h2>Période</h2>
<select name='age' class='formulaire'>
+ <option id='age_86400' value='86400'>Last 24h</option>
+ <option id='age_172800' value='172800'>This weekend</option>
<option id='age_604800' value='604800'>Cette semaine</option>
<option id='age_2678400' value='2678400'>30 derniers jours</option>
<option id='age_15552000' value='15552000'>Last 6 months</option>
<td valign='top'>
<h2>Time slice</h2>
<select name='type' class='formulaire'>
- <option id='slice_day' value='day'>Per days</option>
- <option id='slice_week' value='week'>Per weeks</option>
- <option id='slice_month' value='month'>Per months</option>
+ <option id='slice_day' value='day'>Par jour</option>
+ <option id='slice_week' value='week'>Par semaine</option>
+ <option id='slice_month' value='month'>Par mois</option>
</select>
</td>
</tr>
$status->{corr_jobfiles} = $infos->{corr_jobfiles};
$status->{jobbytes}=$status->{Bytes};
$status->{jobbytes} =~ s![^\d]!!g;
- $status->{jobfiles}=$status->{Files};
+ $status->{jobfiles}=$status->{'Files Examined'};
$status->{jobfiles} =~ s/,//g;
$bweb->display($status, "client_job_status.tpl");
}
+ REGR_INTERCEPT(jobbytes,jobtdate)) AS jobbytes,
COUNT(1) AS nb_jobbytes ";
}
+ # if it's a differential, we need to compare since the last full
+ #
+ # F D D D F D D D F I I I I D I I I
+ # | # # # # | # #
+ # | # # # # # # | # #
+ # | # # # # # # # # | # # # # # # # # #
+ # +----------------- +-------------------
+ my $filter2='';
+ if ($level eq 'D') {
+ $filter2 = "
+AND Job.StartTime > (
+ SELECT StartTime
+ FROM Job
+ WHERE Job.Name = '$job'
+ AND Job.Level = 'F'
+ AND Job.JobStatus = 'T'
+ORDER BY Job.StartTime DESC LIMIT 1
+) ";
+ }
+
$query .=
"
FROM (
WHERE Job.Name = '$job'
AND Job.Level = '$level'
AND Job.JobStatus = 'T'
+ $filter2
ORDER BY StartTime DESC
LIMIT 4
) AS temp GROUP BY temp.jobname
my ($self) = @_;
my $arg = $self->get_form('age', 'since');
return if $self->cant_do('r_view_stat');
+
my $filter = $self->get_client_group_filter();
my ($limit, $label) = $self->get_limit(%$arg);
+03Apr08
+ebl Tweak progress bar and add Backuped files count to job status
+
02Apr08
ebl Add group statistics page
<tr>
<td> <b> __Files Examined:__ </b> </td> <td> <TMPL_VAR "files examined"></td>
</tr>
+ <tr>
+ <td> <b> __Files Backuped:__ </b> </td> <td> <TMPL_VAR files></td>
+ </tr>
<tr>
<td> <b> __Bytes:__ </b> </td> <td> <TMPL_VAR bytes></td>
</tr>
<div class="otherbox">
<form name='form1' action='?' method='GET'>
<table border='0'>
+<TMPL_UNLESS hide_level>
<tr>
<td valign='top'>
<h2>__Level__</h2>
</select>
</td>
</tr>
+</TMPL_UNLESS>
<TMPL_UNLESS hide_status>
<tr>
<td valign='top'>
<tr>
<td valign='top'>
<h2>__Since__</h2>
- <input type='text' id='since' name='since' size='17' title='YYYY-MM-DD'
+ <input type='text' id='since' name='since' size='22' title='YYYY-MM-DD'
value='<TMPL_VAR since>' class='formulaire'>
</td>
</tr>
-<br/>
<div class='titlediv'>
<h1 class='newstitle'> __Statistics__ (<TMPL_VAR label>)</h1>
</div>