Skip to content

Commit bc53cb6

Browse files
author
linuxitux
committed
Re-arrangement of graphics, minor css changes
1 parent ff78170 commit bc53cb6

File tree

3 files changed

+56
-38
lines changed

3 files changed

+56
-38
lines changed

config.example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
upt - Uptime
3030
3131
*/
32-
$graphs = array('cpu','mem','swp','top','lda','ifx','tps','met','upt');
32+
$graphs = array('cpu','mem','swp','lda','tps','top','ifx','met','upt');
3333

3434
/***********************/
3535

graphics.php

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function draw() {
1212
return 1;
1313
}
1414

15+
// small graphics
1516
foreach ($this->graphList as $g) {
1617

1718
switch($g) {
@@ -44,25 +45,54 @@ function draw() {
4445

4546
break;
4647

47-
case 'top':
48-
?>
49-
<div class="metrics">
50-
<h3>Top processes</h3>
51-
<table id="top" class="toptable"><tr><td>No data.</td></tr></table>
52-
</div>
53-
<?php
54-
break;
55-
5648
case 'lda':
5749
?>
58-
<div class="metrics">
59-
<h3>Load</h3>
50+
<div class="small-metrics">
51+
<h4>Load</h4>
6052
<center><p class="bigmetric"><span id="lda_value_big">No data.</span></p></center>
53+
<!--
6154
<p class="smallnote">System load average for the last minute.
6255
The load average is calculated as the average number
6356
of runnable or running tasks (R state), and the number
6457
of tasks in uninterruptible sleep (D state) over the
6558
specified interval.</p>
59+
-->
60+
</div>
61+
<?php
62+
break;
63+
64+
case 'tps':
65+
?>
66+
<div class="small-metrics">
67+
<h4>I/O</h4>
68+
<center><p class="bigmetric"><span id="tps_value_big">No data.</span></p></center>
69+
<!--
70+
<p class="smallnote">Total number of transfers per second that
71+
were issued to physical devices. A transfer
72+
is an I/O request to a physical device.
73+
Multiple logical requests can be combined
74+
into a single I/O request to the device.</p>
75+
-->
76+
</div>
77+
<?php
78+
break;
79+
80+
}
81+
82+
}
83+
84+
echo "<br />";
85+
86+
// big graphics
87+
foreach ($this->graphList as $g) {
88+
89+
switch($g) {
90+
91+
case 'top':
92+
?>
93+
<div class="metrics">
94+
<h3>Top processes</h3>
95+
<table id="top" class="toptable"><tr><td>No data.</td></tr></table>
6696
</div>
6797
<?php
6898
break;
@@ -84,20 +114,6 @@ function draw() {
84114
<?php
85115
break;
86116

87-
case 'tps':
88-
?>
89-
<div class="metrics">
90-
<h3>I/O</h3>
91-
<center><p class="bigmetric"><span id="tps_value_big">No data.</span></p></center>
92-
<p class="smallnote">Total number of transfers per second that
93-
were issued to physical devices. A transfer
94-
is an I/O request to a physical device.
95-
Multiple logical requests can be combined
96-
into a single I/O request to the device.</p>
97-
</div>
98-
<?php
99-
break;
100-
101117
case 'met':
102118
?>
103119
<div class="metrics">

template.css

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,28 @@ margin-right: auto;
7878
text-align: center;
7979
}
8080

81-
.metrics {
82-
padding: 15px;
81+
.metrics, .small-metrics {
82+
-webkit-border-radius: 5px;
83+
border-radius: 5px;
84+
-webkit-box-shadow: 0 0 5px 0 #bbb;
85+
box-shadow: 0 0 5px 0 #bbb;
8386
margin: 5px;
84-
background-color: #fafafa;
85-
/*border: 2px solid #fafafa;*/
86-
height: 240px;
8787
display: inline-block;
88-
max-width: 280px;
8988
vertical-align: top;
89+
background-color: #fafafa;
90+
border: 1px solid #bbb;
91+
max-width: 280px;
92+
min-width: 140px;
93+
}
94+
95+
.metrics {
96+
padding: 15px;
97+
height: 240px;
9098
}
9199

92100
.small-metrics {
93101
padding: 10px;
94-
margin: 5px;
95-
background-color: #fafafa;
96-
/*border: 2px solid #fafafa;*/
97102
height: 105px;
98-
display: inline-block;
99-
max-width: 280px;
100-
vertical-align: top;
101103
}
102104

103105
.bigmetric {

0 commit comments

Comments
 (0)