dynamic refresh of the graph.
** psensor-server/web interface: automatic update of the monitoring page.
** psensor-server/web interface: improved styling and navigation.
** psensor-server/web interface: added graph for cpu usage.
+** psensor-server/web interface: fixed IE8 bug (page title change not
+ allowed).
+** psensor-server/web interface: dynamic refresh of the graph.
* v0.6.2.10
** psensor-server: added network, cpu load and memory information in
<html>
<head>
<meta charset="utf-8">
- <title>Sensor </title>
+ <title id="title">Sensor </title>
<link type="text/css"
rel="stylesheet"
<script>
$(document).ready(function() {
- var url_id;
+ var url_id;
- url_id = get_url_params()["id"];
+ url_id = get_url_params()["id"];
- update_menu();
-
- $.getJSON(url_id, function(data) {
- update_chart("chart", type_to_str(data["type"]), data);
- });
+ update_menu();
+ $.getJSON(url_id, function(data) {
+ update_chart("chart", type_to_str(data["type"]), data);
+ });
+
+ setInterval(function() {
+ $.getJSON(url_id, function(data) {
+ update_chart("chart", type_to_str(data["type"]), data);
+ });
+ }, 5000);
});
</script>
</head>
var measures, data_chart, date, entry;
var style;
+ $("#"+chart_id).html("");
+
measures = data["measures"];
data_chart = [];
+ $("h1").html("");
$("h1").append(data["name"]);
- $("title").append(data["name"]);
+
+ try {
+ $("title").html(data["name"]);
+ } catch(ignore) {
+ // IE8 doesn't allow to modify the page title
+ }
$.each(measures, function(i, item) {
value = item["value"];
} ]
};
+
$.jqplot (chart_id, [data_chart], style);
}
padding: 0.25em 0.25em 0em 0.25em;
}
-.chart {
+#chart {
color: #000;
font-style: normal;
font-weight: normal;
+ width: 100%;
+ height: 300px;
}
ul {