var sync_plots = { humidity_plot : new PlotterClas("humidity", "humidity_plot", [10,30]), } var sync_weather = { // set_data: function(data_) { //See data_: http://127.0.0.1:5030/eicdata/ajax/?&action=data_state&id=2016-12-01 //if (data_.ACK) { var res = sync_weather.tuned_state(data_, ' '); document.getElementById('plc').innerHTML = res; //var res = sync_weather.object_to_tree(data_, ' '); //document.getElementById('refresh').innerHTML = res; sync_plots.humidity_plot.refresh_list([data_[0].fields.updated , data_[0].fields.humidity]); //} }, tuned_state: function(data) { data = data[0]; res ='
' + level + propertyName + ': (' + typeof argObject[propertyName] + ')
'; msg += this.object_to_tree(argObject[propertyName], level + '-- '); } else if (typeof argObject[propertyName] == 'function'){ msg += '' + level + propertyName + ': (' + typeof argObject[propertyName] + ')
'; } else { msg += '' + level + propertyName + ': (' + typeof argObject[propertyName] + ') ' + argObject[propertyName] + '
'; } } return msg } }