|
|
@ -16,25 +16,25 @@
|
|
|
|
* under the License.
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
var wsConnection1;
|
|
|
|
var wsConnectionTemperature;
|
|
|
|
var wsConnection2;
|
|
|
|
var wsConnectionCoffeeLevel;
|
|
|
|
var graphForSensorType1;
|
|
|
|
var graphForSensorTypeTemperature;
|
|
|
|
var graphForSensorType2;
|
|
|
|
var graphForSensorTypeCoffeeLevel;
|
|
|
|
var chartDataSensorType1 = [];
|
|
|
|
var chartDataSensorTypeTemperature = [];
|
|
|
|
var chartDataSensorType2 = [];
|
|
|
|
var chartDataSensorTypeCoffeeLevel = [];
|
|
|
|
|
|
|
|
|
|
|
|
var palette = new Rickshaw.Color.Palette({scheme: "classic9"});
|
|
|
|
var palette = new Rickshaw.Color.Palette({scheme: "classic9"});
|
|
|
|
|
|
|
|
|
|
|
|
$(window).load(function () {
|
|
|
|
$(window).load(function () {
|
|
|
|
drawGraph(wsConnection1, "#div-chart", "y_axis", "chart", chartDataSensorType1
|
|
|
|
drawGraph(wsConnectionTemperature, "#div-chartTemperature", "y_axisTemperature", "chartTemperature", chartDataSensorTypeTemperature
|
|
|
|
, graphForSensorType1);
|
|
|
|
, graphForSensorTypeTemperature);
|
|
|
|
drawGraph(wsConnection2, "#div-chart2", "y_axis2", "chart2", chartDataSensorType2
|
|
|
|
drawGraph(wsConnectionCoffeeLevel, "#div-chartCoffeeLevel", "y_axisCoffeeLevel", "chartCoffeeLevel", chartDataSensorTypeCoffeeLevel
|
|
|
|
, graphForSensorType2);
|
|
|
|
, graphForSensorTypeCoffeeLevel);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
window.onbeforeunload = function() {
|
|
|
|
window.onbeforeunload = function() {
|
|
|
|
disconnect(wsConnection1);
|
|
|
|
disconnect(wsConnectionTemperature);
|
|
|
|
disconnect(wsConnection2);
|
|
|
|
disconnect(wsConnectionCoffeeLevel);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function drawGraph(wsConnection, placeHolder, yAxis, chat, chartData, graph) {
|
|
|
|
function drawGraph(wsConnection, placeHolder, yAxis, chat, chartData, graph) {
|
|
|
|