Fix if-then-else

This commit is contained in:
Mark Schouten
2015-11-10 11:44:14 +01:00
parent a4eb4391c5
commit 24550b0c02
2 changed files with 10 additions and 5 deletions

View File

@@ -36,7 +36,8 @@ foreach ($graphs as $key => $text) {
echo '</td></tr>';
}
}
} elseif ($key == "ceph_osdperf") {
}
elseif ($key == "ceph_osdperf") {
foreach (glob($rrddir."/app-ceph-".$app['app_id']."-osd-*") as $rrd_filename) {
if (preg_match("/.*-osd-(.+)\.rrd$/", $rrd_filename, $osds)) {
$osd = $osds[1];
@@ -49,7 +50,8 @@ foreach ($graphs as $key => $text) {
echo '</td></tr>';
}
}
} elseif ($key == "ceph_df") {
}
elseif ($key == "ceph_df") {
foreach (glob($rrddir."/app-ceph-".$app['app_id']."-df-*") as $rrd_filename) {
if (preg_match("/.*-df-(.+)\.rrd$/", $rrd_filename, $pools)) {
$pool = $pools[1];
@@ -61,7 +63,8 @@ foreach ($graphs as $key => $text) {
echo "<tr bgcolor='$row_colour'><td colspan=5>";
include 'includes/print-graphrow.inc.php';
echo '</td></tr>';
} else {
}
else {
echo '<h3>'.$pool.' Usage</h3>';
$graph_array['type'] = 'application_ceph_pool_df';
$graph_array['pool'] = $pool;