$vars['circuit'])); if ($port_id) { $vars['id'] = $port_id; } } } if (is_numeric($vars['id']) && ($auth || port_permitted($vars['id']))) { $auth = TRUE; $port = get_port_by_id($vars['id']); $device = device_by_id_cache($port['device_id']); $title_array = array(); $title_array[] = array('text' => $device['hostname'], 'url' => generate_url(array('page' => 'device', 'device' => $device['device_id']))); $title_array[] = array('text' => 'Ports', 'url' => generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'ports'))); $title_array[] = array('text' => escape_html($port['port_label']) . (strlen($port['ifAlias']) ? " (".escape_html($port['ifAlias']).")" : ''), 'url' => generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'port', 'port' => $port['port_id']))); $graph_title = device_name($device, TRUE) . " :: " . $port['port_label_short']; $rrd_filename = get_port_rrdfilename($port, NULL, TRUE); if ($vars['type'] == 'port_bits') { $scale = (isset($vars['scale']) ? $vars['scale'] : $config['graphs']['ports_scale_default']); if ($scale != 'auto') { if ($scale == 'speed' && $port['ifSpeed'] > 0) { $scale_max = $port['ifSpeed']; if ($graph_style != 'mrtg') { $scale_min = -1 * $scale_max; } } else { $scale = intval(unit_string_to_numeric($scale, 1000)); if (is_numeric($scale) && $scale > 0) { $scale_max = $scale; if ($graph_style != 'mrtg') { $scale_min = -1 * $scale_max; } } } $scale_rigid = isset($config['graphs']['ports_scale_force']) && $config['graphs']['ports_scale_force']; } } } // EOF