www/js/mon_fermenter.js

Mon, 07 Jan 2019 22:35:32 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 07 Jan 2019 22:35:32 +0100
changeset 182
58618d93c0fb
parent 180
a5aa3502310c
child 183
a810539dc218
permissions
-rw-r--r--

Fermenter monitor screen added control boxes and LED's.

180
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*****************************************************************************
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * Copyright (C) 2019
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * Michiel Broek <mbroek at mbse dot eu>
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 *
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * This file is part of BMS
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 *
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 * This is free software; you can redistribute it and/or modify it
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * under the terms of the GNU General Public License as published by the
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * Free Software Foundation; either version 2, or (at your option) any
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * later version.
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 *
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 * Brewery Management System istributed in the hope that it will be useful, but
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 * General Public License for more details.
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 *
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 * along with ThermFerm; see the file COPYING. If not, write to the Free
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 *****************************************************************************/
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 $(document).ready(function () {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 var bname = '';
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 var bcode = '';
182
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
28 var yl = 12; // Normal yeast temp range
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
29 var yh = 24;
180
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 var gaugeoptions = {
182
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
32 min: 0, max: 40, width: 375, height: 375,
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
33 ranges: [{ startValue: 0, endValue: yl, style: { fill: '#3399FF', stroke: '#3399FF' }, endWidth: 10, startWidth: 10 },
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
34 { startValue: yl, endValue: yh, style: { fill: '#00CC33', stroke: '#00CC33' }, endWidth: 10, startWidth: 10 },
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
35 { startValue: yh, endValue: 40, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }, endWidth: 10, startWidth: 10 }],
180
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 ticksMinor: { interval: 1, size: '5%' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 ticksMajor: { interval: 5, size: '9%' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 labels: { interval: 5 },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 style: { fill: '#eeeeee', stroke: '#666666' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 value: 0,
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 colorScheme: 'scheme05',
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 animationDuration: 1200
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43 };
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44 var gaugeSmalloptions = {
182
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
45 min: -15, max: 25, width: 190, height: 190,
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
46 ranges: [{ startValue: -15, endValue: 0, startWidth: 5, endWidth: 5, style: { fill: '#3399FF', stroke: '#3399FF' }},
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
47 { startValue: 0, endValue: 10, startWidth: 5, endWidth: 5, style: { fill: '#00CC33', stroke: '#00CC33' }},
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
48 { startValue: 10, endValue: 25, startWidth: 5, endWidth: 5, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }}],
180
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49 ticksMinor: { interval: 1, size: '5%' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
50 ticksMajor: { interval: 5, size: '9%' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51 labels: { interval: 5 },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52 style: { fill: '#eeeeee', stroke: '#666666' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53 value: 0,
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 colorScheme: 'scheme05',
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
55 animationDuration: 1200,
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
56 caption: { value: 'Chiller', position: 'bottom', offset: [0, 10] }
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
57 };
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
58
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
59 $("#gaugeContainer_air").jqxGauge( gaugeoptions );
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
60 $("#gaugeContainer_air").jqxGauge( { caption: { value: 'Air', position: 'bottom', offset: [0, 10] }} );
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
61 $("#gaugeContainer_beer").jqxGauge( gaugeoptions );
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
62 $("#gaugeContainer_beer").jqxGauge( { caption: { value: 'Beer', position: 'bottom', offset: [0, 10] }} );
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
63 $("#gaugeContainer_chiller").jqxGauge( gaugeSmalloptions );
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
64
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
65 var url = "getfermenter.php?uuid='" + my_uuid + "'";
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
66 var source = {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
67 datatype: "json",
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
68 datafields: [
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
69 { name: 'record', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
70 { name: 'uuid', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
71 { name: 'alias', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
72 { name: 'node', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
73 { name: 'online', type: 'bool' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
74 { name: 'beercode', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
75 { name: 'beername', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
76 { name: 'air_state', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77 { name: 'air_temperature', type: 'float' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 { name: 'beer_state', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 { name: 'beer_temperature', type: 'float' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
80 { name: 'chiller_state', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
81 { name: 'chiller_temperature', type: 'float' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
82 { name: 'heater_state', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83 { name: 'heater_usage', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
84 { name: 'cooler_state', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
85 { name: 'cooler_usage', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
86 { name: 'fan_state', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
87 { name: 'fan_usage', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
88 { name: 'light_state', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
89 { name: 'light_usage', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
90 { name: 'door_state', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
91 { name: 'psu_state', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
92 { name: 'mode', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
93 { name: 'alarm', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
94 { name: 'setpoint_high', type: 'float' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 { name: 'setpoint_low', type: 'float' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96 { name: 'profile_uuid', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
97 { name: 'profile_name', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
98 { name: 'profile_state', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
99 { name: 'profile_precent', type: 'int' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
100 { name: 'profile_inittemp_high', type: 'float' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
101 { name: 'profile_inittemp_low', type: 'float' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
102 { name: 'profile_steps', type: 'string' },
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
103 { name: 'stage', type: 'string' }
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
104 ],
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
105 id: 'record',
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
106 url: url
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
107 };
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
108
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
109 var dataAdapter = new $.jqx.dataAdapter(source, {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
110 loadComplete: function (records) {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
111 var record = dataAdapter.records[0];
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
112 var oline = (record.online) ? "On-line" : "Off-line";
182
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
113 var html = "<table style='width: 100%; padding: 10px;'>";
180
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
114 html += "<tr><th colspan=2>Klimaatkast overzicht</th></tr>";
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
115 html += "<tr><td>Uuid</td><td>" + record.uuid + "</td></tr>";
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
116 html += "<tr><td>Systeem</td><td>" + record.node + "/" + record.alias + " " + oline + "</td></tr>";
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
117 html += "<tr><td>Bier</td><td>" + record.beercode + " - " + record.beername + "</td></tr>";
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
118 html += "<tr><td>Werking</td><td>" + record.mode + "</td></tr>";
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
119 html += "<tr><td>Fase</td><td>" + record.stage + "</td></tr>"
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
120 html += "</<table>";
182
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
121 $("#fermenter_info").html(html);
180
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
122 bcode = record.beercode;
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
123 bname = record.beername;
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
124
182
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
125 if (record.online && (record.mode != "OFF")) {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
126 $("#fermentor_powerled").html('<div class="LEDblue_on"></div>Power');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
127 } else {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
128 $("#fermentor_powerled").html('<div class="LEDblue_off"></div>Power');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
129 }
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
130 if (record.online && (record.alarm != "0")) {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
131 $("#fermentor_alarmled").html('<div class="LEDred_on"></div>Alarm');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
132 } else {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
133 $("#fermentor_alarmled").html('<div class="LEDred_off"></div>Alarm');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
134 }
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
135
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
136 $("#target_lo").html(record.setpoint_low.toFixed(1));
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
137 $("#target_hi").html(record.setpoint_high.toFixed(1));
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
138 $("#load_air").html(record.air_temperature.toFixed(3));
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
139 $("#load_beer").html(record.beer_temperature.toFixed(3));
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
140
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
141 if (record.online && (record.heater_state != "0")) {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
142 $("#fermentor_led1").html('<div class="LEDgreen_on"></div>Heat');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
143 } else {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
144 $("#fermentor_led1").html('<div class="LEDgreen_off"></div>Heat');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
145 }
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
146 if (record.online && (record.cooler_state != "0")) {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
147 $("#fermentor_led2").html('<div class="LEDgreen_on"></div>Cool');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
148 } else {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
149 $("#fermentor_led2").html('<div class="LEDgreen_off"></div>Cool');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
150 }
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
151 if (record.online && (record.fan_state != "0")) {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
152 $("#fermentor_led3").html('<div class="LEDgreen_on"></div>Fan');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
153 } else {
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
154 $("#fermentor_led3").html('<div class="LEDgreen_off"></div>Fan');
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
155 }
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
156
58618d93c0fb Fermenter monitor screen added control boxes and LED's.
Michiel Broek <mbroek@mbse.eu>
parents: 180
diff changeset
157
180
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
158 $('#gaugeContainer_air').jqxGauge({ value: record.air_temperature });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
159 if (record.online && (record.air_state == "OK")) {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
160 $("#gaugeContainer_air").jqxGauge({ disabled: false });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
161 } else {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
162 $("#gaugeContainer_air").jqxGauge({ disabled: true });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
163 }
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
164 $('#gaugeContainer_beer').jqxGauge({ value: record.beer_temperature });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
165 if (record.online && (record.beer_state == "OK")) {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
166 $("#gaugeContainer_beer").jqxGauge({ disabled: false });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
167 } else {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
168 $("#gaugeContainer_beer").jqxGauge({ disabled: true });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
169 }
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
170 $("#gaugeContainer_chiller").jqxGauge({ value: record.chiller_temperature });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
171 if (record.online && (record.chiller_state == "OK")) {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
172 $("#gaugeContainer_chiller").jqxGauge({ disabled: false });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
173 } else {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
174 $("#gaugeContainer_chiller").jqxGauge({ disabled: true });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
175 }
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
176 }
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
177 });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
178
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
179 // Get the data immediatly and then at regular intervals to refresh.
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
180 dataAdapter.dataBind();
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
181 setInterval(function(){
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
182 dataAdapter.dataBind();
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
183 }, 10000);
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
184
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
185 // The chart button.
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
186 $("#FLog").jqxButton({ template: "info", width: '150px', theme: theme });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
187 $("#FLog").click(function () {
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
188 var url="log_fermentation.php?code=" + bcode + "&name=" + bname;
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
189 window.open(url);
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
190 });
a5aa3502310c Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
191 });

mercurial