diff options
-rw-r--r-- | python/gras/stats/__init__.py | 4 | ||||
-rw-r--r-- | python/gras/stats/main.css | 127 | ||||
-rw-r--r-- | python/gras/stats/main.html | 9 | ||||
-rw-r--r-- | python/gras/stats/main.js | 12 |
4 files changed, 146 insertions, 6 deletions
diff --git a/python/gras/stats/__init__.py b/python/gras/stats/__init__.py index 6f68d1f..330abd4 100644 --- a/python/gras/stats/__init__.py +++ b/python/gras/stats/__init__.py @@ -27,7 +27,9 @@ class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler): target = os.path.join(__path__, path) if os.path.exists(target): s.send_response(200) - s.send_header("Content-type", "text/html") + if target.endswith('.js'): s.send_header("Content-type", "text/javascript") + elif target.endswith('.css'): s.send_header("Content-type", "text/css") + else: s.send_header("Content-type", "text") s.end_headers() s.wfile.write(open(target).read()) else: diff --git a/python/gras/stats/main.css b/python/gras/stats/main.css index 4950e84..6d28bcb 100644 --- a/python/gras/stats/main.css +++ b/python/gras/stats/main.css @@ -1 +1,126 @@ -/*TODO*/ +*{ +margin:0px; +padding:0px; +} + +body{ +font-family:Arial, Helvetica, sans-serif; +font-size:10pt; +color:black; +background-color:white; +} + +#page{ +padding:10px; +color:inherit; +background-color:#F0FFF0; +} + +#page h1{ +font-size:130%; +border-left:1px solid #333333; +border-bottom:1px solid #333333; +text-align:left; +padding:10px 0px 10px 10px; +margin:10px 5px 20px 5px; +color:#333333; +background-color:inherit; +} + +#page h2{ +font-size:130%; +text-align:center; +padding:20px 0px 10px 0px; +color:#333333; +background-color:inherit; +} + +#page h3{ +font-size:110%; +text-align:left; +padding:15px 0px 5px 10px; +text-decoration:underline; +color:#333333; +background-color:inherit; +} + +#page h4{ +font-size:105%; +text-align:center; +padding:5px 0px 3px 0px; +text-decoration:underline; +} + +#page p{ +text-indent:20px; +padding:5px 0px 5px 10px; +} + +#page strong{ +} + +#page em{ +} + +#page li{ +padding:5px 5px 0px 3px; +} + +#page ul, #page ol{ +padding:5px 0px 5px 40px; +} + +#page img{ +margin:10px auto 10px auto; +display:block; +border-style:none; +} + +#page a:link, #page a:visited{ +color:#236B8E; +background-color:inherit; +text-decoration:none; +} + +#page a:hover{ +color:#4985D6; +background-color:inherit; +text-decoration:none; +} + +#page pre{ +border:1px inset #333333; +padding:5px; +margin:10px 5px 10px 5px; +color:inherit; +background-color:#FCFCFC; +font-size:90%; +} + +#page hr{ +margin:10px 0px 0px 0px; +} + +#page table{ +padding:10px; +} + +#page th{ +padding:7px; +border:1px solid #333333; +text-align:center; +color:inherit; +background-color:#ECECEC; +} + +#page tr{ +} + +#page td{ +padding:5px; +border:1px solid #333333; +text-align:center; +color:inherit; +background-color:#FCFCFC; +} + diff --git a/python/gras/stats/main.html b/python/gras/stats/main.html index 6bfc6b6..cd66534 100644 --- a/python/gras/stats/main.html +++ b/python/gras/stats/main.html @@ -2,6 +2,7 @@ <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> + <meta http-equiv="Content-Style-Type" content="text/css" /> <title>GRAS status monitor</title> <link rel="stylesheet" type="text/css" href="/main.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> @@ -14,9 +15,11 @@ </head> <body> - <p id="tps">Default</p> - <div id="overall_charts" style="width:1000px;height:700px;"></div> - <div id="individual_charts"></div> + <div id='page'> + <h1>GRAS Status Monitor</h1> + <form id="individual_charts"></form> + <div id="overall_charts" style="width:1000px;height:700px;"></div> + </div> </body> </html> diff --git a/python/gras/stats/main.js b/python/gras/stats/main.js index 4c961da..4658f03 100644 --- a/python/gras/stats/main.js +++ b/python/gras/stats/main.js @@ -49,7 +49,17 @@ var gras_setup_individual_charts = function(point) var charts = $('#individual_charts').get(0); $('block', point).each(function() { - + $('<input>').attr({ + type: 'checkbox', + name: $(this).attr('id'), + value: '1', + checked: '1', + onclick: function() + { + + } + }).appendTo(charts); + $(charts).append($(this).attr('id') + '<br />'); }); } |