Skip to content

Commit

Permalink
refactors and viewer updates
Browse files Browse the repository at this point in the history
  • Loading branch information
iinnovations committed Aug 19, 2015
1 parent efa591d commit b013861
Show file tree
Hide file tree
Showing 153 changed files with 883 additions and 589 deletions.
Empty file modified brewpanel/css/brewpanel.css
100644 → 100755
Empty file.
Empty file modified brewpanel/img/tiles/actions_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/alarms_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/alltiles.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/battery_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/bilge_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/blank_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/brewtank.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/brewtile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/conicalbrewtank.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/dataexport_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/electrical_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/freshwatersystem_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/freshwatertanks_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/fuelsystem_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/fueltanks_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/gears.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/generators_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/hvac_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/hydraulics_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/mechanical_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/position_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/settings_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/shorepower_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/steering_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/swbd_tile.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified brewpanel/img/tiles/tanks_tile.png
100644 → 100755
Empty file modified brewpanel/img/tiles/tankstile.png
100644 → 100755
Empty file modified brewpanel/img/tiles/wastewatersystem_tile.png
100644 → 100755
Empty file modified brewpanel/img/tiles/wastewatertanks_tile.png
100644 → 100755
Empty file modified brewpanel/img/tiles/weather_tile.png
100644 → 100755
Empty file modified brewpanel/index.html
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/jquery.mobile.custom.js
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/jquery.mobile.custom.min.js
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/jquery.mobile.custom.structure.css
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/jquery.mobile.custom.structure.min.css
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/jquery.mobile.custom.theme.css
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/jquery.mobile.custom.theme.min.css
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/themes/base.css
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/themes/base.min.css
100644 → 100755
Empty file.
Empty file modified brewpanel/jqm/themes/images/ajax-loader.gif
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/action-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/action-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/alert-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/alert-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-d-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-d-l-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-d-l-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-d-r-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-d-r-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-d-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-l-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-l-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-r-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-r-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-u-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-u-l-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-u-l-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-u-r-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-u-r-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/arrow-u-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/audio-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/audio-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/back-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/back-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/bars-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/bars-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/bullets-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/bullets-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/calendar-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/calendar-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/camera-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/camera-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/carat-d-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/carat-d-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/carat-l-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/carat-l-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/carat-r-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/carat-r-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/carat-u-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/carat-u-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/check-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/check-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/clock-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/clock-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/cloud-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/cloud-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/comment-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/comment-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/delete-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/delete-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/edit-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/edit-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/eye-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/eye-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/forbidden-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/forbidden-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/forward-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/forward-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/gear-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/gear-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/grid-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/grid-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/heart-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/heart-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/home-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/home-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/info-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/info-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/location-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/location-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/lock-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/lock-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/mail-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/mail-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/minus-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/minus-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/navigation-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/navigation-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/phone-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/phone-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/plus-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/plus-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/power-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/power-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/recycle-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/recycle-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/refresh-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/refresh-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/search-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/search-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/shop-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/shop-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/star-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/star-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/tag-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/tag-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/user-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/user-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/video-black.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/images/icons-png/video-white.png
100644 → 100755
Empty file modified brewpanel/jqm/themes/jquery.mobile.icons.min.css
100644 → 100755
Empty file.
Empty file modified brewpanel/js/brewjs.js
100644 → 100755
Empty file.
Empty file modified brewpanel/js/iijslib.hyak.js
100644 → 100755
Empty file.
Empty file modified brewpanel/js/jquery-1.11.1.js
100644 → 100755
Empty file.
Empty file modified brewpanel/js/jquery-1.11.1.min.js
100644 → 100755
Empty file.
Empty file modified brewpanel/js/jquery-migrate-1.2.1.min.js
100644 → 100755
Empty file.
Empty file modified brewpanel/js/vmsjslib.hyak.js
100644 → 100755
Empty file.
Empty file modified brewpanel/tanks.html
100644 → 100755
Empty file.
123 changes: 77 additions & 46 deletions js/cupidjslib.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,27 @@ function parseLogTableName(logtablename) {
logtablename = logtablename || '';
var result = {}
var splitarray = logtablename.split("_")

var type = 'unknown'
var subtype = 'unknown'
if (splitarray[0] == 'input') {
var type = 'input'
type = 'input'
}
else if (splitarray[0] == 'channel') {
var type = 'channel'
type = 'channel'
}
else {
type = 'unknown'
if (splitarray.length > 1) {
if (splitarray[1].indexOf('GPIO') >= 0) {
subtype = 'GPIO'
}
else if (splitarray[1].indexOf('1wire') >= 0 || splitarray[1].indexOf('1wire') >= 0) {
subtype = '1Wire'
}
}
result.id = splitarray.slice(1,-1).join("_")
result.type = type
result.tablename = logtablename;
result.id = splitarray.slice(1,-1).join("_");
result.type = type;
result.subtype = subtype;
return result

}
Expand Down Expand Up @@ -121,6 +131,7 @@ function userAdd(options) {
options.action = 'useradd'
runwsgiActions(options)
}

function userModify(options) {
// Need to pass : usertodelete, session username, session hpass
var options = options || {};
Expand Down Expand Up @@ -179,7 +190,7 @@ function UpdateVersionsData(options) {
options = options || {};
options.database = systemdatabase;
options.tablename = 'versions';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Control Algorithms
Expand All @@ -188,7 +199,7 @@ function UpdateControlAlgorithmsData(options) {
options.database = controldatabase;
options.tablename = 'controlalgorithms';
options.selectorclass = 'controlalgorithmselect';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Control Algorithm Types
Expand All @@ -197,7 +208,7 @@ function UpdateControlAlgorithmTypesData(options) {
options.database = controldatabase;
options.tablename = 'algorithmtypes';
options.selectorclass = 'algorithmtypeselect';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Channels Data
Expand All @@ -206,7 +217,7 @@ function UpdateChannelsData(options) {
options.database = controldatabase;
options.tablename = 'channels';
options.selectorclass = 'channelselect';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

function UpdateChannelIndicesData(options) {
Expand All @@ -215,7 +226,7 @@ function UpdateChannelIndicesData(options) {
options.tablename = 'channels';
options.selectortableitem = 'channelindex';
options.selectorclass = 'channelindexselect';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Outputs
Expand All @@ -226,7 +237,7 @@ function UpdateOutputsData(options) {
options.selectorclass = 'outputselect';
options.selectorhasnoneitem = true;
// options.selectortableitem = 'id';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Inputs
Expand All @@ -237,7 +248,7 @@ function UpdateInputsData(options) {
options.selectorclass = 'inputselect';
options.selectorhasnoneitem = true;
// options.selectortableitem = 'id';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Interfaces
Expand All @@ -248,7 +259,7 @@ function UpdateInterfacesData(options) {
options.selectorclass = 'interfaceselect';
options.selectorhasnoneitem = true;
// options.selectortableitem = 'id';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// motes
Expand All @@ -259,7 +270,7 @@ function UpdateMotesData(options) {
options.selectorclass = 'remotesselect';
options.selectorhasnoneitem = true;
// options.selectortableitem = 'id';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// MBTCP
Expand All @@ -270,7 +281,7 @@ function UpdateMBTCPData(options) {
options.selectorclass = 'mbtcpselect';
options.selectorhasnoneitem = true;
// options.selectortableitem = 'id';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Indicators
Expand All @@ -280,7 +291,7 @@ function UpdateIndicatorsData(options) {
options.tablename = 'indicators';
options.selectorclass = 'indicatorselect';
options.selectortableitem = 'name';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Actions
Expand All @@ -290,7 +301,7 @@ function UpdateActionsData(options) {
options.tablename = 'actions';
options.selectorclass = 'actionselect';
options.selectortableitem = 'name';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

/// Single table row
Expand All @@ -300,7 +311,7 @@ function UpdateSystemStatusData(options) {
options.database = controldatabase;
options.tablename = 'systemstatus';
options.index = 1;
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Network Status
Expand All @@ -309,7 +320,7 @@ function UpdateNetStatusData(options) {
options.database = systemdatabase;
options.tablename = 'netstatus';
options.index = 1;
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Netauths Data
Expand All @@ -320,15 +331,15 @@ function UpdateNetAuthsData(options) {
options.selectorclass = 'ssidselect';
options.selectorhasnoneitem = true;
options.selectortableitem = 'SSID'
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Netauths Data
function UpdateUsersData(options) {
options = options || {};
options.database = usersdatabase;
options.tablename = 'users';
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

//// Netconfig Status
Expand All @@ -337,7 +348,7 @@ function UpdateNetConfigData(options) {
options.database = systemdatabase;
options.tablename = 'netconfig';
options.index = 1;
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

// Metadata
Expand All @@ -346,19 +357,19 @@ function UpdateMetadata(options) {
options.database = systemdatabase;
options.tablename = 'metadata';
options.index = 1;
GetAndRenderTableData(options)
getAndRenderTableData(options)
}

// Unique render functions
//// Metadata
function UpdatePlotMetadata(options) {
//options.callback=RenderPlotMetadata;
options.callback = RenderPlotMetadata;
function updatePlotMetadata(options) {
options = options || {};
options.callback = renderPlotMetadata;
options.database=logdatabase;
options.tablename='metadata';
wsgiCallbackTableData(options);
}
function RenderPlotMetadata(metadataresponse,options) {
function renderPlotMetadata(metadataresponse,options, xhr) {
options = options || {};
metadataresponse = metadataresponse || {};
var metadata = metadataresponse.data || [];
Expand All @@ -375,11 +386,13 @@ function RenderPlotMetadata(metadataresponse,options) {
timeout=options.timeout;
}
if (timeout>0) {
setTimeout(function(){UpdatePlotMetadata(options)},timeout);
setTimeout(function(){updatePlotMetadata(options)},timeout);
}
for (var i=0;i<metadata.length;i++){
//$('.' + metadata[i].name.replace(' ','_') + 'points').html(88);
$('.' + metadata[i].name.replace(/ /g,'_') + 'points').html(metadata[i].numpoints);
$('.' + metadata[i].name + 'points').html(metadata[i].numpoints);
//console.log('rendering ' + '.' + metadata[i].name + 'points')
//console.log(metadata[i].numpoints)
//alert('.' + metadata[i].name.replace(' ','_') + 'points')
}
}
Expand Down Expand Up @@ -494,7 +507,7 @@ function RenderInputsTable (datatable,options) {
{value:datatable[j].polltime, cellclass:options.tablename + "polltime" + String(j+1) + "text",type:"value"}
]);
}
// RenderWidgetsFromArray(options.database,options.tablename,datatable,options)
// renderWidgetsFromArray(options.database,options.tablename,datatable,options)
}

function UpdateOutputsTable(options) {
Expand Down Expand Up @@ -555,7 +568,7 @@ function RenderOutputsTable (datatable,options) {
{value:datatable[j].polltime, cellclass:options.tablename + "polltime" + String(j+1) + "text",type:"value"}
])
}
// RenderWidgetsFromArray(options.database,options.tablename,datatable,options)
// renderWidgetsFromArray(options.database,options.tablename,datatable,options)
}

function UpdateIOInfoTable(options) {
Expand Down Expand Up @@ -612,7 +625,7 @@ function RenderIOInfoTable (datatable,options) {
]);
}
}
// RenderWidgetsFromArray(options.database,options.tablename,datatable,options)
// renderWidgetsFromArray(options.database,options.tablename,datatable,options)
}

function UpdateChannelsTable(options) {
Expand Down Expand Up @@ -640,17 +653,17 @@ function RenderChannelsTable (datatable,options) {
}
});


// Set interval function. We either pass a class to retrieve it from,
// a static value, or nothing
var timeout = 0;
if (options.hasOwnProperty('timeoutclass')) {
timeout=$('.' + options.timeoutclass).val()*1000;
}
else if (options.hasOwnProperty('timeout')) {
timeout=options.timeout;
}
else {
timeout=0;
}

if (timeout>0) {
setTimeout(function(){UpdateChannelsTable(options)},timeout);
}
Expand Down Expand Up @@ -696,7 +709,7 @@ function RenderChannelsTable (datatable,options) {
}
}
// I don't think this is necessary.
// RenderWidgetsFromArray(options.database,options.tablename,datatable,options)
// renderWidgetsFromArray(options.database,options.tablename,datatable,options)

}

Expand Down Expand Up @@ -774,7 +787,7 @@ function RenderControlAlgorithmsTable (datatable,options) {
]);
}
}
// RenderWidgetsFromArray(options.database,options.tablename,datatable,options)
// renderWidgetsFromArray(options.database,options.tablename,datatable,options)
}

////////////////////////////////////////////////////////////////////////////
Expand All @@ -794,6 +807,23 @@ function UpdateTimestamps(passedoptions){
}
}

/////////////////////////////////////////////////////
// Get stuff into DOM
//

function getAndRenderToDOM(options) {
// need database, table, object
options.callback = renderToDOM
wsgiCallbackTableData(options)
}

function renderToDOM(dataresponse, options, xhr) {
if (xhr.status == 200) {
//console.log(dataresponse.data)
window[options.objectname] = dataresponse.data;
}
}

/////////////////////////////////////////////////////
// Plot Stuff
//
Expand Down Expand Up @@ -894,7 +924,7 @@ var largeChannelOptionsObj={
]
};

function GetAndRenderLogData(options){
function getAndRenderLogData(options){
// This section lets the timeout function get an updated value for the table
// it should be retrieving. We can do it by channel or tablename, as long as we
// keep the naming convention the same!
Expand All @@ -908,16 +938,16 @@ function GetAndRenderLogData(options){
}
// length is passed in with options object
options.database = logdatabase;
//var callback=RenderLogData;
options.callback = RenderLogData;
//var callback=renderLogData;
options.callback = renderLogData;
wsgiCallbackTableData(options);
}

function RenderLogData (dataresponse,options) {
function renderLogData (dataresponse,options) {
//console.log('Rendering: ' + options.logtablename);

if (options.timeout>0) {
setTimeout(function(){GetAndRenderLogData(options)},options.timeout);
setTimeout(function(){getAndRenderLogData(options)},options.timeout);
}

if (dataresponse.hasOwnProperty('data')) {
Expand Down Expand Up @@ -964,15 +994,15 @@ function RenderLogData (dataresponse,options) {
}
}

function GetAndRenderMultLogsData(options){
function getAndRenderMultLogsData(options){
options = options || {};
options.callback=RenderMultLogsData;
options.callback=renderMultLogsData;
//options.callback=logdone;
options.database = logdatabase;
wsgiCallbackMultTableData(options)
}

function RenderMultLogsData(returnedlogdataresponse,options, xhr){
function renderMultLogsData(returnedlogdataresponse,options, xhr){
options=options || {};
returnedlogdataresponse = returnedlogdataresponse || {};
var returnedlogdata = returnedlogdataresponse.data || [];
Expand Down Expand Up @@ -1056,6 +1086,7 @@ function RenderMultLogsData(returnedlogdataresponse,options, xhr){
}
for (var i = 0; i < options.renderplotids.length; i++) {
$.jqplot(options.renderplotids[i], plotseriesarray, options.renderplotoptions[i]);
globaldata = plotseriesarray;
}
}
else {
Expand Down
Loading

0 comments on commit b013861

Please sign in to comment.