2010-04-30 Sergio Martin <sergio.martin@artica.es>

* operation/snmpconsole/snmp_view.php: Improved the
	code using printTruncateText



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-04-30 11:22:28 +00:00
parent 63be82d234
commit 467fec4b35
2 changed files with 14 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2010-04-30 Sergio Martin <sergio.martin@artica.es>
* operation/snmpconsole/snmp_view.php: Improved the
code using printTruncateText
2010-04-30 Sergio Martin <sergio.martin@artica.es> 2010-04-30 Sergio Martin <sergio.martin@artica.es>
* include/functions_ui.php: Improved the printTruncateText * include/functions_ui.php: Improved the printTruncateText

View File

@ -356,24 +356,19 @@ if ($traps !== false) {
} }
} }
//Value //Value
$data[3] = substr ($trap["value"], 0, 15); if (empty ($trap["value"])) {
if (empty ($data[3])) {
$data[3] = __('N/A'); $data[3] = __('N/A');
} elseif (strlen ($trap["value"]) > 15) { } else {
$data[3] = '<span title="'.$trap["value"].'">'.$data[3].'...</span>'; $data[3] = printTruncateText($trap["value"], 15, false);
} }
//Custom //Custom
//$data[4] = '<span title="' . $trap["oid_custom"] . '">' . $trap["value_custom"] . '</span>'; if (empty ($trap["value_custom"])) {
$data[4] = substr ($trap["value_custom"], 0, 15);
if (empty ($data[4])) {
$data[4] = __('N/A'); $data[4] = __('N/A');
} elseif (strlen ($trap["value_custom"]) > 15) { } else {
$data[4] = '<span title="'.$trap["value_custom"].'">'.$data[4].'...</span>'; $data[4] = printTruncateText($trap["value_custom"], 15, false);
} }
//User //User
if (!empty ($trap["status"])) { if (!empty ($trap["status"])) {