Skip to content

Commit

Permalink
Re-arrangement of graphics, minor css changes
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxitux committed Jun 12, 2017
1 parent ff78170 commit bc53cb6
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 38 deletions.
2 changes: 1 addition & 1 deletion config.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
upt - Uptime
*/
$graphs = array('cpu','mem','swp','top','lda','ifx','tps','met','upt');
$graphs = array('cpu','mem','swp','lda','tps','top','ifx','met','upt');

/***********************/

Expand Down
66 changes: 41 additions & 25 deletions graphics.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function draw() {
return 1;
}

// small graphics
foreach ($this->graphList as $g) {

switch($g) {
Expand Down Expand Up @@ -44,25 +45,54 @@ function draw() {

break;

case 'top':
?>
<div class="metrics">
<h3>Top processes</h3>
<table id="top" class="toptable"><tr><td>No data.</td></tr></table>
</div>
<?php
break;

case 'lda':
?>
<div class="metrics">
<h3>Load</h3>
<div class="small-metrics">
<h4>Load</h4>
<center><p class="bigmetric"><span id="lda_value_big">No data.</span></p></center>
<!--
<p class="smallnote">System load average for the last minute.
The load average is calculated as the average number
of runnable or running tasks (R state), and the number
of tasks in uninterruptible sleep (D state) over the
specified interval.</p>
-->
</div>
<?php
break;

case 'tps':
?>
<div class="small-metrics">
<h4>I/O</h4>
<center><p class="bigmetric"><span id="tps_value_big">No data.</span></p></center>
<!--
<p class="smallnote">Total number of transfers per second that
were issued to physical devices. A transfer
is an I/O request to a physical device.
Multiple logical requests can be combined
into a single I/O request to the device.</p>
-->
</div>
<?php
break;

}

}

echo "<br />";

// big graphics
foreach ($this->graphList as $g) {

switch($g) {

case 'top':
?>
<div class="metrics">
<h3>Top processes</h3>
<table id="top" class="toptable"><tr><td>No data.</td></tr></table>
</div>
<?php
break;
Expand All @@ -84,20 +114,6 @@ function draw() {
<?php
break;

case 'tps':
?>
<div class="metrics">
<h3>I/O</h3>
<center><p class="bigmetric"><span id="tps_value_big">No data.</span></p></center>
<p class="smallnote">Total number of transfers per second that
were issued to physical devices. A transfer
is an I/O request to a physical device.
Multiple logical requests can be combined
into a single I/O request to the device.</p>
</div>
<?php
break;

case 'met':
?>
<div class="metrics">
Expand Down
26 changes: 14 additions & 12 deletions template.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,28 @@ margin-right: auto;
text-align: center;
}

.metrics {
padding: 15px;
.metrics, .small-metrics {
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 0 5px 0 #bbb;
box-shadow: 0 0 5px 0 #bbb;
margin: 5px;
background-color: #fafafa;
/*border: 2px solid #fafafa;*/
height: 240px;
display: inline-block;
max-width: 280px;
vertical-align: top;
background-color: #fafafa;
border: 1px solid #bbb;
max-width: 280px;
min-width: 140px;
}

.metrics {
padding: 15px;
height: 240px;
}

.small-metrics {
padding: 10px;
margin: 5px;
background-color: #fafafa;
/*border: 2px solid #fafafa;*/
height: 105px;
display: inline-block;
max-width: 280px;
vertical-align: top;
}

.bigmetric {
Expand Down

0 comments on commit bc53cb6

Please sign in to comment.