-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcontrol.htm
95 lines (87 loc) · 4.31 KB
/
control.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<!--
IEEE-123 realtime simulation control webpage
Copyright (C) 2016, Stanford University
Author: [email protected]
-->
<HTML>
<HEAD>
<TITLE>Control</TITLE>
</HEAD>
<BODY ONLOAD="refresh();">
<SCRIPT src="gridlabd.js"></SCRIPT>
<H1><A HREF="http://<<<HOSTNAME>>>/">Welcome</A></H1>
<H2>
<A HREF="http://<<<HOSTNAME>>>:6266/rt/control.htm">Model-6266</A>
<A HREF="http://<<<HOSTNAME>>>:6267/rt/control.htm">Model-6267</A>
<A HREF="http://<<<HOSTNAME>>>:6268/rt/control.htm">Model-6268</A>
<A HREF="http://<<<HOSTNAME>>>:6269/rt/control.htm">Model-6269</A>
</H2>
<H3>
<A HREF="control.htm">Simulation</A>
<A HREF="weather.htm">Weather</A>
<A HREF="feeder.htm">Feeder</A>
<A HREF="meter.htm">Meter</A>
<A HREF="/kml/model.kml">Map</A>
</H3>
<TABLE WIDTH="100%">
<TR><TH COLSPAN=4>Simulation <<<PORT>>><HR/></TH></TR>
<TR><TD>Date/Time</TD><TD COLSPAN=3><DIV ID="clock"></DIV></TD></TR>
<TR><TH COLSPAN=4><HR/></TH></TR>
<TR><TD>Server URL</TD><TD COLSPAN=2><DIV ID="server_info">...</DIV></TD></TR>
<TR><TD>Model name</TD><TD COLSPAN=2><DIV ID="modelname">...</DIV></TD></TR>
<TR><TD>Realtime metric</TD><TD COLSPAN=2><DIV ID="realtime_metric">...</DIV></TD></TR>
<TR><TD>Verbose</TD><TD><DIV ID="verbose">...</DIV></TD><TD>
<INPUT TYPE="submit" VALUE="Off" ONCLICK="GLDSetGlobal('verbose',0); refresh();" />
<INPUT TYPE="submit" VALUE="On" ONCLICK="GLDSetGlobal('verbose',1); refresh();" />
</TD></TR><TR><TD>Debug</TD><TD><DIV ID="debug">...</DIV></TD><TD>
<INPUT TYPE="submit" VALUE="Off" ONCLICK="GLDSetGlobal('debug',0); refresh();" />
<INPUT TYPE="submit" VALUE="On" ONCLICK="GLDSetGlobal('debug',1); refresh();" />
</TD></TR><TR><TD>Dumpall</TD><TD><DIV ID="dumpall">...</DIV></TD><TD>
<INPUT TYPE="submit" VALUE="Off" ONCLICK="GLDSetGlobal('dumpall',0); refresh();" />
<INPUT TYPE="submit" VALUE="On" ONCLICK="GLDSetGlobal('dumpall',1); refresh();" />
</TD></TR><TR><TD>Quiet</TD><TD><DIV ID="quiet">...</DIV></TD><TD>
<INPUT TYPE="submit" VALUE="Off" ONCLICK="GLDSetGlobal('quiet',0); refresh();" />
<INPUT TYPE="submit" VALUE="On" ONCLICK="GLDSetGlobal('quiet',1); refresh();" />
</TD></TR><TR><TD>Show progress</TD><TD><DIV ID="show_progress">...</DIV></TD><TD>
<INPUT TYPE="submit" VALUE="Off" ONCLICK="GLDSetGlobal('show_progress',0); refresh();" />
<INPUT TYPE="submit" VALUE="On" ONCLICK="GLDSetGlobal('show_progress',1); refresh();" />
</TD></TR><TR><TD>Suppress repeat messages</TD><TD><DIV ID="suppress_repeat_messages">...</DIV></TD><TD>
<INPUT TYPE="submit" VALUE="Off" ONCLICK="GLDSetGlobal('suppress_repeat_messages',0); refresh();" />
<INPUT TYPE="submit" VALUE="On" ONCLICK="GLDSetGlobal('suppress_repeat_messages',1); refresh();" />
</TD></TR><TR><TD>Warning</TD><TD><DIV ID="warn">...</DIV></TD><TD>
<INPUT TYPE="submit" VALUE="Off" ONCLICK="GLDSetGlobal('warn',0); refresh();" />
<INPUT TYPE="submit" VALUE="On" ONCLICK="GLDSetGlobal('warn',1); refresh();" />
</TD></TR>
</TABLE>
<HR/>
<TABLE WIDTH="100%">
<TR><TD WIDTH=500></TD><TD WIDTH=50>Status</TD><TD WIDTH=50><DIV ID="status">Initializing</DIV></TD></TR>
</TABLE>
</BODY>
<SCRIPT type="text/javascript">
var count = 0;
function refresh()
{
count = count + 1;
setTimeout("refresh()",30000);
if ( count == 1 )
document.getElementById("status").innerHTML = "Updating";
else
document.getElementById("status").innerHTML = "Server down";
document.getElementById("clock").innerHTML = GLDGetGlobal("clock");
document.getElementById("modelname").innerHTML = GLDGetGlobal("modelname");
document.getElementById("server_info").innerHTML = "http://"+hostname+":"+portnum+"/";
document.getElementById("realtime_metric").innerHTML = GLDGetGlobal("realtime_metric");
document.getElementById("verbose").innerHTML = GLDGetGlobal("verbose");
document.getElementById("debug").innerHTML = GLDGetGlobal("debug");
document.getElementById("dumpall").innerHTML = GLDGetGlobal("dumpall");
document.getElementById("quiet").innerHTML = GLDGetGlobal("quiet");
document.getElementById("show_progress").innerHTML = GLDGetGlobal("show_progress");
document.getElementById("suppress_repeat_messages").innerHTML = GLDGetGlobal("suppress_repeat_messages");
document.getElementById("warn").innerHTML = GLDGetGlobal("warn");
document.getElementById("status").innerHTML = "Ok";
count = 0;
}
</SCRIPT>
</HTML>