130 loadError: function(jqXHR, status, error) { |
130 loadError: function(jqXHR, status, error) { |
131 $('#err').text(status + ' ' + error); |
131 $('#err').text(status + ' ' + error); |
132 }, |
132 }, |
133 }), |
133 }), |
134 gaugeoptions = { |
134 gaugeoptions = { |
135 min: 0, max: 40, width: 375, height: 375, |
135 min: 0, max: 45, width: 375, height: 375, |
136 ranges: [{ startValue: 0, endValue: yl, style: { fill: '#3399FF', stroke: '#3399FF' }, endWidth: 10, startWidth: 10 }, |
136 ranges: [{ startValue: 0, endValue: yl, style: { fill: '#3399FF', stroke: '#3399FF' }, endWidth: 10, startWidth: 10 }, |
137 { startValue: yl, endValue: yh, style: { fill: '#00CC33', stroke: '#00CC33' }, endWidth: 10, startWidth: 10 }, |
137 { startValue: yl, endValue: yh, style: { fill: '#00CC33', stroke: '#00CC33' }, endWidth: 10, startWidth: 10 }, |
138 { startValue: yh, endValue: 40, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }, endWidth: 10, startWidth: 10 }], |
138 { startValue: yh, endValue: 45, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }, endWidth: 10, startWidth: 10 }], |
139 ticksMinor: { interval: 1, size: '5%' }, |
139 ticksMinor: { interval: 1, size: '5%' }, |
140 ticksMajor: { interval: 5, size: '9%' }, |
140 ticksMajor: { interval: 5, size: '9%' }, |
141 labels: { interval: 5 }, |
141 labels: { interval: 5 }, |
142 style: { fill: '#eeeeee', stroke: '#666666' }, |
142 style: { fill: '#eeeeee', stroke: '#666666' }, |
143 value: 0, |
143 value: 0, |
163 offLabel: 'UIT', |
163 offLabel: 'UIT', |
164 theme: theme, |
164 theme: theme, |
165 thumbSize: '50%', |
165 thumbSize: '50%', |
166 orientation: 'vertical' |
166 orientation: 'vertical' |
167 }, |
167 }, |
168 targetoptions = { inputMode: 'simple', theme: theme, width: 70, min: 0, max: 40, decimalDigits: 1, spinButtons: true }, |
168 targetoptions = { inputMode: 'simple', theme: theme, width: 70, min: 0, max: 45, decimalDigits: 1, spinButtons: true }, |
169 url = 'getfermenter.php?uuid="' + my_uuid + '"', |
169 url = 'getfermenter.php?uuid="' + my_uuid + '"', |
170 source = { |
170 source = { |
171 datatype: 'json', |
171 datatype: 'json', |
172 datafields: [ |
172 datafields: [ |
173 { name: 'record', type: 'int' }, |
173 { name: 'record', type: 'int' }, |
352 |
352 |
353 yl = record.yeast_lo; |
353 yl = record.yeast_lo; |
354 yh = record.yeast_hi; |
354 yh = record.yeast_hi; |
355 range = { ranges: [{ startValue: 0, endValue: yl, style: { fill: '#3399FF', stroke: '#3399FF' }, endWidth: 10, startWidth: 10 }, |
355 range = { ranges: [{ startValue: 0, endValue: yl, style: { fill: '#3399FF', stroke: '#3399FF' }, endWidth: 10, startWidth: 10 }, |
356 { startValue: yl, endValue: yh, style: { fill: '#00CC33', stroke: '#00CC33' }, endWidth: 10, startWidth: 10 }, |
356 { startValue: yl, endValue: yh, style: { fill: '#00CC33', stroke: '#00CC33' }, endWidth: 10, startWidth: 10 }, |
357 { startValue: yh, endValue: 40, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }, endWidth: 10, startWidth: 10 }]}; |
357 { startValue: yh, endValue: 45, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }, endWidth: 10, startWidth: 10 }]}; |
358 $('#gaugeContainer_air').jqxGauge(range); |
358 $('#gaugeContainer_air').jqxGauge(range); |
359 $('#gaugeContainer_beer').jqxGauge(range); |
359 $('#gaugeContainer_beer').jqxGauge(range); |
360 |
360 |
361 $('#gaugeContainer_air').jqxGauge({ caption: { value: 'Lucht: ' + record.air_temperature.toFixed(3) }}); |
361 $('#gaugeContainer_air').jqxGauge({ caption: { value: 'Lucht: ' + record.air_temperature.toFixed(3) }}); |
362 $('#gaugeContainer_air').jqxGauge({ value: record.air_temperature }); |
362 $('#gaugeContainer_air').jqxGauge({ value: record.air_temperature }); |