Updated Elements and caching
- flag nocache deactivates the use of cache - the graph adapts to the screensize (after re-redering) - the server automatically generates a json with the current cpu usage.pull/18/head^2
parent
3dab31a7c2
commit
be7e9574af
@ -0,0 +1 @@
|
|||||||
|
{"100perc":[[0,7.592260658628322],[1,10.5375],[2,10.708504544888557],[3,6.638329791223903],[4,7.6230942264433885],[5,7.015130674002751],[6,8.763849122370223],[7,8.952807869505666],[8,13.56121814791796],[9,10.153423974055134],[10,10.926780591243606],[11,6.225826575171553],[12,11.89020586400499],[13,11.692038931869229],[14,8.594237245852563],[15,10.90455396132252],[16,27.02868350085805],[17,12.44228129289904],[18,13.291770573566083],[19,9.575],[20,11.679560768654854],[21,11.670195541163283],[22,19.142821441959263],[23,15.54559043348281],[24,12.289457267623206],[25,12.060613588374116]]}
|
@ -1,21 +1,29 @@
|
|||||||
<div style="width: 100%; margin: auto">
|
|
||||||
<img src="RCN-Logo.png" style="margin: 0 calc(50% - 25px); max-width: 100px; height: auto"/>
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
The Raspberry pi Communication-Network is a network of Raspberry-Pi's.
|
|
||||||
It's currently still in development. <br> The purpose of this server is to
|
|
||||||
display the status of all raspberry-pi's in the network and the data
|
|
||||||
of several sensors that are connected to these raspberry pi's. The data
|
|
||||||
is stored in a database running on the main backend-server. The
|
|
||||||
frontend-server is running either on a differend device or also on the
|
|
||||||
backend-server-device. If this is the case, then the data is directly
|
|
||||||
fetched from several json files instead of using webservices. The json-
|
|
||||||
files are generated by a script running in the background that get's
|
|
||||||
data from the database and stores it in these json-files every few
|
|
||||||
seconds (depending on the type of data).
|
|
||||||
</p>
|
|
||||||
<div class="spacer">
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
setTitle('About')
|
setTitle('About');
|
||||||
</script>
|
</script>
|
||||||
|
<div class="panelContainer">
|
||||||
|
<div class="panel">
|
||||||
|
<p>
|
||||||
|
The Raspberry pi Communication-Network is a network of Raspberry-Pi's.
|
||||||
|
It's currently still in development. <br> The purpose of this server is to
|
||||||
|
display the status of all raspberry-pi's in the network and the data
|
||||||
|
of several sensors that are connected to these raspberry pi's. The data
|
||||||
|
is stored in a database running on the main backend-server. The
|
||||||
|
frontend-server is running either on a differend device or also on the
|
||||||
|
backend-server-device. If this is the case, then the data is directly
|
||||||
|
fetched from several json files instead of using webservices. The json-
|
||||||
|
files are generated by a script running in the background that get's
|
||||||
|
data from the database and stores it in these json-files every few
|
||||||
|
seconds (depending on the type of data).
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="panel max-width">
|
||||||
|
<span class="title">
|
||||||
|
CPU Temperature
|
||||||
|
</span>
|
||||||
|
<div class="graph" onmouseout="hideTooltip()">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="about.js"></script>
|
@ -0,0 +1,9 @@
|
|||||||
|
function draw() {
|
||||||
|
$.getJSON('sys.json', data =>{
|
||||||
|
let c = document.querySelector('.graph');
|
||||||
|
drawGraph(c, data['100perc'], {yMax: 100, yMin: "0", xUnit: "s", yUnit: "%"});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
draw();
|
||||||
|
let refreshInterval = setInterval(draw, 1000);
|
Loading…
Reference in New Issue