diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php
index f3bd8300c..c16d77b2d 100644
--- a/html/includes/print-menubar.php
+++ b/html/includes/print-menubar.php
@@ -411,7 +411,7 @@ if ($_SESSION['userlevel'] >= '5' && ($app_count) > "0")
$image = $config['html_dir']."/images/icons/".$row['app_type'].".png";
$icon = (file_exists($image) ? $row['app_type'] : "apps");
echo('
-
'.$app['app_type'].' ');
+
'.nicecase($app['app_type']).' ');
}
?>
diff --git a/html/pages/apps.inc.php b/html/pages/apps.inc.php
index 50f928b16..3d14da0b4 100644
--- a/html/pages/apps.inc.php
+++ b/html/pages/apps.inc.php
@@ -28,7 +28,7 @@ foreach ($app_list as $app)
} else {
#echo('
');
}
- echo(generate_link(ucfirst($app['app_type']),array('page'=>'apps','app'=>$app['app_type'])));
+ echo(generate_link(nicecase($app['app_type']),array('page'=>'apps','app'=>$app['app_type'])));
if ($vars['app'] == $app['app_type']) { echo(""); }
$sep = " | ";
}
diff --git a/html/pages/apps/default.inc.php b/html/pages/apps/default.inc.php
index 8bf2fd8be..53f8d858b 100644
--- a/html/pages/apps/default.inc.php
+++ b/html/pages/apps/default.inc.php
@@ -9,36 +9,38 @@ $graph_array_zoom['height'] = "150";
$graph_array_zoom['width'] = "400";
$graph_array['legend'] = "no";
-echo(''.$vars['app'].'
');
+echo(''.nicecase($vars['app']).'
');
echo('');
$app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($vars['app']));
+
foreach ($app_devices as $app_device)
{
- echo('');
- echo('| '.generate_device_link($app_device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).' | ');
- echo(''.$app_device['app_instance'].' | ');
- echo(''.$app_device['app_status'].' | ');
- echo(' | ');
- echo('
');
- echo('');
- echo('| ');
+ echo(' |
');
+ echo('| '.generate_device_link($app_device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).' | ');
+ echo(''.$app_device['app_instance'].' | ');
+ echo(''.$app_device['app_status'].' | ');
+ echo(' | ');
+ echo('
');
+ echo('');
+ echo('| ');
- foreach ($graphs[$vars['app']] as $graph_type)
- {
- $graph_array['type'] = "application_".$vars['app']."_".$graph_type;
- $graph_array['id'] = $app_device['app_id'];
- $graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type;
- $graph_array_zoom['id'] = $app_device['app_id'];
+ foreach ($graphs[$vars['app']] as $graph_type)
+ {
+ $graph_array['type'] = "application_".$vars['app']."_".$graph_type;
+ $graph_array['id'] = $app_device['app_id'];
+ $graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type;
+ $graph_array_zoom['id'] = $app_device['app_id'];
- $link_array = $graph_array;
- $link_array['page'] = "graphs";
- unset($link_array['height'], $link_array['width']);
- $link = generate_url($link_array);
+ $link_array = $graph_array;
+ $link_array['page'] = "graphs";
+ unset($link_array['height'], $link_array['width']);
+ $link = generate_url($link_array);
- echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
- }
- echo(' | ');
- echo('
');
+ echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
+ }
+
+ echo('');
+ echo('');
}
echo('
');
diff --git a/html/pages/apps/overview.inc.php b/html/pages/apps/overview.inc.php
index 0fbde3c5e..3d4cd63ed 100644
--- a/html/pages/apps/overview.inc.php
+++ b/html/pages/apps/overview.inc.php
@@ -12,7 +12,7 @@ $graph_array['legend'] = "no";
foreach ($app_list as $app)
{
echo('');
- echo('
'.generate_link(ucfirst($app['app_type']),array('page'=>'apps','app'=>$app['app_type'])).'
');
+ echo(''.generate_link(nicecase($app['app_type']),array('page'=>'apps','app'=>$app['app_type'])).'
');
$app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($app['app_type']));
foreach ($app_devices as $app_device)
{
diff --git a/html/pages/device/apps/mysql.inc.php b/html/pages/device/apps/mysql.inc.php
index ddd8f7df0..25e1587b1 100644
--- a/html/pages/device/apps/mysql.inc.php
+++ b/html/pages/device/apps/mysql.inc.php
@@ -3,10 +3,10 @@ global $config;
print_optionbar_start();
-echo("".$app['app_type']." » ");
+echo("".nicecase($app['app_type'])." » ");
$app_sections = array('system' => "System",
- 'queries' => "Quieries",
+ 'queries' => "Queries",
'innodb' => "InnoDB");
unset($sep);
@@ -20,7 +20,7 @@ foreach ($app_sections as $app_section => $app_section_text)
{
echo(""); }
$sep = " | ";
}
diff --git a/includes/functions.php b/includes/functions.php
index eba85879f..4b5a007c2 100755
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -26,8 +26,19 @@ if ($config['alerts']['email']['enable'])
function nicecase($item)
{
- if ($item == "dbm") { return "dBm"; }
- else return ucfirst($item);
+ switch ($item)
+ {
+ case "dbm":
+ return "dBm";
+ case "mysql":
+ return" MySQL";
+ case "powerdns":
+ return "PowerDNS";
+ case "bind":
+ return "BIND";
+ default:
+ return ucfirst($item);
+ }
}
function mac_clean_to_readable($mac)