print_warning("没有任何RANCID的目录配置.");
    }
    ?>
      </div>
    </div>

    <div class="well info_box">
      <div class="title"><a href="<?php 
    echo generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'latency'));
    ?>
">
        <i class="oicon-blocks"></i> Smokeping</a></div>
      <div class="content">
<?php 
    if ($config['smokeping']['dir'] != '') {
        $smokeping_files = get_smokeping_files(1);
        echo '<p />';
        if ($smokeping_files['incoming'][$device['hostname']]) {
            print_success("RRD发现进向流量延迟.");
        } else {
            print_error("RRD未发现进向流量延迟.");
        }
        if ($smokeping_files['outgoing'][$device['hostname']]) {
            print_success("RRD发现出向流量延迟.");
        } else {
            print_error("RRD未发现出向流量延迟.");
        }
    } else {
        print_warning("没有配置Smokeping目录.");
    }
    ?>
Пример #2
0
 }
 if (@dbFetchCell("SELECT COUNT(sla_id) FROM slas WHERE device_id = '" . $device['device_id'] . "'") > '0') {
     echo '<li class="' . $select['slas'] . $select['sla'] . '">
         <a href="' . generate_device_url($device, array('tab' => 'slas')) . '">
         <img src="images/16/chart_line.png" align="absmiddle" border="0" /> SLAs
         </a>
         </li>';
 }
 if (@dbFetchCell("SELECT COUNT(accesspoint_id) FROM access_points WHERE device_id = '" . $device['device_id'] . "'") > '0') {
     echo '<li class="' . $select['accesspoints'] . '">
         <a href="' . generate_device_url($device, array('tab' => 'accesspoints')) . '">
         <img src="images/icons/wireless.png" align="absmiddle" border="0" /> Access Points
         </a>
         </li>';
 }
 $smokeping_files = get_smokeping_files($device);
 if (count($smokeping_files['in'][$device['hostname']]) || count($smokeping_files['out'][$device['hostname']])) {
     echo '<li class="' . $select['latency'] . '">
         <a href="' . generate_device_url($device, array('tab' => 'latency')) . '">
         <img src="images/16/arrow_undo.png" align="absmiddle" border="0" /> Ping
         </a>
         </li>';
 }
 if (@dbFetchCell("SELECT COUNT(vlan_id) FROM vlans WHERE device_id = '" . $device['device_id'] . "'") > '0') {
     echo '<li class="' . $select['vlans'] . '">
         <a href="' . generate_device_url($device, array('tab' => 'vlans')) . '">
         <img src="images/16/vlans.png" align="absmiddle" border="0" /> VLANs
         </a>
         </li>';
 }
 if (@dbFetchCell("SELECT COUNT(id) FROM vminfo WHERE device_id = '" . $device['device_id'] . "'") > '0') {