Skip to content
Snippets Groups Projects

add a powerboard temperature monitoring graph in GUI

Merged Zhicai Zhang requested to merge zhicaiz/reporting:zz_powerboardTemp into master
Files
10
@@ -29,6 +29,56 @@ function createGraph(data, title, xname,xtitle,xrange,xdticks, yname,ytitle,yran
window.dash_clientside.clientside = {
// Stores setting information for a chiller, such that it can
// be restored on tab switch.
//
// The arguments are the values of elements that should be
// stored, followed by the current `chillerstorage` data
// and the current `tab`.
//
// The returned `chillerstorage` has value at key `tab` updated
// to contain a list of arguments[0:-2].
storeChillerInfo: function() {
var chillerstorage=arguments[arguments.length-2];
var tab=arguments[arguments.length-1];
// Allocate objects if needed
if(chillerstorage === undefined)
{ chillerstorage={}; }
//chillerstorage[tab]=Array.prototype.slice.call(arguments,0,arguments.length-2);
chillerstorage[tab]=[...arguments].slice(0,arguments.length-2);
return chillerstorage;
},
// Restores the chiller setting from storage by returning the
// stored values in `chillerstorage` at `tab`.
//
// If a `chillerstorage` or the corresponding `tab` values
// is not defined, then default values (hardcoded!) are
// returned.
restoreChillerInfo: function(tab, chillerstorage) {
//
// Build up stored result
// Blank default if nothing is stored
result=[0]
// Check for existing store
if(chillerstorage !== undefined && chillerstorage[tab] !== undefined)
{ result=chillerstorage[tab]; }
// There is an update from the database
for(let c=0; c<dash_clientside.callback_context.triggered.length; c++)
{
let trigger=dash_clientside.callback_context.triggered[c];
}
return result;
},
// Stores setting information for a panel, such that it can
// be restored on tab switch.
//
Loading