From 8da13537f1a58731c8911b8751ec470b9b9426b5 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 8 Jul 2010 23:21:30 +0000 Subject: [PATCH] improved processor text description rewriting (now in function) git-svn-id: http://www.observium.org/svn/observer/trunk@1315 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/functions.inc.php | 14 ++++++++++++++ html/pages/device/health/processors.inc.php | 6 ++---- html/pages/device/overview/processors.inc.php | 6 +----- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index 404dbbbb21..691b175db7 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -1,5 +1,19 @@ ".$device['hostname']." - ".$text_descr; $proc_popup .= ""; diff --git a/html/pages/device/overview/processors.inc.php b/html/pages/device/overview/processors.inc.php index 9fab6c5ffd..149ecec77c 100644 --- a/html/pages/device/overview/processors.inc.php +++ b/html/pages/device/overview/processors.inc.php @@ -20,11 +20,7 @@ if(mysql_result(mysql_query("SELECT count(*) from processors WHERE device_id = ' ## REPLACE THIS SHITTY CODE. IT IS ALSO ELSEWHERE. - $text_descr = $proc['processor_descr']; - $text_descr = str_replace("Routing Processor", "RP", $text_descr); - $text_descr = str_replace("Switching Processor", "SP", $text_descr); - $text_descr = str_replace("Sub-Module", "Module ", $text_descr); - $text_descr = str_replace("DFC Card", "DFC", $text_descr); + $text_descr = rewrite_processor_descr($proc['processor_descr']); # disable short hrDeviceDescr. need to make this prettier. #$text_descr = short_hrDeviceDescr($proc['processor_descr']);