Browse code

minor revision

Gandolf authored on 07/06/2021 21:24:13
Showing 1 changed files
1 1
old mode 100644
2 2
new mode 100755
... ...
@@ -176,12 +176,11 @@ function createChart($chartFile, $dataItem, $label, $title, $begin,
176 176
     if ($addTrend == 0) {
177 177
         $cmd .= "LINE1:dSeries#0400ff ";
178 178
     } elseif ($addTrend == 1) {
179
-        $cmdfmt = "CDEF:smoothed=dSeries,%s,TREND LINE3:smoothed#ff0000 ";
179
+        $cmdfmt = "CDEF:smoothed=dSeries,%s,TREND LINE2:smoothed#006600 ";
180 180
         $cmd .= sprintf($cmdfmt, $trendWindow);
181 181
     } elseif ($addTrend == 2) {
182 182
         $cmd .= "LINE1:dSeries#0400ff ";
183
-        $cmdfmt = "CDEF:smoothed=dSeries,%s,TREND LINE3:smoothed#ff0000 ";
184
-        #$cmdfmt = "CDEF:smoothed=dSeries,%s,XYZZY LINE3:smoothed#ff0000 ";
183
+        $cmdfmt = "CDEF:smoothed=dSeries,%s,TREND LINE2:smoothed#006600 ";
185 184
         $cmd .=  sprintf($cmdfmt, $trendWindow);
186 185
     }
187 186
      
Browse code

reorg_20202027

Gandolf authored on 10/27/2020 20:25:34
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,205 @@
1
+<html>
2
+<!-- Courtsey ruler
3
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
4
+-->
5
+<head>
6
+<style>
7
+p {
8
+    font: 14px ariel, sans serif;
9
+}
10
+#errorMsg {
11
+    font:bold 18px arial,sans-serif;
12
+    color:red;
13
+    text-align:center;
14
+}
15
+.chartContainer {
16
+    padding: 2px;
17
+}
18
+img.chart {
19
+    width:100%;
20
+}
21
+</style>
22
+</head>
23
+<body>
24
+
25
+<?php
26
+/*
27
+ Script: arednsig.php
28
+
29
+ Description: This scripts generates on the server charts showing
30
+ signal data spanning the period supplied by the user.  The script
31
+ does the following:
32
+    - converts user supplied dates to  epoch time
33
+    - gets the times of the first and last data point in the round
34
+      robin database (RRD)
35
+    - from above validates user supplied begin and end dates
36
+    - creates charts of the specified period
37
+
38
+ Copyright 2020 Jeff Owrey
39
+    This program is free software: you can redistribute it and/or modify
40
+    it under the terms of the GNU General Public License as published by
41
+    the Free Software Foundation, either version 3 of the License, or
42
+    (at your option) any later version.
43
+
44
+    This program is distributed in the hope that it will be useful,
45
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
46
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
47
+    GNU General Public License for more details.
48
+
49
+    You should have received a copy of the GNU General Public License
50
+    along with this program.  If not, see http://www.gnu.org/license.
51
+
52
+ Revision History
53
+   * v20 released 18 Jan 2020 by J L Owrey; first release
54
+*/
55
+
56
+# Define global constants
57
+
58
+# round robin database file
59
+define("_RRD_FILE", str_replace("public_html/arednsig/arednsig.php",
60
+                                "database/arednsigData.rrd",
61
+                                $_SERVER["SCRIPT_FILENAME"]));
62
+# charts html directory
63
+define("_CHART_DIRECTORY", str_replace("arednsig.php",
64
+                                       "dynamic/",
65
+                                       $_SERVER["SCRIPT_FILENAME"]));
66
+# standard chart width in pixels
67