diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index 260a75e004..673e0c5b7c 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -357,7 +357,9 @@ function generate_entity_link($type, $entity, $text = NULL, $graph_type=NULL) $link = generate_port_link($entity, $text, $graph_type); break; case "storage": - $url = generate_url(array('page' => 'device', 'device' => $entity['device_id'], 'tab' => 'health', 'metric' => 'storage')); + if(empty($text)) { $text = $entity['storage_descr']; } + $link = generate_link($text, array('page' => 'device', 'device' => $entity['device_id'], 'tab' => 'health', 'metric' => 'storage')); + break; default: $link = $entity[$type.'_id']; } diff --git a/html/includes/graphs/location/bits.inc.php b/html/includes/graphs/location/bits.inc.php index e11f13d636..07f1f2b85a 100644 --- a/html/includes/graphs/location/bits.inc.php +++ b/html/includes/graphs/location/bits.inc.php @@ -37,7 +37,7 @@ foreach ($devices as $device) $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($int['ifIndex'] . ".rrd"); $rrd_list[$i]['filename'] = $rrd_filename; $rrd_list[$i]['descr'] = $port['label']; - $rrd_list[$i]['descr_in'] = $port['label']; + $rrd_list[$i]['descr_in'] = $device['hostname']; $rrd_list[$i]['descr_out'] = $port['ifAlias']; $rrd_list[$i]['ds_in'] = $ds_in; $rrd_list[$i]['ds_out'] = $ds_out; diff --git a/html/pages/device/alerts.inc.php b/html/pages/device/alerts.inc.php index e7c633b021..6d88cbd53e 100644 --- a/html/pages/device/alerts.inc.php +++ b/html/pages/device/alerts.inc.php @@ -23,8 +23,9 @@ echo(' function get_entity_list($type, $subtype = "*", $device_id = "*", $entry) { if($type == "storage") { $table = $type; } else { $table = $type.'s'; } + if($type == "port") { $deleted = "deleted"; } else { $deleted = $type.'_deleted'; } - $query = 'SELECT '.$type.'_id AS id FROM '.$table.' WHERE 1'; + $query = 'SELECT '.$type.'_id AS id, '.$deleted.' FROM '.$table.' WHERE 1'; $args = array(); if(is_numeric($device_id)) @@ -43,7 +44,9 @@ function get_entity_list($type, $subtype = "*", $device_id = "*", $entry) foreach($entities_db as $entity_db) { - $entities[] = $entity_db['id']; + /// Is this entity marked as deleted? + if($entity_db['deleted'] != "1") + $entities[] = $entity_db['id']; } return $entities; } @@ -68,12 +71,12 @@ foreach($glo_conditions as $type => $subtypes) if(!empty($entities)) { - echo(''); + echo(''); } } } diff --git a/sql-schema/023.sql b/sql-schema/023.sql new file mode 100644 index 0000000000..e6968b33b0 --- /dev/null +++ b/sql-schema/023.sql @@ -0,0 +1,5 @@ +ALTER TABLE `storage` ADD `storage_deleted` BOOL NOT NULL DEFAULT '0'; +ALTER TABLE `links` CHANGE `local_interface_id` `local_port_id` INT( 11 ) NULL DEFAULT NULL; +ALTER TABLE `links` CHANGE `remote_interface_id` `remote_port_id` INT( 11 ) NULL DEFAULT NULL; +ALTER TABLE `sensors` ADD `sensor_deleted` BOOL NOT NULL DEFAULT '0' AFTER `sensor_id`; +ALTER TABLE `mempools` ADD `mempool_deleted` BOOL NOT NULL DEFAULT '0';
Entities: '); + echo('
'); foreach($entities as $entity) { - echo(generate_entity_link($type, $entity)." "); + echo(''.generate_entity_link($type, $entity).""); } - echo('