Warning: Can't use blame annotator:
svn blame failed on trunk/webapps/cmsmonitor/index.html: ("Can't find a temporary directory: Internal error", 20014)

source: tmcsimulator/trunk/webapps/cmsmonitor/index.html @ 401

Revision 401, 4.2 KB checked in by jdalbey, 7 years ago (diff)

Fix #149, #112. Add emphasis to timebox. Partial fix to highlighting problem. Use Scoreboard font in CMS monitor.

RevLine 
1<!DOCTYPE html>
2<html>
3  <head>
4<!-- Launch with  python -m CGIHTTPServer 80  -->
5  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
6    <title>CMS Monitor v0.2</title> 
7<style>
8@font-face {
9  font-family: Scoreboard;
10  src: url('../cptms/js/scoreboard.ttf');
11}
12* {
13  box-sizing: border-box;
14}
15body {
16   background-color: #000033;
17}
18/* Create three unequal columns that float next to each other */
19.column {
20  float: left;
21  padding: 10px;
22  background-color:black; 
23  color:goldenrod
24}
25
26.left {
27  width: 50%;
28}
29
30.middle, .right {
31  width: 25%;
32}
33/* styling for cms monitor */
34#msgs{
35  padding: 15px 10% 15px 10%;
36}
37#cms_info{
38  font-size: 20px;
39  font-family: Arial;
40  font-weight:lighter;
41  color: white;
42  padding-left: 5%;
43  padding-right: 5%;
44}
45.cms_content{
46  font-size: 34px;
47  font-family: Scoreboard;
48  font-weight: 550;
49  padding: 0px 20% 20px 20%;
50}
51.divider {
52  font-family: Scoreboard;
53  font-weight: 550;
54  padding-left: 5%;
55  padding-right: 5%;
56}
57/* Clear floats after the columns */
58.row:after {
59  content: "";
60  display: table;
61  clear: both;
62}
63</style>
64</head>
65<body>
66<div class="row">
67  <div class="column left" >
68    <h2>Active CMS Messages</h2>
69    <p id="msgs"></p>
70  </div>
71  <div class="column middle" >
72    <h2>Active HAR Messages</h2>
73    <p>Not implemented yet.</p>
74  </div>
75  <div class="column right" >
76    <h2>Active Lane Closures</h2>
77    <p>Not implemented yet.</p>
78  </div>
79</div>
80
81
82    <script  src="../common/js/fileutils.js"></script>
83    <script  src="../common/js/revision_number.dat"></script>
84    <script  src="../common/js/displayutils.js"></script> 
85   <script>
86    showRevision();
87    var cmsLocations = {};
88    // Load the CMS locations from the geojson file
89    function loadCMSlocations()
90    {
91        loadJSON("../cptms/data_layers/cms_locations_D12.gjson", function(response)
92        {
93            // Parse JSON string into object
94            var cmsjson = JSON.parse(response);
95            for (var i = 0; i < cmsjson.features.length; i++)
96            {
97                var item = cmsjson.features[i];
98                // Add each item to a lookup dictionary
99                cmsLocations[item.id] = item;
100            }
101        });
102    }
103    // Load the file of CMS messages
104    function loadAllcmsMessages()
105    {
106        var display = document.getElementById("msgs");
107        display.innerHTML = ""
108        loadJSON("../dynamicdata/cms_messages.json", function(response)
109        {
110            // Parse JSON string into object
111            messagejson = JSON.parse(response);
112            // Consider each message
113            for (var i = 0; i < messagejson.data.length; i++)
114            {
115                var item = messagejson.data[i];
116                // Find the location for this message
117                var cmsLoc = cmsLocations[item.cms.index];
118                // Build the message display
119                // divide the display message into 2 phases
120                var phase1 = item.cms.message.phase1.Line1.toUpperCase() + "<br>" +
121                    item.cms.message.phase1.Line2.toUpperCase() + "<br>" +
122                    item.cms.message.phase1.Line3.toUpperCase() + "<br>";
123                var phase2 = item.cms.message.phase2.Line1.toUpperCase() +  "<br>" +
124                    item.cms.message.phase2.Line2.toUpperCase() + "<br>" +
125                    item.cms.message.phase2.Line3.toUpperCase();
126     
127                // If the message isn't blank, append it to the list
128                // adding a seperate dotted line between phase1 and phase2
129                if (phase1 != "<br><br><br>" || phase2 != "<br><br>")
130                {
131                    display.innerHTML += "<div id=\"cms_info\">" + item.cms.index + ": " + 
132                        cmsLoc.properties.location + " " + cmsLoc.properties.street + "</div>";
133                    display.innerHTML += "<div class=\"cms_content\">" + phase1 + "</div>" +
134                      "<div class=\"divider\"> -----------------------------------------------</div>" +
135                      "<div class=\"cms_content\">" + phase2 + "</div>";
136                }
137            }
138        });
139    }
140
141// Start
142loadCMSlocations();
143loadAllcmsMessages();
144// start an interval timer to refresh the cms icons every 10 seconds
145var cmsTimer = setInterval(loadAllcmsMessages, 10000);
146
147   </script>
148  </body>
149</html>
Note: See TracBrowser for help on using the repository browser.