unify $os_group and $os_type into $config['os']

git-svn-id: http://www.observium.org/svn/observer/trunk@1264 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-06-25 12:18:00 +00:00
parent b2cfd87081
commit 19ccf99d8f
9 changed files with 69 additions and 62 deletions
+3 -4
View File
@@ -42,12 +42,11 @@ if($_GET['debug']) {
$graphfile = $config['temp_dir'] . "/" . strgen() . ".png";
$os = gethostosbyid($device_id);
$os_lower = strtolower($os);
if($os_groups[$os_lower]) {$os_group = $os_groups[$os_lower];}
if($config['os'][$os]['group']) {$os_group = $config['os'][$os]['group'];}
if(is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_lower.".inc.php")) {
if(is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os.".inc.php")) {
/// Type + OS Specific
include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_lower.".inc.php");
include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os.".inc.php");
}elseif($os_group && is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_group.".inc.php")) {
/// Type + OS Group Specific
include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_group.".inc.php");
+1 -1
View File
@@ -26,7 +26,7 @@
if ($device['os'] == "ios") { formatCiscoHardware($device); }
if ($device['features']) { $device['features'] = "(".$device['features'].")"; }
$device['os_text'] = $os_text[$device['os']];
$device['os_text'] = $config['os'][$device['os']]['text'];
echo($dev_img . '
<table width="100%">');
+1 -1
View File
@@ -12,7 +12,7 @@
$image = getImage($device['device_id']);
if ($device['os'] == "ios") { formatCiscoHardware($device, true); }
$device['os_text'] = $os_text[$device['os']];
$device['os_text'] = $config['os'][$device['os']]['text'];
echo(' <tr background="'.$bg_image.'" bgcolor="' . $bg . '" onmouseover="this.style.backgroundColor=\'#fdd\';" onmouseout="this.style.backgroundColor=\'' . $bg . '\';"
onclick="location.href=\'/device/'.$device['device_id'].'/\'" style="cursor: hand;">
+1 -1
View File
@@ -17,7 +17,7 @@ $select[$section] = "selected";
$device_query = mysql_query("SELECT * FROM `devices` WHERE `device_id` = '" . $_GET['id'] . "'");
while($device = mysql_fetch_array($device_query)) {
if($os_groups[$device['os']]) {$device['os_group'] = $os_groups[$device['os']]; }
if($config['os'][$device['os']]['group']) {$device['os_group'] = $config['os'][$device['os']]['group']; }
echo('<table cellpadding="15" cellspacing="0" class="devicetable" width="100%">');
include("includes/device-header.inc.php");
+1 -1
View File
@@ -8,7 +8,7 @@ while ($device = mysql_fetch_array($device_query))
echo('<div style="clear: both;">');
if ($os_groups[$device['os']]) { $os_group = $os_groups[$device['os']]; }
if ($config['os'][$device['os']]['group']) { $os_group = $config['os'][$device['os']]['group']; }
if (is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os'].".inc.php")) {
/// OS Specific
+1 -1
View File
@@ -17,7 +17,7 @@
{
echo("<option value='".$data['os']."'");
if ($data['os'] == $_POST['os']) { echo(" selected"); }
echo(">".$os_text[$data['os']]."</option>");
echo(">".$config['os'][$data['os']]['text']."</option>");
}
}
?>