]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Fix bad statistics
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 7 Nov 2008 17:10:44 +0000 (17:10 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Fri, 7 Nov 2008 17:10:44 +0000 (17:10 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8014 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/lang/en/tpl/display_stats.tpl
gui/bweb/lang/es/tpl/display_stats.tpl
gui/bweb/lang/fr/tpl/display_stats.tpl
gui/bweb/tpl/display_stats.tpl

index adf899a8add16feccaa5ad55d476f7950665f17a..60622295ce30151a6310c6cad46b797f32ad4d29 100644 (file)
@@ -17,16 +17,16 @@ var data = new Array();
 
 var nb_job=<TMPL_IF nb_job><TMPL_VAR nb_job><TMPL_ELSE>0</TMPL_IF>;
 var nb_err=<TMPL_IF nb_err><TMPL_VAR nb_err><TMPL_ELSE>0</TMPL_IF>;
-var t_ok = (nb_job - nb_err)/(nb_job + 0.0001)*100;
-
+var t_ok = Math.abs((nb_job - nb_err)/(nb_job + nb_err + 0.0001)*100);
+var nb_byte = <TMPL_IF nb_byte><TMPL_VAR nb_byte><TMPL_ELSE>0</TMPL_IF>;
 data.push( 
   new Array( "<TMPL_VAR name>", 
             nb_job,
              nb_err,
              t_ok.toFixed(2),
             "<TMPL_VAR nb_resto>",
-            human_size(<TMPL_VAR nb_byte>),
-            <TMPL_VAR nb_byte>,
+            human_size(nb_byte),
+            nb_byte,
             "<TMPL_VAR nb_file>"
              )
 ) ; 
index a15aecc05d5cd1b47d65bc93fc5e58a63bc7e249..da9a929052bdf40b7411684cb6ee44a232a863d8 100644 (file)
@@ -17,16 +17,16 @@ var data = new Array();
 
 var nb_job=<TMPL_IF nb_job><TMPL_VAR nb_job><TMPL_ELSE>0</TMPL_IF>;
 var nb_err=<TMPL_IF nb_err><TMPL_VAR nb_err><TMPL_ELSE>0</TMPL_IF>;
-var t_ok = (nb_job - nb_err)/(nb_job + 0.0001)*100;
-
+var t_ok = Math.abs((nb_job - nb_err)/(nb_job + nb_err + 0.0001)*100);
+var nb_byte = <TMPL_IF nb_byte><TMPL_VAR nb_byte><TMPL_ELSE>0</TMPL_IF>;
 data.push( 
   new Array( "<TMPL_VAR name>", 
             nb_job,
              nb_err,
              t_ok.toFixed(2),
             "<TMPL_VAR nb_resto>",
-            human_size(<TMPL_VAR nb_byte>),
-            <TMPL_VAR nb_byte>,
+            human_size(nb_byte),
+            nb_byte,
             "<TMPL_VAR nb_file>"
              )
 ) ; 
index 185838eb759e30ad7374594eef4efbd4777a80b4..65fd1293d5e3810660ed158a84137e96e61be6ce 100644 (file)
@@ -17,16 +17,16 @@ var data = new Array();
 
 var nb_job=<TMPL_IF nb_job><TMPL_VAR nb_job><TMPL_ELSE>0</TMPL_IF>;
 var nb_err=<TMPL_IF nb_err><TMPL_VAR nb_err><TMPL_ELSE>0</TMPL_IF>;
-var t_ok = (nb_job - nb_err)/(nb_job + 0.0001)*100;
-
+var t_ok = Math.abs((nb_job - nb_err)/(nb_job + nb_err + 0.0001)*100);
+var nb_byte = <TMPL_IF nb_byte><TMPL_VAR nb_byte><TMPL_ELSE>0</TMPL_IF>;
 data.push( 
   new Array( "<TMPL_VAR name>", 
             nb_job,
              nb_err,
              t_ok.toFixed(2),
             "<TMPL_VAR nb_resto>",
-            human_size(<TMPL_VAR nb_byte>),
-            <TMPL_VAR nb_byte>,
+            human_size(nb_byte),
+            nb_byte,
             "<TMPL_VAR nb_file>"
              )
 ) ; 
index cef66e9e4f40f7bb0b6c191ce10e0446537c768c..0de7d60c972dce439e3b3000dcf75fc216bfa2b4 100644 (file)
@@ -17,16 +17,16 @@ var data = new Array();
 
 var nb_job=<TMPL_IF nb_job><TMPL_VAR nb_job><TMPL_ELSE>0</TMPL_IF>;
 var nb_err=<TMPL_IF nb_err><TMPL_VAR nb_err><TMPL_ELSE>0</TMPL_IF>;
-var t_ok = (nb_job - nb_err)/(nb_job + 0.0001)*100;
-
+var t_ok = Math.abs((nb_job - nb_err)/(nb_job + nb_err + 0.0001)*100);
+var nb_byte = <TMPL_IF nb_byte><TMPL_VAR nb_byte><TMPL_ELSE>0</TMPL_IF>;
 data.push( 
   new Array( "<TMPL_VAR name>", 
             nb_job,
              nb_err,
              t_ok.toFixed(2),
             "<TMPL_VAR nb_resto>",
-            human_size(<TMPL_VAR nb_byte>),
-            <TMPL_VAR nb_byte>,
+            human_size(nb_byte),
+            nb_byte,
             "<TMPL_VAR nb_file>"
              )
 ) ;