[Zzzt-commits] r104 - in /trunk: i18n/ morris/ raphael/ stats/

2014-04-10 Thread lists . jjorge
Author: zecas
Date: Thu Apr 10 22:49:51 2014
New Revision: 104

URL: http://svn.gna.org/viewcvs/zzzt?rev=104&view=rev
Log:
version 1.7 : changement de framework pour les charts

Added:
trunk/morris/
trunk/morris/jquery.min.js
trunk/morris/morris-0.4.3.min.css
trunk/morris/morris-0.4.3.min.js
trunk/morris/raphael-min.js
Removed:
trunk/raphael/
Modified:
trunk/i18n/switch.php
trunk/stats/daily.php
trunk/stats/index.php
trunk/stats/monthly.php

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=104&r1=103&r2=104&view=diff

Added: trunk/morris/jquery.min.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/jquery.min.js?rev=104&view=auto

Added: trunk/morris/morris-0.4.3.min.css
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/morris-0.4.3.min.css?rev=104&view=auto

Added: trunk/morris/morris-0.4.3.min.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/morris-0.4.3.min.js?rev=104&view=auto

Added: trunk/morris/raphael-min.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/raphael-min.js?rev=104&view=auto

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=104&r1=103&r2=104&view=diff

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=104&r1=103&r2=104&view=diff

Modified: trunk/stats/monthly.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/monthly.php?rev=104&r1=103&r2=104&view=diff


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r105 - in /trunk: i18n/en.php i18n/fr.php i18n/pt.php stats/daily.php stats/index.php stats/monthly.php

2014-04-11 Thread lists . jjorge
Author: zecas
Date: Fri Apr 11 17:10:01 2014
New Revision: 105

URL: http://svn.gna.org/viewcvs/zzzt?rev=105&view=rev
Log:
use js when avalaible to calculate chart width

Modified:
trunk/i18n/en.php
trunk/i18n/fr.php
trunk/i18n/pt.php
trunk/stats/daily.php
trunk/stats/index.php
trunk/stats/monthly.php

Modified: trunk/i18n/en.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/en.php?rev=105&r1=104&r2=105&view=diff
==
--- trunk/i18n/en.php   (original)
+++ trunk/i18n/en.php   Fri Apr 11 17:10:01 2014
@@ -17,7 +17,7 @@
 */
 
 // Langue de l'application pour les jours de semaine et les mois MySQL
-define("LANG", "en_GB");
+define("LANG", "en_GB.UTF8");
 setlocale(LC_ALL, LANG);
 
 define("APPLICATION","Zzzt!");

Modified: trunk/i18n/fr.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/fr.php?rev=105&r1=104&r2=105&view=diff
==
--- trunk/i18n/fr.php   (original)
+++ trunk/i18n/fr.php   Fri Apr 11 17:10:01 2014
@@ -17,7 +17,7 @@
 */
 
 // Langue de l'application pour les jours de semaine et les mois MySQL
-define("LANG", "fr_FR");
+define("LANG", "fr_FR.UTF8");
 setlocale(LC_ALL, LANG);
 
 define("APPLICATION","Zzzt!");

Modified: trunk/i18n/pt.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/pt.php?rev=105&r1=104&r2=105&view=diff
==
--- trunk/i18n/pt.php   (original)
+++ trunk/i18n/pt.php   Fri Apr 11 17:10:01 2014
@@ -17,7 +17,7 @@
 */
 
 // Langue de l'application pour les jours de semaine et les mois MySQL
-define("LANG", "pt_PT");
+define("LANG", "pt_PT.UTF8");
 setlocale(LC_ALL, LANG);
 
 define("APPLICATION","Zzzt!");

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=105&r1=104&r2=105&view=diff
==
--- trunk/stats/daily.php   (original)
+++ trunk/stats/daily.php   Fri Apr 11 17:10:01 2014
@@ -18,7 +18,8 @@
   
   
   
-#holder { width: 1000px; height: 600px; }
+html, body { height: 95%; }
+#holder { width: 98%; height: 100%; }
   
 
 
@@ -31,10 +32,6 @@
 
   
 document.write("
"); - - - - ',''] }); + + Modified: trunk/stats/index.php URL: http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=105&r1=104&r2=105&view=diff == --- trunk/stats/index.php (original) +++ trunk/stats/index.php Fri Apr 11 17:10:01 2014 @@ -21,21 +21,26 @@ $db=new db($inverter); $heure=array(); $values=array(); - $champs=array('pac','pdc','kdy','tkk'); + $champs=array('pac','pdc','tkk'); if(!isset($_GET['day'])) $_GET['day']=date('Y-m-d'); if(!isset($_GET['width'])) $_GET['width']=1000; if(!isset($_GET['height'])) $_GET['height']=550; $sql="SELECT ROUND(DATE_FORMAT(monitor_date,'%H%i'),0) AS md, ROUND(AVG(pac),0) AS pac, ROUND(AVG(pdc),0) AS pdc, - kdy,tkk FROM zzzt + tkk FROM zzzt WHERE DATE(`monitor_date`)='{$_GET['day']}' GROUP BY md ORDER BY md ASC"; $db->query($sql); while ($row = $db->fetch()) { -if(!isset($next)) $next=$row['md'];//premier coup -$heure[]=$_GET['day'].' '.implode(':',str_split(str_pad((int)$row['md'],4,"0",STR_PAD_LEFT),2)); - $values['rendement'][]=sprintf('%.2F',$row['pac']/($row['pdc']+0.0001)*100); -foreach($champs as $c) $values[$c][]=$row[$c]; +if(isset($prev) && + ( ($prev<=$row['pdc'] && $prev+10>$row['pdc']) || ($prev>=$row['pdc'] && $prev-10<$row['pdc']) ) + ) $skip=1; else $skip=0; +if(!$skip) { + $prev=$row['pdc']; + $heure[]=$_GET['day'].' '.implode(':',str_split(str_pad((int)$row['md'],4,"0",STR_PAD_LEFT),2)); + $values['rendement'][]=sprintf('%.2F',$row['pac']/($row['pdc']+0.0001)*100); + foreach($champs as $c) $values[$c][]=$row[$c]; +} } ?> @@ -51,8 +56,9 @@ -#holderP { width: px; height: 300px; } -#holderR { width: px; height: 200px; } +table { width: 100%;} +#holderP { width: 100%; height: 300px; } +#holderR { width: 100%; height: 200px; } @@ -81,8 +87,8 @@ } ?> - document.write('') - '> + + '> @@ -151,13 +157,13 @@ $monitors[$row[5]]='#'.dechex(rand(106,254)).dechex(rand(106,254)).dechex(rand(106,254)); } echo" - $row[0]\n - ".sprint

[Zzzt-commits] r106 - /trunk/stats/yearly.php

2014-04-11 Thread lists . jjorge
Author: zecas
Date: Fri Apr 11 17:11:02 2014
New Revision: 106

URL: http://svn.gna.org/viewcvs/zzzt?rev=106&view=rev
Log:
ajout d un graphique pour l annee

Added:
trunk/stats/yearly.php

Added: trunk/stats/yearly.php
URL: http://svn.gna.org/viewcvs/zzzt/trunk/stats/yearly.php?rev=106&view=auto
==
--- trunk/stats/yearly.php  (added)
+++ trunk/stats/yearly.php  Fri Apr 11 17:11:02 2014
@@ -0,0 +1,58 @@
+
+
+
+
+ 
+  
+  
+  
+  
+  
+  
+  
+
+  
+html, body { height: 95%; }
+#holder { width: 98%; height: 100%; }
+  
+
+
+
+  
+  
+  
+  
+  
+
+  query($sql);
+  while ($row = $db->fetch()) $values[]=$row;
+?>
+
+  
+document.write("
"); + +new Morris.Area({element: 'holder', lineColors: ['#rnd_color(); ?>'], + continuousLine: false, fillOpacity: 0.5, postUnits: 'kWh', behaveLikeLine: true, parseTime: false, hideHover: 'auto', data: [ + + ], xkey: 'a', ykeys: ['y'], labels: [''] }); + + + + + + + ___ Zzzt-commits mailing list Zzzt-commits@gna.org https://mail.gna.org/listinfo/zzzt-commits

[Zzzt-commits] r107 - in /trunk: ./ config/ inverter/ stats/

2014-04-13 Thread lists . jjorge
Author: zecas
Date: Mon Apr 14 08:27:39 2014
New Revision: 107

URL: http://svn.gna.org/viewcvs/zzzt?rev=107&view=rev
Log:
bring back average for the current month

Modified:
trunk/config/1.php
trunk/config/2.php
trunk/config/3.php
trunk/config/index.php
trunk/index.php
trunk/inverter/index.php
trunk/inverter/monitor.php
trunk/stats/monthly.php

Modified: trunk/config/1.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/config/1.php?rev=107&r1=106&r2=107&view=diff
==
--- trunk/config/1.php  (original)
+++ trunk/config/1.php  Mon Apr 14 08:27:39 2014
@@ -30,11 +30,10 @@
 $_SESSION['inverter']=new inverter($_POST['model']);
 ?>
 
-
+
 
 
- 
+ 
   
   
   

Modified: trunk/config/2.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/config/2.php?rev=107&r1=106&r2=107&view=diff
==
--- trunk/config/2.php  (original)
+++ trunk/config/2.php  Mon Apr 14 08:27:39 2014
@@ -29,11 +29,10 @@
 session_start();// after the needed classes
 ?>
 
-
+
 
 
- 
+ 
   
   
   

Modified: trunk/config/3.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/config/3.php?rev=107&r1=106&r2=107&view=diff
==
--- trunk/config/3.php  (original)
+++ trunk/config/3.php  Mon Apr 14 08:27:39 2014
@@ -20,11 +20,10 @@
   $inverter=new inverter();
 ?>
 
-
+
 
 
- 
+ 
   
   
   

Modified: trunk/config/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/config/index.php?rev=107&r1=106&r2=107&view=diff
==
--- trunk/config/index.php  (original)
+++ trunk/config/index.php  Mon Apr 14 08:27:39 2014
@@ -37,11 +37,10 @@
 $_SESSION['inverter']=new inverter();
 ?>
 
-
+
 
 
- 
+ 
   
   
   

Modified: trunk/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/index.php?rev=107&r1=106&r2=107&view=diff
==
--- trunk/index.php (original)
+++ trunk/index.php Mon Apr 14 08:27:39 2014
@@ -16,11 +16,11 @@
 along with Zzzt! .  If not, see .
 */
 ?>
-
+
 
 
   Zzzt!
-  
+  
   
   
 

Modified: trunk/inverter/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/inverter/index.php?rev=107&r1=106&r2=107&view=diff
==
--- trunk/inverter/index.php(original)
+++ trunk/inverter/index.phpMon Apr 14 08:27:39 2014
@@ -20,11 +20,10 @@
   session_start();// after the needed classes
   if(!isset($_SESSION['inverter'])) {$_SESSION['inverter']=new inverter();}
 ?>
-
+
 
 
- 
+ 
   
   
   

Modified: trunk/inverter/monitor.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/inverter/monitor.php?rev=107&r1=106&r2=107&view=diff
==
--- trunk/inverter/monitor.php  (original)
+++ trunk/inverter/monitor.php  Mon Apr 14 08:27:39 2014
@@ -23,11 +23,10 @@
   $inverter->refresh();
   $_SESSION['inverter']=$inverter;
 ?>
-
+
 
 
- 
+ 
  
   
   

Modified: trunk/stats/monthly.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/monthly.php?rev=107&r1=106&r2=107&view=diff
==
--- trunk/stats/monthly.php (original)
+++ trunk/stats/monthly.php Mon Apr 14 08:27:39 2014
@@ -3,8 +3,7 @@
   session_start();// after the needed classes
   $inverter=new inverter();
   $db=new db($inverter);
-  if(!isset($_GET['year'])) $_GET['year']=date('Y');
-  $year=$mois=$annees=$values=array();
+  $year=$annees=$values=array();
 ?>
 
 
@@ -21,6 +20,7 @@
   
 html, body { height: 95%; }
 #holder { width: 98%; height: 100%; }
+#moyenne { position: absolute; right: 50px; top: 25px;}
   
 
 
@@ -59,7 +59,6 @@
   
   
-
+  
 
 
 


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r108 - /branches/1.7/

2014-04-13 Thread lists . jjorge
Author: zecas
Date: Mon Apr 14 08:32:15 2014
New Revision: 108

URL: http://svn.gna.org/viewcvs/zzzt?rev=108&view=rev
Log:
branching for release

Added:
branches/1.7/
  - copied from r107, trunk/


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r109 - in /trunk: i18n/switch.php stats/daily.php stats/index.php stats/monthly.php stats/yearly.php

2014-05-15 Thread lists . jjorge
Author: zecas
Date: Thu May 15 23:21:08 2014
New Revision: 109

URL: http://svn.gna.org/viewcvs/zzzt?rev=109&view=rev
Log:
améliorations des pages stats, dont la navigation

Modified:
trunk/i18n/switch.php
trunk/stats/daily.php
trunk/stats/index.php
trunk/stats/monthly.php
trunk/stats/yearly.php

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=109&r1=108&r2=109&view=diff
==
--- trunk/i18n/switch.php   (original)
+++ trunk/i18n/switch.php   Thu May 15 23:21:08 2014
@@ -16,7 +16,7 @@
 along with Zzzt! .  If not, see .
 */
 
-define("VERSION","1.7");
+define("VERSION","1.8");
 
 ini_set('display_errors','1');
 

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=109&r1=108&r2=109&view=diff
==
--- trunk/stats/daily.php   (original)
+++ trunk/stats/daily.php   Thu May 15 23:21:08 2014
@@ -11,7 +11,7 @@
  
   
   
-  
+  
   
   
   
@@ -54,6 +54,10 @@
 ?>
 
 new Morris.Area({element: 'holder', lineColors: ['#rnd_color();?>','#rnd_color();?>'], 
+  hoverCallback: function (index, options, content) {
+   var row = options.data[index];
+   return '" 
+ content ;
+  },
   fillOpacity: 0.5, postUnits: 'kWh', behaveLikeLine: true, smooth: false, 
hideHover: 'auto',  data: [
   http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=109&r1=108&r2=109&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Thu May 15 23:21:08 2014
@@ -21,20 +21,20 @@
   $db=new db($inverter);
   $heure=array();
   $values=array();
-  $champs=array('pac','pdc','tkk');
+  $champs=array('pac','pdc','kdy','tkk');
   if(!isset($_GET['day'])) $_GET['day']=date('Y-m-d');
   if(!isset($_GET['width'])) $_GET['width']=1000;
   if(!isset($_GET['height'])) $_GET['height']=550;
   $sql="SELECT ROUND(DATE_FORMAT(monitor_date,'%H%i'),0) AS md,
   ROUND(AVG(pac),0) AS pac,
   ROUND(AVG(pdc),0) AS pdc,
-  tkk FROM zzzt
+  kdy, tkk FROM zzzt
WHERE DATE(`monitor_date`)='{$_GET['day']}' GROUP BY md ORDER BY md 
ASC";
   $db->query($sql);
   while ($row = $db->fetch()) {
 if(isset($prev) && 
-   ( ($prev<=$row['pdc'] && $prev+10>$row['pdc']) || ($prev>=$row['pdc'] 
&& $prev-10<$row['pdc']) ) 
-  ) $skip=1; else $skip=0;
+   ( ($prev<=$row['pdc'] && $prev*1.02>=$row['pdc']) || 
($prev>=$row['pdc'] && $prev*0.98<=$row['pdc']) ) 
+  ) {$skip=1;} else {$skip=0;}
 if(!$skip) {
   $prev=$row['pdc'];
   $heure[]=$_GET['day'].' 
'.implode(':',str_split(str_pad((int)$row['md'],4,"0",STR_PAD_LEFT),2));
@@ -49,7 +49,7 @@
  
   
   
-  
+  
 
 
 
@@ -57,8 +57,8 @@
 
   
 table { width: 100%;}
-#holderP { width: 100%; height: 300px; }
-#holderR { width: 100%; height: 200px; }
+#holderP { width: 100%; height: 400px; }
+#holderR { width: 100%; height: 300px; }
   
 
 
@@ -102,16 +102,16 @@
 document.write("");
   
   
-  
-
-
-  
-
-
-  
-
-
-  
+  
+
+
+  
+
+
+  
+
+
+  
   
 
 
@@ -194,17 +194,18 @@
   
 
 
- new Morris.Area({element: 'holderP',postUnits: 'W', lineColors: 
['#FF3300','#006699'], pointSize: 0,
+ new Morris.Area({element: 'holderP', lineColors: 
['#006600','#FF3300','#006699'], pointSize: 0, smooth: false,
   behaveLikeLine: true, fillOpacity: 0.5, hideHover: 'auto', lineWidth: 
1,data: [
   
-  ], xkey: 'h', ykeys: ['a','d'], labels: ['',''] });
+  ], xkey: 'h', ykeys: ['k','a','d'], labels: [' 
(daWh)',' (W)',' (W)'] });
   
  new Morris.Line({element: 'holderR', lineColors: ['#1751A7','#006600'], 
pointSize: 0,
   hideHover: 'auto', lineWidth: 1, data: [

Modified: trunk/stats/monthly.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/monthly.php?rev=109&r1=108&r2=109&view=diff
==
--- trunk/stats/monthly.php (original)
+++ trunk/stats/monthly.php Thu May 15 23:21:08 2014
@@ -11,7 +11,7 @@
  
   [Zzzt-commits] r110 - in /trunk: i18n/switch.php stats/index.php

Author: zecas
Date: Mon Aug 25 08:12:56 2014
New Revision: 110

URL: http://svn.gna.org/viewcvs/zzzt?rev=110&view=rev
Log:
version 1.9 : checkbox for all details and utf8 fix

Modified:
trunk/i18n/switch.php
trunk/stats/index.php

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=110&r1=109&r2=110&view=diff
==
--- trunk/i18n/switch.php   (original)
+++ trunk/i18n/switch.php   Mon Aug 25 08:12:56 2014
@@ -16,7 +16,7 @@
 along with Zzzt! .  If not, see .
 */
 
-define("VERSION","1.8");
+define("VERSION","1.9");
 
 ini_set('display_errors','1');
 

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=110&r1=109&r2=110&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Mon Aug 25 08:12:56 2014
@@ -32,7 +32,7 @@
WHERE DATE(`monitor_date`)='{$_GET['day']}' GROUP BY md ORDER BY md 
ASC";
   $db->query($sql);
   while ($row = $db->fetch()) {
-if(isset($prev) && 
+if(isset($prev) && $_GET['detaille']==0 && 
( ($prev<=$row['pdc'] && $prev*1.02>=$row['pdc']) || 
($prev>=$row['pdc'] && $prev*0.98<=$row['pdc']) ) 
   ) {$skip=1;} else {$skip=0;}
 if(!$skip) {
@@ -82,13 +82,14 @@
   for($i=0;$i<10;$i++){
 $d=date('Y-m-d', strtotime($_GET['day'])-(3600*24*$i) );
$d==$_GET['day'] ? $selected='selected' : $selected='';
-   $bd=utf8_encode(strftime("%e %b 
%G",strtotime($_GET['day'])-(3600*24*$i)));
+   $bd=strftime("%e %b %G",strtotime($_GET['day'])-(3600*24*$i));
 echo "$bd\n";
   }
 ?>
   
   
   '>
+  
   
 
 


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r111 - /branches/1.9/

Author: zecas
Date: Mon Aug 25 08:23:17 2014
New Revision: 111

URL: http://svn.gna.org/viewcvs/zzzt?rev=111&view=rev
Log:
branching for release

Added:
branches/1.9/
  - copied from r110, trunk/


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r112 - in /trunk: inverter/class_db.php stats/index.php

Author: zecas
Date: Sat Nov 29 09:31:43 2014
New Revision: 112

URL: http://svn.gna.org/viewcvs/zzzt?rev=112&view=rev
Log:
fix stats

Modified:
trunk/inverter/class_db.php
trunk/stats/index.php

Modified: trunk/inverter/class_db.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/inverter/class_db.php?rev=112&r1=111&r2=112&view=diff
==
--- trunk/inverter/class_db.php (original)
+++ trunk/inverter/class_db.php Sat Nov 29 09:31:43 2014
@@ -1,4 +1,5 @@
  0.1)
 AND (`zzzt`.`pdc` = 0)
-   AND (`zzzt`.`kdy` <> `zzzt_daily`.`production`))
-   AND (date_format(`zzzt`.`monitor_date`,_utf8'%H') > 15) 
+AND (`zzzt`.`kdy` <> `zzzt_daily`.`production`))
   GROUP BY date_format(`zzzt`.`monitor_date`,_utf8'%Y-%m-%d')
   ORDER BY `zzzt`.`monitor_date` DESC;");
 
@@ -127,7 +126,7 @@
   mt_srand((double)microtime()*100);
   $c = '';
   while(strlen($c)<6){
-  $c .= sprintf("%02X", mt_rand(0, 255));
+  $c .= sprintf("%02X", mt_rand(0, 128));
   }
   return $c;
   }
@@ -135,4 +134,4 @@
 
 
 }
-?>
+?>

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=112&r1=111&r2=112&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Sat Nov 29 09:31:43 2014
@@ -138,7 +138,10 @@
   }
 
   echo "".LAST_MEASURES."";
-  $sql="SELECT * FROM zzzt WHERE DAY(monitor_date) = DAY('{$_GET['day']}') 
ORDER BY monitor_date DESC LIMIT 0,10";
+  $sql="SELECT * FROM zzzt
+ WHERE DATE(monitor_date) = '{$_GET['day']}'
+ ORDER BY monitor_date DESC
+ LIMIT 0,10";
   $db->query($sql);
   $titre=' 
'.DYR.'-'.DMT.'-'.DDY.' '.THR.':'.TMI.'
@@ -150,7 +153,7 @@
'.MONITOR.'
';
   echo '
-   '.$titre;
+   ';
   $monitors=array();
   while ($row = $db->fetch())
   {


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r113 - in /trunk: i18n/ model/ standalone_crontab/ stats/

Author: zecas
Date: Sun Jan 25 17:56:20 2015
New Revision: 113

URL: http://svn.gna.org/viewcvs/zzzt?rev=113&view=rev
Log:
new daily js graph with maximum and average - crontab echoes value is an arg is 
given

Modified:
trunk/i18n/en.php
trunk/i18n/fr.php
trunk/i18n/pt.php
trunk/i18n/switch.php
trunk/model/sm3000s.php
trunk/standalone_crontab/crontab_monitor.script
trunk/stats/daily.php
trunk/stats/index.php
trunk/stats/monthly.php
trunk/stats/yearly.php

Modified: trunk/i18n/en.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/en.php?rev=113&r1=112&r2=113&view=diff
==
--- trunk/i18n/en.php   (original)
+++ trunk/i18n/en.php   Sun Jan 25 17:56:20 2015
@@ -48,7 +48,8 @@
 define("FW_ERROR","Possible error in firmware");
 define("BY_MONTH","Production by Month");
 define("LAST_MEASURES","Last Measures");
-define("AVG_20_MN","Average for last 20 minutes : ");
+define("AVG","Average");
+define("D20_MN"," for last 20 minutes : ");
 
 define("CONFIGURE","Configure");
 define("PASSWORD","Configuration Password");

Modified: trunk/i18n/fr.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/fr.php?rev=113&r1=112&r2=113&view=diff
==
--- trunk/i18n/fr.php   (original)
+++ trunk/i18n/fr.php   Sun Jan 25 17:56:20 2015
@@ -48,7 +48,8 @@
 define("FW_ERROR","Erreur possible du micrologiciel");
 define("BY_MONTH","Production par Mois");
 define("LAST_MEASURES","Dernières mesures");
-define("AVG_20_MN","Moyenne des 20 dernières minutes : ");
+define("AVG","Moyenne");
+define("D20_MN"," des 20 dernières minutes : ");
 
 define("CONFIGURE","Configurer");
 define("PASSWORD","Mot de Passe de Configuration");

Modified: trunk/i18n/pt.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/pt.php?rev=113&r1=112&r2=113&view=diff
==
--- trunk/i18n/pt.php   (original)
+++ trunk/i18n/pt.php   Sun Jan 25 17:56:20 2015
@@ -48,7 +48,8 @@
 define("FW_ERROR","Erro possível no micro-controlador");
 define("BY_MONTH","Produção por Mês");
 define("LAST_MEASURES","Últimas medidas");
-define("AVG_20_MN","Média dos últimos 20 minutos : ");
+define("AVG","Média");
+define("D20_MN"," dos últimos 20 minutos : ");
 
 define("CONFIGURE","Configurar");
 define("PASSWORD","Senha de Configuração");

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=113&r1=112&r2=113&view=diff
==
--- trunk/i18n/switch.php   (original)
+++ trunk/i18n/switch.php   Sun Jan 25 17:56:20 2015
@@ -16,7 +16,7 @@
 along with Zzzt! .  If not, see .
 */
 
-define("VERSION","1.9");
+define("VERSION","1.10");
 
 ini_set('display_errors','1');
 

Modified: trunk/model/sm3000s.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/model/sm3000s.php?rev=113&r1=112&r2=113&view=diff
==
--- trunk/model/sm3000s.php (original)
+++ trunk/model/sm3000s.php Sun Jan 25 17:56:20 2015
@@ -30,8 +30,8 @@
 "PAC" => array("coef"=>.5, "unit"=>"W"),
 "TKK" => array("coef"=>1, "unit"=>"°C"),
 "PDC" => array("coef"=>.5, "unit"=>"W"),
+"KDY" => array("coef"=>.1, "unit"=>"kWh"),
 "KLD" => array("coef"=>.1, "unit"=>"kWh"),
-"KDY" => array("coef"=>.1, "unit"=>"kWh"),
 "KLM" => array("coef"=>1, "unit"=>"kWh"),
 "KLY" => array("coef"=>1, "unit"=>"kWh")
 );

Modified: trunk/standalone_crontab/crontab_monitor.script
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/standalone_crontab/crontab_monitor.script?rev=113&r1=112&r2=113&view=diff
==
--- trunk/standalone_crontab/crontab_monitor.script (original)
+++ trunk/standalone_crontab/crontab_monitor.script Sun Jan 25 17:56:20 2015
@@ -37,12 +37,16 @@
 if($inverter->connected){
   $url=$inverter->config['db_url'];
   $url.="?alea=$alea&monitor_date=".$inverter->status['timestamp'];
+  $info='';
   $zero=0;
+
   foreach($inverter->crontab_monitor as $k => $v) {
+$info.=' '.$inverter->status[$k].$v['unit'];
 $zero += $inverter->status[$k];
 $url.="&$k=".$inverter->status[$k];
   }
   if ($zero > 0) file($url);//some firmware answer 0 for all values around 
wake up time
+  if ( isset($argv[1]) ) echo $info; //echo information to the terminal if 
wanted
   return true;
 }
 else return false;

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=113&r1=112&r2=113&view=diff
==
--- trunk/stats/daily.php   (original)
+++ trunk/stats/daily.php   Sun Jan 25 17:56:20 2015
@@ -1,4 +1,21 @@
 http://www.gnu.org/licenses/

[Zzzt-commits] r114 - /branches/1.10/

Author: zecas
Date: Sun Jan 25 17:58:26 2015
New Revision: 114

URL: http://svn.gna.org/viewcvs/zzzt?rev=114&view=rev
Log:
branching for release

Added:
branches/1.10/
  - copied from r113, trunk/


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r115 - /trunk/standalone_crontab/zzzt

Author: zecas
Date: Sun Jan 25 19:20:27 2015
New Revision: 115

URL: http://svn.gna.org/viewcvs/zzzt?rev=115&view=rev
Log:
fix crontab file

Modified:
trunk/standalone_crontab/zzzt

Modified: trunk/standalone_crontab/zzzt
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/standalone_crontab/zzzt?rev=115&r1=114&r2=115&view=diff
==
--- trunk/standalone_crontab/zzzt   (original)
+++ trunk/standalone_crontab/zzzt   Sun Jan 25 19:20:27 2015
@@ -1,4 +1,3 @@
-#!/bin/bash
 # /etc/cron.d/zzzt: crontab fragment for zzzt
 # This tries to check the configured inverter every minute and write the 
current production to the DB
 


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r116 - /trunk/stats/daily.php

Author: zecas
Date: Wed Oct  7 08:37:59 2015
New Revision: 116

URL: http://svn.gna.org/viewcvs/zzzt?rev=116&view=rev
Log:
better ordered graph, and no more random colors

Modified:
trunk/stats/daily.php

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=116&r1=115&r2=116&view=diff
==
--- trunk/stats/daily.php   (original)
+++ trunk/stats/daily.php   Wed Oct  7 08:37:59 2015
@@ -84,9 +84,9 @@
 ?>
 
 new Morris.Area({element: 'holder',
-lineColors: ['#rnd_color();?>',
- '#rnd_color();?>',
- '#rnd_color();?>'], 
+lineColors: ['#d92525',
+ '#33A61b',
+ '#0e3d59'], 
  hoverCallback: function (index, options, content) {
  var row = options.data[index];
  return '" + content ;
@@ -100,13 +100,13 @@

-   ], xkey: 'j', ykeys: ['r', 'm', 't'], labels: ['', '', 'Record'] });
+   ], xkey: 'j', ykeys: ['t', 'm', 'r'], labels: ['', '', 'Record'] });
   
   
   


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r117 - /trunk/stats/daily.php

Author: zecas
Date: Thu Oct  8 17:10:01 2015
New Revision: 117

URL: http://svn.gna.org/viewcvs/zzzt?rev=117&view=rev
Log:
fix label order

Modified:
trunk/stats/daily.php

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=117&r1=116&r2=117&view=diff
==
--- trunk/stats/daily.php   (original)
+++ trunk/stats/daily.php   Thu Oct  8 17:10:01 2015
@@ -106,7 +106,7 @@
if($i
-   ], xkey: 'j', ykeys: ['t', 'm', 'r'], labels: ['', '', 'Record'] });
+   ], xkey: 'j', ykeys: ['t', 'm', 'r'], labels: 
['Record', '', ''] });
   
   
   


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r118 - in /trunk/morris: jquery.min.js raphael-min.js

Author: zecas
Date: Fri Oct 23 17:56:33 2015
New Revision: 118

URL: http://svn.gna.org/viewcvs/zzzt?rev=118&view=rev
Log:
updated morris and dependencies to current version

Modified:
trunk/morris/jquery.min.js
trunk/morris/raphael-min.js

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/morris/jquery.min.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/jquery.min.js?rev=118&r1=117&r2=118&view=diff

Modified: trunk/morris/raphael-min.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/raphael-min.js?rev=118&r1=117&r2=118&view=diff


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r119 - in /trunk/morris: morris.css morris.min.js

Author: zecas
Date: Fri Oct 23 17:56:45 2015
New Revision: 119

URL: http://svn.gna.org/viewcvs/zzzt?rev=119&view=rev
Log:
updated morris and dependencies to current version

Added:
trunk/morris/morris.css
trunk/morris/morris.min.js

[This mail would be too long, it was shortened to contain the URLs only.]

Added: trunk/morris/morris.css
URL: http://svn.gna.org/viewcvs/zzzt/trunk/morris/morris.css?rev=119&view=auto

Added: trunk/morris/morris.min.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/morris.min.js?rev=119&view=auto


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r121 - /trunk/i18n/switch.php

Author: zecas
Date: Fri Oct 23 17:58:16 2015
New Revision: 121

URL: http://svn.gna.org/viewcvs/zzzt?rev=121&view=rev
Log:
upgrade version to 2.0 as we are now Web 2 aware

Modified:
trunk/i18n/switch.php

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=121&r1=120&r2=121&view=diff
==
--- trunk/i18n/switch.php   (original)
+++ trunk/i18n/switch.php   Fri Oct 23 17:58:16 2015
@@ -1,6 +1,6 @@
 http://www.gnu.org/licenses/>.
 */
 
-define("VERSION","1.10");
+define("VERSION","2.0");
 
 ini_set('display_errors','1');
 


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r120 - in /trunk/stats: daily.php image_by_year.php index.php monthly.php update.js updateP.php updateR.php yearly.php

Author: zecas
Date: Fri Oct 23 17:57:44 2015
New Revision: 120

URL: http://svn.gna.org/viewcvs/zzzt?rev=120&view=rev
Log:
added an ajax update of graph every 60 seconds

Added:
trunk/stats/image_by_year.php
trunk/stats/update.js
trunk/stats/updateP.php
trunk/stats/updateR.php
Modified:
trunk/stats/daily.php
trunk/stats/index.php
trunk/stats/monthly.php
trunk/stats/yearly.php

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=120&r1=119&r2=120&view=diff

Added: trunk/stats/image_by_year.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/image_by_year.php?rev=120&view=auto

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=120&r1=119&r2=120&view=diff

Modified: trunk/stats/monthly.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/monthly.php?rev=120&r1=119&r2=120&view=diff

Added: trunk/stats/update.js
URL: http://svn.gna.org/viewcvs/zzzt/trunk/stats/update.js?rev=120&view=auto

Added: trunk/stats/updateP.php
URL: http://svn.gna.org/viewcvs/zzzt/trunk/stats/updateP.php?rev=120&view=auto

Added: trunk/stats/updateR.php
URL: http://svn.gna.org/viewcvs/zzzt/trunk/stats/updateR.php?rev=120&view=auto

Modified: trunk/stats/yearly.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/yearly.php?rev=120&r1=119&r2=120&view=diff


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r122 - /branches/2.0/

Author: zecas
Date: Fri Oct 23 17:59:52 2015
New Revision: 122

URL: http://svn.gna.org/viewcvs/zzzt?rev=122&view=rev
Log:
branching for release

Added:
branches/2.0/
  - copied from r121, trunk/


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r123 - in /trunk/stats: index.php update.js

Author: zecas
Date: Wed Oct 28 17:26:56 2015
New Revision: 123

URL: http://svn.gna.org/viewcvs/zzzt?rev=123&view=rev
Log:
add last js update

Modified:
trunk/stats/index.php
trunk/stats/update.js

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=123&r1=122&r2=123&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Wed Oct 28 17:26:56 2015
@@ -59,6 +59,7 @@
 table { width: 100%;}
 #holderP { width: 100%; height: 400px; }
 #holderR { width: 100%; height: 300px; }
+#last { position: absolute; top: 4em; right: 1em; }
   
 
 
@@ -194,6 +195,9 @@
 ?>
 
   
+  
+  
+  
   
   
 
@@ -226,7 +230,12 @@
   
  var chartR = Morris.Line({element: 'holderR', lineColors: 
['#1751A7','#006600'], pointSize: 0,
   hideHover: 'auto', lineWidth: 1, data: tabR, xkey: 'h', ykeys: ['r','t'], 
labels: ['',''] });
-  
+
+  document.getElementById("last").innerHTML = 
+tabP[tabP.length-1]['h'].substr(-5,5)+' ' +
+tabP[tabP.length-1]['a']+'W ' +
+tabP[tabP.length-1]['k']/100+'kWh';
+ 
 
   
 

Modified: trunk/stats/update.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/update.js?rev=123&r1=122&r2=123&view=diff
==
--- trunk/stats/update.js   (original)
+++ trunk/stats/update.js   Wed Oct 28 17:26:56 2015
@@ -22,6 +22,10 @@
   var reponse = JSON.parse(xhttp.responseText);
   tabP.push.apply(tabP, reponse);
   chartP.setData(tabP);
+  document.getElementById("last").innerHTML = 
+tabP[tabP.length-1]['h'].substr(-5,5)+' ' +
+tabP[tabP.length-1]['a']+'W ' +
+tabP[tabP.length-1]['k']/100+'kWh';
 }
   }
   var maintenant=encodeURIComponent(tabP[tabP.length-1]['h']);


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r124 - in /trunk/stats: index.php update.js

Author: zecas
Date: Wed Nov  4 08:32:35 2015
New Revision: 124

URL: http://svn.gna.org/viewcvs/zzzt?rev=124&view=rev
Log:
fix js case of day without any stat

Modified:
trunk/stats/index.php
trunk/stats/update.js

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=124&r1=123&r2=124&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Wed Nov  4 08:32:35 2015
@@ -59,7 +59,14 @@
 table { width: 100%;}
 #holderP { width: 100%; height: 400px; }
 #holderR { width: 100%; height: 300px; }
-#last { position: absolute; top: 4em; right: 1em; }
+#last {
+  position: absolute;
+  top: 4em;
+  right: 1em;
+  background-color: #ddd;
+  border-radius: 0.5em;
+  padding: 0.5em;
+}
   
 
 
@@ -196,7 +203,7 @@
 
   
   
-  
+  
   
   
   
@@ -231,10 +238,12 @@
  var chartR = Morris.Line({element: 'holderR', lineColors: 
['#1751A7','#006600'], pointSize: 0,
   hideHover: 'auto', lineWidth: 1, data: tabR, xkey: 'h', ykeys: ['r','t'], 
labels: ['',''] });
 
-  document.getElementById("last").innerHTML = 
-tabP[tabP.length-1]['h'].substr(-5,5)+' ' +
-tabP[tabP.length-1]['a']+'W ' +
-tabP[tabP.length-1]['k']/100+'kWh';
+  if (typeof tabP[0] !== 'undefined') {
+document.getElementById("last").innerHTML = 
+  tabP[tabP.length-1]['h'].substr(-5,5)+' ' +
+  tabP[tabP.length-1]['a']+'W ' +
+  tabP[tabP.length-1]['k']/100+'kWh';
+  }
  
 
   

Modified: trunk/stats/update.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/update.js?rev=124&r1=123&r2=124&view=diff
==
--- trunk/stats/update.js   (original)
+++ trunk/stats/update.js   Wed Nov  4 08:32:35 2015
@@ -28,7 +28,9 @@
 tabP[tabP.length-1]['k']/100+'kWh';
 }
   }
-  var maintenant=encodeURIComponent(tabP[tabP.length-1]['h']);
+  if (typeof tabP !== 'undefined') {
+var maintenant=encodeURIComponent(tabP[tabP.length-1]['h']);
+  }
 
   xhttp.open("GET", "updateP.php?datetime="+maintenant, true);
   xhttp.send();


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r125 - in /trunk: i18n/switch.php stats/updateP.php stats/updateR.php

Author: zecas
Date: Mon Nov  9 17:21:59 2015
New Revision: 125

URL: http://svn.gna.org/viewcvs/zzzt?rev=125&view=rev
Log:
no more limit the update rows

Modified:
trunk/i18n/switch.php
trunk/stats/updateP.php
trunk/stats/updateR.php

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=125&r1=124&r2=125&view=diff
==
--- trunk/i18n/switch.php   (original)
+++ trunk/i18n/switch.php   Mon Nov  9 17:21:59 2015
@@ -16,7 +16,7 @@
 along with Zzzt! .  If not, see .
 */
 
-define("VERSION","2.0");
+define("VERSION","2.1");
 
 ini_set('display_errors','1');
 

Modified: trunk/stats/updateP.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/updateP.php?rev=125&r1=124&r2=125&view=diff
==
--- trunk/stats/updateP.php (original)
+++ trunk/stats/updateP.php Mon Nov  9 17:21:59 2015
@@ -30,7 +30,7 @@
   ROUND(AVG(pac),0) AS pac,
   ROUND(AVG(pdc),0) AS pdc,
   kdy, tkk FROM zzzt
-   WHERE `monitor_date`>'{$_GET['datetime']}:59' GROUP BY md ORDER BY md 
ASC LIMIT 10";
+   WHERE `monitor_date`>'{$_GET['datetime']}:59' GROUP BY md ORDER BY md 
ASC";
   $db->query($sql);
   while ($row = $db->fetch()) {
   $prev=$row['pdc'];

Modified: trunk/stats/updateR.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/updateR.php?rev=125&r1=124&r2=125&view=diff
==
--- trunk/stats/updateR.php (original)
+++ trunk/stats/updateR.php Mon Nov  9 17:21:59 2015
@@ -30,7 +30,7 @@
   ROUND(AVG(pac),0) AS pac,
   ROUND(AVG(pdc),0) AS pdc,
   kdy, tkk FROM zzzt
-   WHERE `monitor_date`>'{$_GET['datetime']}:59' GROUP BY md ORDER BY md 
ASC LIMIT 10";
+   WHERE `monitor_date`>'{$_GET['datetime']}:59' GROUP BY md ORDER BY md 
ASC";
   $db->query($sql);
   while ($row = $db->fetch()) {
   $prev=$row['pdc'];


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r126 - in /trunk/stats: index.php update.js updateP.php updateR.php

Author: zecas
Date: Sat Nov 28 16:57:23 2015
New Revision: 126

URL: http://svn.gna.org/viewcvs/zzzt?rev=126&view=rev
Log:
html5 progress bar

Modified:
trunk/stats/index.php
trunk/stats/update.js
trunk/stats/updateP.php
trunk/stats/updateR.php

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=126&r1=125&r2=126&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Sat Nov 28 16:57:23 2015
@@ -59,7 +59,7 @@
 table { width: 100%;}
 #holderP { width: 100%; height: 400px; }
 #holderR { width: 100%; height: 300px; }
-#last {
+#etat {
   position: absolute;
   top: 4em;
   right: 1em;
@@ -203,12 +203,14 @@
 
   
   
-  
+  
+
+
+  
   
   
   
 

[Zzzt-commits] r127 - in /trunk/stats: daily.php yearly.php

Author: zecas
Date: Sun Dec 13 09:24:35 2015
New Revision: 127

URL: http://svn.gna.org/viewcvs/zzzt?rev=127&view=rev
Log:
daily stats for a year long link from yearly stats

Modified:
trunk/stats/daily.php
trunk/stats/yearly.php

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=127&r1=126&r2=127&view=diff
==
--- trunk/stats/daily.php   (original)
+++ trunk/stats/daily.php   Sun Dec 13 09:24:35 2015
@@ -62,9 +62,17 @@
 document.write("");
  
 query($sql);
   while ($row = $db->fetch()) {
$jour[]=$row['date'];

Modified: trunk/stats/yearly.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/yearly.php?rev=127&r1=126&r2=127&view=diff
==
--- trunk/stats/yearly.php  (original)
+++ trunk/stats/yearly.php  Sun Dec 13 09:24:35 2015
@@ -61,18 +61,32 @@
 
   
 document.write("
"); - -new Morris.Area({element: 'holder', lineColors: ['#rnd_color(); ?>', '#rnd_color(); ?>'], - continuousLine: false, fillOpacity: 0.5, postUnits: 'kWh', behaveLikeLine: true, parseTime: false, hideHover: 'auto', data: [ - $v) { - $partiel = str_replace(',','.',$v['partiel'] + 0);//pour la première année, on n'a pas tous les jours, et on veut des points en JS - $tableau .= "{ a: '$k', 'y': {$v['production']}, 'z': $partiel },"; - } - echo substr($tableau,0,-1); - ?> - ], xkey: 'a', ykeys: ['y','z'], labels: [ '', ''] }); + +new Morris.Area({element: 'holder', + lineColors: ['#rnd_color(); ?>', + '#rnd_color(); ?>'], + hoverCallback: function (index, options, content) { + var row = options.data[index]; + var urld = '" + row.a + ""; + var label = content.replace(row.a,urld); + return label ; +}, + continuousLine: false, + fillOpacity: 0.5, + postUnits: 'kWh', + behaveLikeLine: true, + parseTime: false, + hideHover: 'auto', + data: [ + $v) { + $partiel = str_replace(',','.',$v['partiel'] + 0);//pour la première année, on n'a pas tous les jours, et on veut des points en JS + $tableau .= "{ a: '$k', 'y': {$v['production']}, 'z': $partiel },"; +} +echo substr($tableau,0,-1); +?> +], xkey: 'a', ykeys: ['y', 'z'], labels: [ '', ''] }); ___ Zzzt-commits mailing list Zzzt-commits@gna.org https://mail.gna.org/listinfo/zzzt-commits

[Zzzt-commits] r128 - /branches/2.1/

Author: zecas
Date: Mon Dec 14 09:36:19 2015
New Revision: 128

URL: http://svn.gna.org/viewcvs/zzzt?rev=128&view=rev
Log:
branching for release

Added:
branches/2.1/
  - copied from r127, trunk/


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r129 - in /trunk: i18n/switch.php index.php stats/daily.php stats/index.php stats/monthly.php stats/yearly.php

Author: zecas
Date: Fri Jan  1 11:49:26 2016
New Revision: 129

URL: http://svn.gna.org/viewcvs/zzzt?rev=129&view=rev
Log:
code cleanup

Modified:
trunk/i18n/switch.php
trunk/index.php
trunk/stats/daily.php
trunk/stats/index.php
trunk/stats/monthly.php
trunk/stats/yearly.php

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=129&r1=128&r2=129&view=diff
==
--- trunk/i18n/switch.php   (original)
+++ trunk/i18n/switch.php   Fri Jan  1 11:49:26 2016
@@ -1,6 +1,6 @@
 http://www.gnu.org/licenses/>.
 */
 
-define("VERSION","2.1");
+define("VERSION","2.2");
 
 ini_set('display_errors','1');
 
@@ -38,4 +38,26 @@
 if(!function_exists('socket_create'))
$error=(ERROR_SOCKETS);
 
+function htmlCommun( $titre ) { ?>
+
+
+
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+html, body { height: 95%; }
+#holder { width: 98%; height: 100%; }
+#moyenne { position: absolute; right: 50px; top: 25px;}
+  
+
+
+

Modified: trunk/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/index.php?rev=129&r1=128&r2=129&view=diff
==
--- trunk/index.php (original)
+++ trunk/index.php Fri Jan  1 11:49:26 2016
@@ -15,13 +15,9 @@
 You should have received a copy of the GNU General Public License
 along with Zzzt! .  If not, see .
 */
+
+  htmlCommun('');
 ?>
-
-
-
-  Zzzt!
-  
-  
-  
-
-
+
+  
+

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=129&r1=128&r2=129&view=diff
==
--- trunk/stats/daily.php   (original)
+++ trunk/stats/daily.php   Fri Jan  1 11:49:26 2016
@@ -1,6 +1,6 @@
 
-
-
-
- 
-  
-  
-  
-  
-  
-  
-  
-  
-  
-html, body { height: 95%; }
-#holder { width: 98%; height: 100%; }
-  
-
 
 
   

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=129&r1=128&r2=129&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Fri Jan  1 11:49:26 2016
@@ -1,6 +1,6 @@
 
-
-
-
- 
-  
-  
-  
-
-
-
-
-
-  
-table { width: 100%;}
-#holderP { width: 100%; height: 400px; }
-#holderR { width: 100%; height: 300px; }
-#etat {
-  position: absolute;
-  top: 4em;
-  right: 1em;
-  background-color: #ddd;
-  border-radius: 0.5em;
-  padding: 0.5em;
-}
-  
-
+
 
   
   

Modified: trunk/stats/monthly.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/monthly.php?rev=129&r1=128&r2=129&view=diff
==
--- trunk/stats/monthly.php (original)
+++ trunk/stats/monthly.php Fri Jan  1 11:49:26 2016
@@ -1,6 +1,6 @@
 
-
-
-
- 
-  
-  
-  
-  
-  
-  
-  
-
-  
-html, body { height: 95%; }
-#holder { width: 98%; height: 100%; }
-#moyenne { position: absolute; right: 50px; top: 25px;}
-  
-
 
 
   

Modified: trunk/stats/yearly.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/yearly.php?rev=129&r1=128&r2=129&view=diff
==
--- trunk/stats/yearly.php  (original)
+++ trunk/stats/yearly.php  Fri Jan  1 11:49:26 2016
@@ -1,6 +1,6 @@
 
-
-
-
- 
-  
-  
-  
-  
-  
-  
-  
-
-  
-html, body { height: 95%; }
-#holder { width: 98%; height: 100%; }
-  
-
 
 
   
@@ -53,7 +37,7 @@
   $db->query($sql);
   while ($row = $db->fetch()) 
$values[$row['year']]['production']=$row['production'];
   $sql="SELECT YEAR(date) AS year, SUM(production) AS partiel FROM zzzt_daily
- WHERE DAYOFYEAR(date) <= DAYOFYEAR(NOW())
+ WHERE DAYOFYEAR(date) < DAYOFYEAR(NOW())
  GROUP BY YEAR(date)";
   $db->query($sql);
   while ($row = $db->fetch()) $values[$row['year']]['partiel']=$row['partiel'];


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r130 - in /trunk: morris/morris-0.4.3.min.css morris/morris-0.4.3.min.js stats/index.php

Author: zecas
Date: Wed Feb 10 10:02:13 2016
New Revision: 130

URL: http://svn.gna.org/viewcvs/zzzt?rev=130&view=rev
Log:
no update if showing past days

Removed:
trunk/morris/morris-0.4.3.min.css
trunk/morris/morris-0.4.3.min.js
Modified:
trunk/stats/index.php

[This mail would be too long, it was shortened to contain the URLs only.]

Removed: trunk/morris/morris-0.4.3.min.css
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/morris-0.4.3.min.css?rev=129&view=auto

Removed: trunk/morris/morris-0.4.3.min.js
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/morris/morris-0.4.3.min.js?rev=129&view=auto

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=130&r1=129&r2=130&view=diff


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r131 - /trunk/stats/index.php

Author: zecas
Date: Mon Feb 15 12:22:55 2016
New Revision: 131

URL: http://svn.gna.org/viewcvs/zzzt?rev=131&view=rev
Log:
correction désactivation js

Modified:
trunk/stats/index.php

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=131&r1=130&r2=131&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Mon Feb 15 12:22:55 2016
@@ -22,27 +22,27 @@
   $heure=array();
   $values=array();
   $champs=array('pac','pdc','kdy','tkk');
-  if(!isset($_GET['day'])) $_GET['day']=date('Y-m-d');
+  isset($_GET['day']) ? $day=$_GET['day'] : $day=date('Y-m-d');
   if(!isset($_GET['width'])) $_GET['width']=1000;
   if(!isset($_GET['height'])) $_GET['height']=550;
   $sql="SELECT ROUND(DATE_FORMAT(monitor_date,'%H%i'),0) AS md,
   ROUND(AVG(pac),0) AS pac,
   ROUND(AVG(pdc),0) AS pdc,
   kdy, tkk FROM zzzt
-   WHERE DATE(`monitor_date`)='{$_GET['day']}' GROUP BY md ORDER BY md 
ASC";
+   WHERE DATE(`monitor_date`)='{$day}' GROUP BY md ORDER BY md ASC";
   $db->query($sql);
   while ($row = $db->fetch()) {
 if(isset($prev) && $_GET['detaille']==0 && 
-   ( ($prev<=$row['pdc'] && $prev*1.02>=$row['pdc']) || 
($prev>=$row['pdc'] && $prev*0.98<=$row['pdc']) ) 
+   ( ($prev<=$row['pdc'] && $prev*1.3>=$row['pdc']) || ($prev>=$row['pdc'] 
&& $prev*0.7<=$row['pdc']) ) 
   ) {$skip+=1;} else {$skip=0;}
-if($skip<1 || $skip>5) {
+if($skip<1 || $skip>9) {
   $prev=$row['pdc'];
-  $heure[]=$_GET['day'].' 
'.implode(':',str_split(str_pad((int)$row['md'],4,"0",STR_PAD_LEFT),2));
+  $heure[]=$day.' 
'.implode(':',str_split(str_pad((int)$row['md'],4,"0",STR_PAD_LEFT),2));
   
$values['rendement'][]=sprintf('%.2F',$row['pac']/($row['pdc']+0.0001)*100);
   foreach($champs as $c) $values[$c][]=$row[$c];
 }
   }
-  htmlCommun($_GET['day']);
+  htmlCommun($day);
 ?>
 
 
@@ -57,16 +57,15 @@
:
   
 $bd\n";
   }
 ?>
@@ -103,11 +102,11 @@
 query($sql);
-  $ap=strftime("%e %B %G", strtotime($_GET['day']))."
+  $ap=strftime("%e %B %G", strtotime($day))."
 ";
   while ($row = $db->fetch()) $ap.=DYR." {$row['year']} : {$row['production']} 
kWh
 ";
@@ -123,7 +122,7 @@
 
   echo "".LAST_MEASURES."";
   $sql="SELECT * FROM zzzt
- WHERE DATE(monitor_date) = '{$_GET['day']}'
+ WHERE DATE(monitor_date) = '{$day}'
  ORDER BY monitor_date DESC
  LIMIT 0,10";
   $db->query($sql);
@@ -156,7 +155,7 @@
   }
   echo $titre;
   $sql="SELECT * FROM (
-   SELECT * FROM zzzt WHERE DATE(monitor_date) = '{$_GET['day']}' 
ORDER BY monitor_date ASC LIMIT 0,10 )
+   SELECT * FROM zzzt WHERE DATE(monitor_date) = '{$day}' ORDER BY 
monitor_date ASC LIMIT 0,10 )
AS zzztdebut ORDER BY monitor_date DESC";
   $db->query($sql);
   while ($row = $db->fetch())
@@ -180,7 +179,7 @@
   
   
   
-
+'>
 
   
   
@@ -204,12 +203,13 @@
 
  var tabR = [
   
   ];
   


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r132 - /trunk/stats/index.php

Author: zecas
Date: Wed Feb 17 16:48:58 2016
New Revision: 132

URL: http://svn.gna.org/viewcvs/zzzt?rev=132&view=rev
Log:
correction detaille

Modified:
trunk/stats/index.php

Modified: trunk/stats/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=132&r1=131&r2=132&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Wed Feb 17 16:48:58 2016
@@ -29,11 +29,11 @@
   ROUND(AVG(pac),0) AS pac,
   ROUND(AVG(pdc),0) AS pdc,
   kdy, tkk FROM zzzt
-   WHERE DATE(`monitor_date`)='{$day}' GROUP BY md ORDER BY md ASC";
+   WHERE DATE(`monitor_date`)='$day' GROUP BY md ORDER BY md ASC";
   $db->query($sql);
   while ($row = $db->fetch()) {
-if(isset($prev) && $_GET['detaille']==0 && 
-   ( ($prev<=$row['pdc'] && $prev*1.3>=$row['pdc']) || ($prev>=$row['pdc'] 
&& $prev*0.7<=$row['pdc']) ) 
+if(isset($prev) && !isset($_GET['detaille']) &&
+   ( ($prev<=$row['pdc'] && $prev*1.03>=$row['pdc']) || 
($prev>=$row['pdc'] && $prev*0.97<=$row['pdc']) ) 
   ) {$skip+=1;} else {$skip=0;}
 if($skip<1 || $skip>9) {
   $prev=$row['pdc'];
@@ -71,8 +71,8 @@
 ?>
   
   
-  '>
-  
+  '>
+   >
   
 
 
@@ -102,8 +102,8 @@
 query($sql);
   $ap=strftime("%e %B %G", strtotime($day))."
@@ -124,7 +124,7 @@
   $sql="SELECT * FROM zzzt
  WHERE DATE(monitor_date) = '{$day}'
  ORDER BY monitor_date DESC
- LIMIT 0,10";
+ LIMIT 0,5";
   $db->query($sql);
   $titre=' 
'.DYR.'-'.DMT.'-'.DDY.' '.THR.':'.TMI.'
@@ -155,7 +155,7 @@
   }
   echo $titre;
   $sql="SELECT * FROM (
-   SELECT * FROM zzzt WHERE DATE(monitor_date) = '{$day}' ORDER BY 
monitor_date ASC LIMIT 0,10 )
+   SELECT * FROM zzzt WHERE DATE(monitor_date) = '{$day}' ORDER BY 
monitor_date ASC LIMIT 0,5 )
AS zzztdebut ORDER BY monitor_date DESC";
   $db->query($sql);
   while ($row = $db->fetch())


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r133 - /trunk/i18n/switch.php

Author: zecas
Date: Tue May 10 13:43:08 2016
New Revision: 133

URL: http://svn.gna.org/viewcvs/zzzt?rev=133&view=rev
Log:
first mobile step

Modified:
trunk/i18n/switch.php

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=133&r1=132&r2=133&view=diff
==
--- trunk/i18n/switch.php   (original)
+++ trunk/i18n/switch.php   Tue May 10 13:43:08 2016
@@ -42,7 +42,8 @@
 
 
 
- 
+  
+  
   
   
   
@@ -60,4 +61,4 @@
 
 
 
+?>


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r134 - in /trunk: inverter/index.php stats/mobile.php

Author: zecas
Date: Fri May 20 17:34:46 2016
New Revision: 134

URL: http://svn.gna.org/viewcvs/zzzt?rev=134&view=rev
Log:
new mobile page for easier stats view on Android phones

Added:
trunk/stats/mobile.php
Modified:
trunk/inverter/index.php

Modified: trunk/inverter/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/inverter/index.php?rev=134&r1=133&r2=134&view=diff
==
--- trunk/inverter/index.php(original)
+++ trunk/inverter/index.phpFri May 20 17:34:46 2016
@@ -19,15 +19,10 @@
   if(isset($error)) exit($error);
   session_start();// after the needed classes
   if(!isset($_SESSION['inverter'])) {$_SESSION['inverter']=new inverter();}
+  
+  htmlCommun($day);
 ?>
-
-
-
- 
-  
-  
-  
-
+
 
 
 ';
 if($_SESSION['inverter']->config['db_use']){
   $db=new db($_SESSION['inverter']);
-  if($db->db_attempt)
-echo '
+  if($db->db_attempt) {
+  echo '
 
   ';
+  echo '
+
+  ';
+  }
 }
 else echo STATS_NEED_DB.'';
   }

Added: trunk/stats/mobile.php
URL: http://svn.gna.org/viewcvs/zzzt/trunk/stats/mobile.php?rev=134&view=auto
==
--- trunk/stats/mobile.php  (added)
+++ trunk/stats/mobile.php  Fri May 20 17:34:46 2016
@@ -0,0 +1,137 @@
+http://www.gnu.org/licenses/>.
+*/
+  require '../inverter/class_inverter.php';
+  session_start();// after the needed classes
+  $inverter=new inverter();
+  $db=new db($inverter);
+  $heure=array();
+  $values=array();
+  $champs=array('pac','pdc','kdy','tkk');
+  isset($_GET['day']) ? $day=$_GET['day'] : $day=date('Y-m-d');
+  $_GET['width']=465;
+  $_GET['height']=50;
+  $sql="SELECT ROUND(DATE_FORMAT(monitor_date,'%H%i'),0) AS md,
+  ROUND(AVG(pac),0) AS pac,
+  ROUND(AVG(pdc),0) AS pdc,
+  kdy, tkk FROM zzzt
+   WHERE DATE(`monitor_date`)='$day' GROUP BY md ORDER BY md ASC";
+  $db->query($sql);
+  while ($row = $db->fetch()) {
+if(isset($prev) && !isset($_GET['detaille']) &&
+   ( ($prev<=$row['pdc'] && $prev*1.03>=$row['pdc']) || 
($prev>=$row['pdc'] && $prev*0.97<=$row['pdc']) ) 
+  ) {$skip+=1;} else {$skip=0;}
+if($skip<1 || $skip>9) {
+  $prev=$row['pdc'];
+  $heure[]=$day.' 
'.implode(':',str_split(str_pad((int)$row['md'],4,"0",STR_PAD_LEFT),2));
+  
$values['rendement'][]=sprintf('%.2F',$row['pac']/($row['pdc']+0.0001)*100);
+  foreach($champs as $c) $values[$c][]=$row[$c];
+}
+  }
+  htmlCommun($day);
+  $fixe="image_day.php?width={$_GET['width']}&data=";
+
+?>
+
+
+  
+  
+  
+  
+  
+
+query($sql);
+  $ap=strftime("%e %B %G", strtotime($day))."
+";
+  while ($row = $db->fetch()) $ap.=DYR." {$row['year']} : {$row['production']} 
kWh
+";
+
+  // Average for last 20 minutes
+  $db->query("SELECT MIN(kdy) FROM `zzzt` WHERE `monitor_date` BETWEEN 
SUBTIME(NOW(),'00:21:00') and SUBTIME(NOW(),'00:19:00')");
+  list($kdy20)= $db->fetch();
+  if ($kdy20 != NULL) {
+$db->query("SELECT kdy FROM `zzzt` ORDER BY monitor_date DESC LIMIT 0,1");
+list($kdynow)= $db->fetch();
+$ap.=AVG.D20_MN. ($kdynow-$kdy20)*3000 ." W";
+  }
+
+  $sql="SELECT * FROM zzzt
+ WHERE DATE(monitor_date) = '{$day}'
+ ORDER BY monitor_date DESC
+ LIMIT 0,1";
+  $db->query($sql);
+  $titre=' 
+   '.DYR.'-'.DMT.'-'.DDY.' '.THR.':'.TMI.'
+   '.PDC.'
+   '.KDY.'
+   '.TKK.'
+   ';
+  echo '
+   ';
+  $monitors=array();
+  while ($row = $db->fetch())
+  {
+if(!array_key_exists($row[5],$monitors)) {
+  
$monitors[$row[5]]='#'.dechex(rand(106,254)).dechex(rand(106,254)).dechex(rand(106,254));
+}
+   echo"
+   $row[0]
+   $row[2]
+   $row[3]
+   $row[4]
+   ";
+  }
+  echo $titre;
+  $sql="SELECT * FROM (
+   SELECT * FROM zzzt WHERE DATE(monitor_date) = '{$day}' ORDER BY 
monitor_date ASC LIMIT 0,1 )
+   AS zzztdebut ORDER BY monitor_date DESC";
+  $db->query($sql);
+  while ($row = $db->fetch())
+  {
+if(!array_key_exists($row[5],$monitors)) {
+  
$monitors[$row[5]]='#'.dechex(rand(106,254)).dechex(rand(106,254)).dechex(rand(106,254));
+}
+   echo"
+   $row[0]
+   $row[2]
+   $row[3]
+   $row[4]
+   ";
+  }
+  echo '';
+?>
+
+
+  
+
+
+  
+  
+  
+  
+
+  
+  
+  
+
+


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r135 - in /trunk: i18n/switch.php stats/image_day.php stats/mobile.php

Author: zecas
Date: Sun May 22 17:04:39 2016
New Revision: 135

URL: http://svn.gna.org/viewcvs/zzzt?rev=135&view=rev
Log:
specific page for an android 320x480px screen device

Modified:
trunk/i18n/switch.php
trunk/stats/image_day.php
trunk/stats/mobile.php

Modified: trunk/i18n/switch.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/i18n/switch.php?rev=135&r1=134&r2=135&view=diff
==
--- trunk/i18n/switch.php   (original)
+++ trunk/i18n/switch.php   Sun May 22 17:04:39 2016
@@ -43,7 +43,7 @@
 
 
   
-  
+   
   
   
   
@@ -57,8 +57,20 @@
 html, body { height: 95%; }
 #holder { width: 98%; height: 100%; }
 #moyenne { position: absolute; right: 50px; top: 25px;}
+
+
+div.pag a {
+  float: left;
+  padding: 1em;
+  border: 1px solid black;
+  margin: 0.5em;
+  background: #c3;
+  color: black;
+  text-decoration: none;
+} 
+
   
 
 
 
+?>

Modified: trunk/stats/image_day.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/image_day.php?rev=135&r1=134&r2=135&view=diff
==
--- trunk/stats/image_day.php   (original)
+++ trunk/stats/image_day.php   Sun May 22 17:04:39 2016
@@ -59,7 +59,7 @@
 // $graph->setAntiAliasing(TRUE);
 $group = new PlotGroup;
 $group->grid->setType(Line::DASHED);
-$group->grid->setInterval(1,10);
+$group->grid->setInterval(1,100);
 
 $group->setPadding(-1, 1, 5, 15);
 
@@ -85,7 +85,7 @@
$plot->mark->setType(Mark::CIRCLE);
$plot->mark->setSize(1);
$plot->label->set($value);
-   $plot->label->setInterval(30);//toutes les 3 valeurs
+   $plot->label->setInterval(60);//toutes les 6 valeurs
$plot->label->hideFirst(TRUE);
$plot->label->setPadding(1, 1, 1, 1);
$plot->label->setCallbackFunction('format');
@@ -109,12 +109,12 @@
 // heures en bas
 function setTime($value) {
global $heure;
-   if($value % 30 == 1) $return=$heure[$value];
+   if($value % 120 == 1) $return=$heure[$value];
else $return='';
return $return;
 }
 $group->axis->bottom->label->setCallbackFunction('setTime');
-$group->axis->bottom->setTickInterval(10);
+$group->axis->bottom->setTickInterval(60);
 //l�gende
 $group->legend->setPosition(0.7, rand(1,5)/10);
 $group->legend->setBackgroundColor(new Color(255, 255, 255, 255));

Modified: trunk/stats/mobile.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/mobile.php?rev=135&r1=134&r2=135&view=diff
==
--- trunk/stats/mobile.php  (original)
+++ trunk/stats/mobile.php  Sun May 22 17:04:39 2016
@@ -23,7 +23,7 @@
   $values=array();
   $champs=array('pac','pdc','kdy','tkk');
   isset($_GET['day']) ? $day=$_GET['day'] : $day=date('Y-m-d');
-  $_GET['width']=465;
+  $_GET['width']=470;
   $_GET['height']=50;
   $sql="SELECT ROUND(DATE_FORMAT(monitor_date,'%H%i'),0) AS md,
   ROUND(AVG(pac),0) AS pac,
@@ -47,10 +47,10 @@
 
 ?>
 
-
+
   
   
-  
+  
   
   
 
@@ -118,19 +118,27 @@
$row[4]
";
   }
-  echo '';
+  $sql="SELECT date,production FROM zzzt_daily
+  ORDER BY date DESC LIMIT 1";
+  $db->query($sql);
+  $row=$db->fetch();
 ?>
 
-
+
   
 
-
-  
-  
-  
-  
+
+  
 
   
+  
+  
+
+
+
+
+
+  
   
   
 


___
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits


[Zzzt-commits] r136 - in /trunk: index.php stats/daily.php stats/index.php stats/monthly.php stats/yearly.php

Author: zecas
Date: Mon May 30 21:06:03 2016
New Revision: 136

URL: http://svn.gna.org/viewcvs/zzzt?rev=136&view=rev
Log:
resizable graphs

Modified:
trunk/index.php
trunk/stats/daily.php
trunk/stats/index.php
trunk/stats/monthly.php
trunk/stats/yearly.php

Modified: trunk/index.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/index.php?rev=136&r1=135&r2=136&view=diff
==
--- trunk/index.php (original)
+++ trunk/index.php Mon May 30 21:06:03 2016
@@ -1,6 +1,6 @@
 http://www.gnu.org/licenses/>.
 */
-
+  require 'i18n/switch.php';
   htmlCommun('');
 ?>
 

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=136&r1=135&r2=136&view=diff
==
--- trunk/stats/daily.php   (original)
+++ trunk/stats/daily.php   Mon May 30 21:06:03 2016
@@ -88,7 +88,9 @@
  behaveLikeLine: true,
  smooth: false,
  hideHover: 'auto',
- data: [
+  resize: true,
+  redraw: true,
+  data: [
http://svn.gna.org/viewcvs/zzzt/trunk/stats/index.php?rev=136&r1=135&r2=136&view=diff
==
--- trunk/stats/index.php   (original)
+++ trunk/stats/index.php   Mon May 30 21:06:03 2016
@@ -29,11 +29,11 @@
   ROUND(AVG(pac),0) AS pac,
   ROUND(AVG(pdc),0) AS pdc,
   kdy, tkk FROM zzzt
-   WHERE DATE(`monitor_date`)='$day' GROUP BY md ORDER BY md ASC";
+WHERE DATE(`monitor_date`)='$day' GROUP BY md ORDER BY md ASC";
   $db->query($sql);
   while ($row = $db->fetch()) {
 if(isset($prev) && !isset($_GET['detaille']) &&
-   ( ($prev<=$row['pdc'] && $prev*1.03>=$row['pdc']) || 
($prev>=$row['pdc'] && $prev*0.97<=$row['pdc']) ) 
+( ($prev<=$row['pdc'] && $prev*1.03>=$row['pdc']) || 
($prev>=$row['pdc'] && $prev*0.97<=$row['pdc']) ) 
   ) {$skip+=1;} else {$skip=0;}
 if($skip<1 || $skip>9) {
   $prev=$row['pdc'];
@@ -64,8 +64,8 @@
 
   for($i=0;$i<10;$i++){
 $d=date('Y-m-d', strtotime($day)-(3600*24*$i) );
-   $d==$day ? $selected='selected' : $selected='';
-   $bd=strftime("%e %b %G",strtotime($day)-(3600*24*$i));
+$d==$day ? $selected='selected' : $selected='';
+$bd=strftime("%e %b %G",strtotime($day)-(3600*24*$i));
 echo "$bd\n";
   }
 ?>
@@ -102,9 +102,9 @@
 query($sql);
   $ap=strftime("%e %B %G", strtotime($day))."
 ";
@@ -122,56 +122,56 @@
 
   echo "".LAST_MEASURES."";
   $sql="SELECT * FROM zzzt
- WHERE DATE(monitor_date) = '{$day}'
- ORDER BY monitor_date DESC
- LIMIT 0,5";
-  $db->query($sql);
-  $titre=' 
-   '.DYR.'-'.DMT.'-'.DDY.' '.THR.':'.TMI.'
-   '.EFFICIENCY.'
-   '.PAC.'
-   '.PDC.'
-   '.KDY.'
-   '.TKK.'
-   '.MONITOR.'
-   ';
+  WHERE DATE(monitor_date) = '{$day}'
+  ORDER BY monitor_date DESC
+  LIMIT 0,5";
+  $db->query($sql);
+  $titre='  
+'.DYR.'-'.DMT.'-'.DDY.' '.THR.':'.TMI.'
+'.EFFICIENCY.'
+'.PAC.'
+'.PDC.'
+'.KDY.'
+'.TKK.'
+'.MONITOR.'
+';
   echo '
-   ';
+';
   $monitors=array();
   while ($row = $db->fetch())
   {
 if(!array_key_exists($row[5],$monitors)) {
   
$monitors[$row[5]]='#'.dechex(rand(106,254)).dechex(rand(106,254)).dechex(rand(106,254));
 }
-   echo"
-   $row[0]
-   ".sprintf('%.2F',$row[1]*100/($row[2]+0.0001))."%
-   $row[1]
-   $row[2]
-   $row[3]
-   $row[4]
-   $row[5]
-   ";
+echo"
+$row[0]
+".sprintf('%.2F',$row[1]*100/($row[2]+0.0001))."%
+$row[1]
+$row[2]
+$row[3]
+$row[4]
+$row[5]
+";
   }
   echo $titre;
   $sql="SELECT * FROM (
-   SELECT * FROM zzzt WHERE DATE(monitor_date) = '{$day}' ORDER BY 
monitor_date ASC LIMIT 0,5 )
-   AS zzztdebut ORDER BY monitor_date DESC";
+SELECT * FROM zzzt WHERE DATE(monitor_date) = '{$day}' ORDER BY 
monitor_date ASC LIMIT 0,5 )
+AS zzztdebut ORDER BY monitor_date DESC";
   $db->query($sql);
   while ($row = $db->fetch())
   {
 if(!array_key_exists($row[5],$monitors)) {
   
$monitors[$row[5]]='#'.dechex(rand(106,254)).dechex(rand(106,254)).dechex(rand(106,254));
 }