当前位置: 首页>>代码示例>>PHP>>正文


PHP overlib_link函数代码示例

本文整理汇总了PHP中overlib_link函数的典型用法代码示例。如果您正苦于以下问题:PHP overlib_link函数的具体用法?PHP overlib_link怎么用?PHP overlib_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了overlib_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_graph_row

function print_graph_row($graph_array)
{
    global $config;
    if ($_SESSION['widescreen']) {
        if ($_SESSION['big_graphs']) {
            if (!$graph_array['height']) {
                $graph_array['height'] = "110";
            }
            if (!$graph_array['width']) {
                $graph_array['width'] = "353";
            }
            $periods = array('sixhour', 'week', 'month', 'year');
        } else {
            if (!$graph_array['height']) {
                $graph_array['height'] = "110";
            }
            if (!$graph_array['width']) {
                $graph_array['width'] = "215";
            }
            $periods = array('sixhour', 'day', 'week', 'month', 'year', 'twoyear');
        }
    } else {
        if ($_SESSION['big_graphs']) {
            if (!$graph_array['height']) {
                $graph_array['height'] = "100";
            }
            if (!$graph_array['width']) {
                $graph_array['width'] = "323";
            }
            $periods = array('day', 'week', 'month');
        } else {
            if (!$graph_array['height']) {
                $graph_array['height'] = "100";
            }
            if (!$graph_array['width']) {
                $graph_array['width'] = "228";
            }
            $periods = array('day', 'week', 'month', 'year');
        }
    }
    if ($graph_array['shrink']) {
        $graph_array['width'] = $graph_array['width'] - $graph_array['shrink'];
    }
    $graph_array['to'] = $config['time']['now'];
    foreach ($periods as $period) {
        $graph_array['from'] = $config['time'][$period];
        $graph_array_zoom = $graph_array;
        $graph_array_zoom['height'] = "175";
        $graph_array_zoom['width'] = "600";
        $link_array = $graph_array;
        $link_array['page'] = "graphs";
        unset($link_array['height'], $link_array['width']);
        $link = generate_url($link_array);
        echo overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
    }
}
开发者ID:skive,项目名称:observium,代码行数:56,代码来源:rows.inc.php

示例2: array

            $graph_array = array();
            $graph_array['height'] = "100";
            $graph_array['width'] = "210";
            $graph_array['to'] = $config['time']['now'];
            $graph_array['device'] = $device['device_id'];
            $graph_array['mod'] = $index;
            $graph_array['chan'] = $subindex;
            $graph_array['type'] = "c6kxbar_util";
            $graph_array['from'] = $config['time']['day'];
            $graph_array['legend'] = "no";
            $link_array = $graph_array;
            $link_array['page'] = "graphs";
            unset($link_array['height'], $link_array['width'], $link_array['legend']);
            $link = generate_url($link_array);
            $text_descr = $entity['entPhysicalName'] . " - Fabric " . $subindex;
            $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
            $graph_array['width'] = 80;
            $graph_array['height'] = 20;
            $graph_array['bg'] = 'ffffff00';
            $graph_array['style'][] = 'margin-top: -6px';
            $minigraph = generate_graph_tag($graph_array);
            echo '<tr class="' . $background['class'] . '">
          <td class="state-marker"></td>
          <td width=150><strong>Fabric ' . $subindex . '</strong></td>
          <td><span style="font-weight: bold;" class="label label-' . $fabric['mode_class'] . '">' . $fabric['cc6kxbarModuleChannelFabStatus'] . "</span></td>\n          <td>" . formatRates($fabric['cc6kxbarModuleChannelSpeed'] * 1000000) . "</td>\n          <td>" . overlib_link($link, $minigraph, $overlib_content) . "</td>\n          <td width=125>" . print_percentage_bar(125, 20, $percent_in, "Ingress", "ffffff", $background['left'], $percent_in . "%", "ffffff", $background['right']) . "</td>\n          <td width=125>" . print_percentage_bar(125, 20, $percent_out, "Egress", "ffffff", $background['left'], $percent_out . "%", "ffffff", $background['right']) . "</td>\n          </tr>";
        }
    }
}
echo "</table>";
echo generate_box_close();
// EOF
开发者ID:Natolumin,项目名称:observium,代码行数:31,代码来源:c6kxbar.inc.php

示例3: foreach

     foreach ($int_links as $int_link) {
         $link_if = get_port_by_id_cache($int_link);
         $link_dev = device_by_id_cache($link_if['device_id']);
         echo $br;
         if ($int_links_phys[$int_link]) {
             echo '<a alt="Directly connected" class="oicon-connect"></a> ';
         } else {
             echo '<a alt="Same subnet" class="oicon-network-hub"></a> ';
         }
         echo "<b>" . generate_port_link($link_if, short_ifname($link_if['label'])) . " on " . generate_device_link($link_dev, short_hostname($link_dev['hostname'])) . "</b>";
         ## FIXME -- do something fancy here.
         if ($int_links_v6[$int_link]) {
             echo ' ', overlib_link('', '<span class="label label-success">IPv6</span>', implode("<br />", $int_links_v6[$int_link]), NULL);
         }
         if ($int_links_v4[$int_link]) {
             echo ' ', overlib_link('', '<span class="label label-info">IPv4</span>', implode("<br />", $int_links_v4[$int_link]), NULL);
         }
         $br = "<br />";
     }
 }
 if (!isset($ports_has_ext['pseudowires']) || in_array($port['port_id'], $ports_has_ext['pseudowires'])) {
     foreach (dbFetchRows("SELECT * FROM `pseudowires` WHERE `port_id` = ?", array($port['port_id'])) as $pseudowire) {
         //`port_id`,`peer_device_id`,`peer_ldp_id`,`cpwVcID`,`cpwOid`
         #    $pw_peer_dev = dbFetchRow("SELECT * FROM `devices` WHERE `device_id` = ?", array($pseudowire['peer_device_id']));
         $pw_peer_int = dbFetchRow("SELECT * FROM `ports` AS I, `pseudowires` AS P WHERE I.`device_id` = ? AND P.`cpwVcID` = ? AND P.`port_id` = I.`port_id`", array($pseudowire['peer_device_id'], $pseudowire['cpwVcID']));
         #    $pw_peer_int = get_port_by_id_cache($pseudowire['peer_device_id']);
         $pw_peer_dev = device_by_id_cache($pseudowire['peer_device_id']);
         if (is_array($pw_peer_int)) {
             humanize_port($pw_peer_int);
             echo $br . '<i class="oicon-arrow-switch"></i> <strong>' . generate_port_link($pw_peer_int, short_ifname($pw_peer_int['label'])) . ' on ' . generate_device_link($pw_peer_dev, short_hostname($pw_peer_dev['hostname'])) . '</strong>';
         } else {
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:print-interface.inc.php

示例4: unset

            $graph_array['legend'] = "no";
            $link_array = $graph_array;
            $link_array['page'] = "graphs";
            unset($link_array['height'], $link_array['width'], $link_array['legend']);
            $link = generate_url($link_array);
            $overlib_content = generate_overlib_content($graph_array);
            $graph_array['width'] = 80;
            $graph_array['height'] = 20;
            $graph_array['bg'] = 'ffffff00';
            # the 00 at the end makes the area transparent.
            $graph_array['from'] = $config['time']['day'];
            $graph_array['style'][] = 'margin-top: -6px';
            $sensor['sensor_descr'] = truncate($sensor['sensor_descr'], 48, '');
            if ($sensor['sensor_state']) {
                $sensor_value = $sensor['state_name'];
                $sensor_minigraph = overlib_link($link, generate_graph_tag($graph_array), $overlib_content);
            } else {
                $sensor_value = $sensor['human_value'];
                $sensor_minigraph = overlib_link($link, generate_graph_tag($graph_array), $overlib_content);
            }
            echo '<tr class="device-overview">
            <td><strong>' . overlib_link($link, $sensor['sensor_descr'], $overlib_content) . '</strong></td>
            <td style="width: 90px; align: right;">' . $sensor_minigraph . '</td>
            <td style="width: 80px; align: right;">' . overlib_link($link, '<span class="' . $sensor['state_class'] . '">' . $sensor_value . $sensor['sensor_symbol'] . '</span>', $overlib_content) . '</td>
            </tr>' . PHP_EOL;
        }
        echo "</table>";
        echo "</div></div>";
    }
}
// EOF
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:sensors.inc.php

示例5: array

     $peer['bgpPeerIdentifier'] = Net_IPv6::compress($peer['bgpPeerIdentifier']);
 }
 // display overlib graphs
 $graph_array = array();
 $graph_array['type'] = 'bgp_updates';
 $graph_array['id'] = $peer['bgpPeer_id'];
 $graph_array['to'] = $config['time']['now'];
 $graph_array['from'] = $config['time']['day'];
 $graph_array['height'] = '110';
 $graph_array['width'] = $width;
 // Peer Address
 $graph_array_zoom = $graph_array;
 $graph_array_zoom['height'] = '150';
 $graph_array_zoom['width'] = '500';
 $overlib_link = "device/device=" . $peer['device_id'] . "/tab=routing/proto=bgp/";
 $peeraddresslink = "<span class=list-large>" . overlib_link(NULL, $peer['bgpPeerIdentifier'], generate_graph_tag($graph_array_zoom), NULL) . "</span>";
 echo '<tr bgcolor="' . $bg_colour . '"' . ($peer['alert'] ? ' bordercolor="#cc0000"' : '') . ($peer['disabled'] ? ' bordercolor="#cccccc"' : '') . '>
     ';
 echo '   <td width=20><span class=list-large>' . $i . '</span></td>
     <td>' . $peeraddresslink . '<br />' . $peername . "</td>\n        <td>{$peer_type}</td>\n        <td style='font-size: 10px; font-weight: bold; line-height: 10px;'>" . (isset($peer['afi']) ? $peer['afi'] : '') . '</td>
     <td><strong>AS' . $peer['bgpPeerRemoteAs'] . '</strong><br />' . $peer['astext'] . "</td>\n        <td><strong><span style='color: {$admin_col};'>" . $peer['bgpPeerAdminStatus'] . "<span><br /><span style='color: {$col};'>" . $peer['bgpPeerState'] . '</span></strong></td>
     <td>' . formatUptime($peer['bgpPeerFsmEstablishedTime']) . "<br />\n        Updates <img src='images/16/arrow_down.png' align=absmiddle> " . $peer['bgpPeerInUpdates'] . "\n        <img src='images/16/arrow_up.png' align=absmiddle> " . $peer['bgpPeerOutUpdates'] . '</td>
     </tr>
     <tr height=5></tr>';
 unset($invalid);
 switch ($vars['view']) {
     case 'prefixes_ipv4unicast':
     case 'prefixes_ipv4multicast':
     case 'prefixes_ipv4vpn':
     case 'prefixes_ipv6unicast':
     case 'prefixes_ipv6multicast':
开发者ID:greggcz,项目名称:librenms,代码行数:31,代码来源:bgp.inc.php

示例6: generate_ap_link

function generate_ap_link($args, $text = NULL, $type = NULL, $escape = FALSE)
{
    global $config;
    humanize_port($args);
    if (!$text) {
        $text = rewrite_ifname($args['port_label'], !$escape);
    }
    // Negative escape flag for exclude double escape
    if ($type) {
        $args['graph_type'] = $type;
    }
    if (!isset($args['graph_type'])) {
        $args['graph_type'] = 'port_bits';
    }
    if (!isset($args['hostname'])) {
        $args = array_merge($args, device_by_id_cache($args['device_id']));
    }
    $content = "<div class=entity-title>" . $args['text'] . " - " . rewrite_ifname($args['port_label'], !$escape) . "</div>";
    if ($args['ifAlias']) {
        $content .= $args['ifAlias'] . "<br />";
    }
    $content .= "<div style=\\'width: 850px\\'>";
    $graph_array['type'] = $args['graph_type'];
    $graph_array['legend'] = "yes";
    $graph_array['height'] = "100";
    $graph_array['width'] = "340";
    $graph_array['to'] = $config['time']['now'];
    $graph_array['from'] = $config['time']['day'];
    $graph_array['id'] = $args['accesspoint_id'];
    $content .= generate_graph_tag($graph_array);
    $graph_array['from'] = $config['time']['week'];
    $content .= generate_graph_tag($graph_array);
    $graph_array['from'] = $config['time']['month'];
    $content .= generate_graph_tag($graph_array);
    $graph_array['from'] = $config['time']['year'];
    $content .= generate_graph_tag($graph_array);
    $content .= "</div>";
    $url = generate_ap_url($args);
    if (port_permitted($args['interface_id'], $args['device_id'])) {
        return overlib_link($url, $text, $content, $class, $escape);
    } else {
        return rewrite_ifname($text);
    }
}
开发者ID:Natolumin,项目名称:observium,代码行数:44,代码来源:functions.inc.php

示例7: print_syslogs


//.........这里部分代码省略.........
                case 'timestamp_from':
                    $where .= ' AND `timestamp` > ?';
                    $param[] = $value;
                    break;
                case 'timestamp_to':
                    $where .= ' AND `timestamp` < ?';
                    $param[] = $value;
                    break;
            }
        }
    }
    // Show events only for permitted devices
    $query_permitted = generate_query_permitted();
    $query = 'FROM `syslog` ';
    $query .= $where . $query_permitted;
    $query_count = 'SELECT COUNT(`seq`) ' . $query;
    $query = 'SELECT * ' . $query;
    $query .= ' ORDER BY `seq` DESC ';
    $query .= "LIMIT {$start},{$pagesize}";
    // Query syslog messages
    $entries = dbFetchRows($query, $param);
    // Query syslog count
    if ($pagination && !$short) {
        $count = dbFetchCell($query_count, $param);
    } else {
        $count = count($entries);
    }
    if (!$count) {
        // There have been no entries returned. Print the warning.
        print_warning('<h4>No syslog entries found!</h4>
Check that the syslog daemon and Observium configuration options are set correctly, that your devices are configured to send syslog to Observium and that there are no firewalls blocking the messages.

See <a href="http://www.observium.org/wiki/Category:Documentation" target="_blank">documentation</a> and <a href="http://www.observium.org/wiki/Configuration_Options#Syslog_Settings" target="_blank">configuration options</a> for more information.');
    } else {
        // Entries have been returned. Print the table.
        $list = array('device' => FALSE, 'priority' => TRUE);
        // For now (temporarily) priority always displayed
        if (!isset($vars['device']) || empty($vars['device']) || $vars['page'] == 'syslog') {
            $list['device'] = TRUE;
        }
        if ($short || !isset($vars['priority']) || empty($vars['priority'])) {
            $list['priority'] = TRUE;
        }
        $string = '<table class="table table-bordered table-striped table-hover table-condensed-more">' . PHP_EOL;
        if (!$short) {
            $string .= '  <thead>' . PHP_EOL;
            $string .= '    <tr>' . PHP_EOL;
            $string .= '      <th>Date</th>' . PHP_EOL;
            if ($list['device']) {
                $string .= '      <th>Device</th>' . PHP_EOL;
            }
            if ($list['priority']) {
                $string .= '      <th>Priority</th>' . PHP_EOL;
            }
            $string .= '      <th>Message</th>' . PHP_EOL;
            $string .= '    </tr>' . PHP_EOL;
            $string .= '  </thead>' . PHP_EOL;
        }
        $string .= '  <tbody>' . PHP_EOL;
        foreach ($entries as $entry) {
            $string .= '  <tr>';
            if ($short) {
                $string .= '    <td class="syslog" style="white-space: nowrap">';
                $timediff = $GLOBALS['config']['time']['now'] - strtotime($entry['timestamp']);
                $string .= overlib_link('', formatUptime($timediff, "short-3"), format_timestamp($entry['timestamp']), NULL) . '</td>' . PHP_EOL;
            } else {
                $string .= '    <td width="160">';
                $string .= format_timestamp($entry['timestamp']) . '</td>' . PHP_EOL;
            }
            if ($list['device']) {
                $dev = device_by_id_cache($entry['device_id']);
                $device_vars = array('page' => 'device', 'device' => $entry['device_id'], 'tab' => 'logs', 'section' => 'syslog');
                $string .= '    <td class="entity">' . generate_device_link($dev, short_hostname($dev['hostname']), $device_vars) . '</td>' . PHP_EOL;
            }
            if ($list['priority']) {
                if (!$short) {
                    $string .= '    <td style="color: ' . $priorities[$entry['priority']]['color'] . '; white-space: nowrap;">' . nicecase($priorities[$entry['priority']]['name']) . ' (' . $entry['priority'] . ')</td>' . PHP_EOL;
                }
            }
            $entry['program'] = empty($entry['program']) ? '[[EMPTY]]' : $entry['program'];
            if ($short) {
                $string .= '    <td class="syslog">';
                $string .= '<strong style="color: ' . $priorities[$entry['priority']]['color'] . ';">' . $entry['program'] . '</strong> : ';
            } else {
                $string .= '    <td>';
                $string .= '<strong>' . $entry['program'] . '</strong> : ';
            }
            $string .= htmlspecialchars($entry['msg']) . '</td>' . PHP_EOL;
            $string .= '  </tr>' . PHP_EOL;
        }
        $string .= '  </tbody>' . PHP_EOL;
        $string .= '</table>' . PHP_EOL;
        // Print pagination header
        if ($pagination && !$short) {
            $string = pagination($vars, $count) . $string . pagination($vars, $count);
        }
        // Print syslog
        echo $string;
    }
}
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:101,代码来源:syslogs.inc.php

示例8: round

        }
        $perc = round($drive['storage_perc'], 0);
        $total = formatStorage($drive['storage_size']);
        $free = formatStorage($drive['storage_free']);
        $used = formatStorage($drive['storage_used']);
        $graph_array['type'] = $graph_type;
        $graph_array['id'] = $drive['storage_id'];
        $graph_array['from'] = $config['time']['day'];
        $graph_array['to'] = $config['time']['now'];
        $graph_array['height'] = "20";
        $graph_array['width'] = "80";
        $graph_array_zoom = $graph_array;
        $graph_array_zoom['height'] = "150";
        $graph_array_zoom['width'] = "400";
        $link = "graphs/id=" . $graph_array['id'] . "/type=" . $graph_array['type'] . "/from=" . $graph_array['from'] . "/to=" . $graph_array['to'] . "/";
        $mini_graph = overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
        $background = get_percentage_colours($perc);
        echo "<tr class='health'><td>" . generate_device_link($drive) . "</td><td class=tablehead>" . $drive['storage_descr'] . "</td>\n         <td>{$mini_graph}</td>\n         <td>\n          <a href='#' {$store_popup}>" . print_percentage_bar(400, 20, $perc, "{$used} / {$total}", "ffffff", $background['left'], $free, "ffffff", $background['right']) . "</a>\n          </td><td>{$perc}" . "%</td></tr>";
        if ($vars['view'] == "graphs") {
            echo "<tr></tr><tr class='health'><td colspan=5>";
            $graph_array['height'] = "100";
            $graph_array['width'] = "216";
            $graph_array['to'] = $config['time']['now'];
            $graph_array['id'] = $drive['storage_id'];
            $graph_array['type'] = $graph_type;
            include "includes/print-graphrow.inc.php";
            echo "</td></tr>";
        }
        # endif graphs
    }
}
开发者ID:CumulusNetworks,项目名称:cldemo-archive,代码行数:31,代码来源:storage.inc.php

示例9: foreach

// <th></th>
// </tr>");
$row = 1;
foreach (dbFetchRows('SELECT * FROM `ucd_diskio` WHERE device_id = ? ORDER BY diskio_descr', array($device['device_id'])) as $drive) {
    if (is_integer($row / 2)) {
        $row_colour = $list_colour_a;
    } else {
        $row_colour = $list_colour_b;
    }
    $fs_url = 'device/device=' . $device['device_id'] . '/tab=health/metric=diskio/';
    $graph_array_zoom['id'] = $drive['diskio_id'];
    $graph_array_zoom['type'] = 'diskio_ops';
    $graph_array_zoom['width'] = '400';
    $graph_array_zoom['height'] = '125';
    $graph_array_zoom['from'] = $config['time']['twoday'];
    $graph_array_zoom['to'] = $config['time']['now'];
    echo "<tr bgcolor='{$row_colour}'><th>";
    echo overlib_link($fs_url, $drive['diskio_descr'], generate_graph_tag($graph_array_zoom), null);
    echo '</th></tr>';
    $types = array('diskio_bits', 'diskio_ops');
    foreach ($types as $graph_type) {
        echo '<tr bgcolor="' . $row_colour . '"><td colspan=5>';
        $graph_array = array();
        $graph_array['id'] = $drive['diskio_id'];
        $graph_array['type'] = $graph_type;
        include 'includes/print-graphrow.inc.php';
        echo '</td></tr>';
    }
    $row++;
}
echo '</table>';
开发者ID:rasssta,项目名称:librenms,代码行数:31,代码来源:diskio.inc.php

示例10: print_events

/**
 * Display events.
 *
 * Display pages with device/port/system events on some formats.
 * Examples:
 * print_events() - display last 10 events from all devices
 * print_events(array('pagesize' => 99)) - display last 99 events from all device
 * print_events(array('pagesize' => 10, 'pageno' => 3, 'pagination' => TRUE)) - display 10 events from page 3 with pagination header
 * print_events(array('pagesize' => 10, 'device' = 4)) - display last 10 events for device_id 4
 * print_events(array('short' => TRUE)) - show small block with last events
 *
 * @param array $vars
 * @return none
 *
 */
function print_events($vars)
{
    // Get events array
    $events = get_events_array($vars);
    if (!$events['count']) {
        // There have been no entries returned. Print the warning.
        print_warning('<h4>No eventlog entries found!</h4>');
    } else {
        // Entries have been returned. Print the table.
        $list = array('device' => FALSE, 'port' => FALSE);
        if (!isset($vars['device']) || empty($vars['device']) || $vars['page'] == 'eventlog') {
            $list['device'] = TRUE;
        }
        if ($events['short'] || !isset($vars['port']) || empty($vars['port'])) {
            $list['port'] = TRUE;
        }
        $string = '<table class="table table-bordered table-striped table-hover table-condensed-more">' . PHP_EOL;
        if (!$events['short']) {
            $string .= '  <thead>' . PHP_EOL;
            $string .= '    <tr>' . PHP_EOL;
            $string .= '      <th>Date</th>' . PHP_EOL;
            if ($list['device']) {
                $string .= '      <th>Device</th>' . PHP_EOL;
            }
            if ($list['port']) {
                $string .= '      <th>Entity</th>' . PHP_EOL;
            }
            $string .= '      <th>Message</th>' . PHP_EOL;
            $string .= '    </tr>' . PHP_EOL;
            $string .= '  </thead>' . PHP_EOL;
        }
        $string .= '  <tbody>' . PHP_EOL;
        foreach ($events['entries'] as $entry) {
            $icon = geteventicon($entry['message']);
            if ($icon) {
                $icon = '<img src="images/16/' . $icon . '" />';
            }
            $string .= '  <tr>' . PHP_EOL;
            if ($events['short']) {
                $string .= '    <td class="syslog" style="white-space: nowrap">';
                $timediff = $GLOBALS['config']['time']['now'] - strtotime($entry['timestamp']);
                $string .= overlib_link('', formatUptime($timediff, "short-3"), format_timestamp($entry['timestamp']), NULL) . '</td>' . PHP_EOL;
            } else {
                $string .= '    <td style="width: 160px">';
                $string .= format_timestamp($entry['timestamp']) . '</td>' . PHP_EOL;
            }
            if ($list['device']) {
                $dev = device_by_id_cache($entry['device_id']);
                $device_vars = array('page' => 'device', 'device' => $entry['device_id'], 'tab' => 'logs', 'section' => 'eventlog');
                $string .= '    <td class="entity">' . generate_device_link($dev, short_hostname($dev['hostname']), $device_vars) . '</td>' . PHP_EOL;
            }
            if ($list['port']) {
                if ($entry['type'] == 'port') {
                    $this_if = get_port_by_id_cache($entry['reference']);
                    $entry['link'] = '<span class="entity">' . generate_port_link($this_if, short_ifname($this_if['label'])) . '</span>';
                } else {
                    $entry['link'] = ucfirst($entry['type']);
                }
                if (!$events['short']) {
                    $string .= '    <td>' . $entry['link'] . '</td>' . PHP_EOL;
                }
            }
            if ($events['short']) {
                $string .= '    <td class="syslog">' . $entry['link'] . ' ';
            } else {
                $string .= '    <td>';
            }
            $string .= htmlspecialchars($entry['message']) . '</td>' . PHP_EOL;
            $string .= '  </tr>' . PHP_EOL;
        }
        $string .= '  </tbody>' . PHP_EOL;
        $string .= '</table>';
        // Print pagination header
        if ($events['pagination_html']) {
            $string = $events['pagination_html'] . $string . $events['pagination_html'];
        }
        // Print events
        echo $string;
    }
}
开发者ID:skive,项目名称:observium,代码行数:95,代码来源:events.inc.php

示例11: getifhost

<?php

global $config;
if (!$graph_type) {
    $graph_type = $_GET['type'];
}
if (!$device) {
    $device['device_id'] = getifhost($interface['interface_id']);
}
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $now;
$graph_array['port'] = $interface['interface_id'];
$graph_array['type'] = $graph_type;
$periods = array('day', 'week', 'month', 'year');
foreach ($periods as $period) {
    $graph_array['from'] = ${$period};
    $graph_array_zoom = $graph_array;
    $graph_array_zoom['height'] = "150";
    $graph_array_zoom['width'] = "400";
    echo overlib_link($_SERVER['REQUEST_URI'], generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
}
开发者ID:kyrisu,项目名称:observernms,代码行数:22,代码来源:print-interface-graphs.inc.php

示例12: generatedevicelink

function generatedevicelink($device, $text = 0, $start = 0, $end = 0)
{
    global $twoday;
    global $day;
    global $now;
    global $config;
    if (!$start) {
        $start = $day;
    }
    if (!$end) {
        $end = $now;
    }
    $class = devclass($device);
    if (!$text) {
        $text = $device['hostname'];
    }
    $graph_url = $config['base_url'] . "/graph.php?device=" . $device['device_id'] . "&amp;from={$start}&amp;to={$end}&amp;width=400&amp;height=120&amp;type=device_cpu";
    $graph_url_b = $config['base_url'] . "/graph.php?device=" . $device['device_id'] . "&amp;from={$start}&amp;to={$end}&amp;width=400&amp;height=120&amp;type=device_memory";
    $url = $config['base_url'] . "/device/" . $device['device_id'] . "/";
    $contents = "<div class=list-large>" . $device['hostname'] . " - CPU &amp; Memory Usage</div>";
    if (isset($device['location'])) {
        $contents .= "" . htmlentities($device['location'] . "<br />");
    }
    $contents .= "<img src=\\'{$graph_url}\\'><br /><img src=\\'{$graph_url_b}\\'";
    $text = htmlentities($text);
    $link = overlib_link($url, $text, $contents, $class);
    return $link;
}
开发者ID:kyrisu,项目名称:observernms_clean,代码行数:28,代码来源:functions.php

示例13: unset

        $graph_array['width'] = "210";
        $graph_array['to'] = $config['time']['now'];
        $graph_array['id'] = $sensor['sensor_id'];
        $graph_array['type'] = $graph_type;
        $graph_array['from'] = $config['time']['day'];
        $graph_array['legend'] = "no";
        $link_array = $graph_array;
        $link_array['page'] = "graphs";
        unset($link_array['height'], $link_array['width'], $link_array['legend']);
        $link = generate_url($link_array);
        $overlib_content = '<div style="width: 580px;"><h2>' . $device['hostname'] . " - " . $sensor['sensor_descr'] . "</h1>";
        foreach (array('day', 'week', 'month', 'year') as $period) {
            $graph_array['from'] = $config['time'][$period];
            $overlib_content .= str_replace('"', "\\'", generate_graph_tag($graph_array));
        }
        $overlib_content .= "</div>";
        $graph_array['width'] = 80;
        $graph_array['height'] = 20;
        $graph_array['bg'] = 'ffffff00';
        # the 00 at the end makes the area transparent.
        $graph_array['from'] = $config['time']['day'];
        $sensor_minigraph = generate_graph_tag($graph_array);
        $sensor['sensor_descr'] = truncate($sensor['sensor_descr'], 48, '');
        echo "<tr>\n           <td><strong>" . overlib_link($link, $sensor['sensor_descr'], $overlib_content) . "</strong></td>\n           <td>" . overlib_link($link, $sensor_minigraph, $overlib_content) . "</td>\n           <td>" . overlib_link($link, "<span " . ($sensor['sensor_current'] < $sensor['sensor_limit_low'] || $sensor['sensor_current'] > $sensor['sensor_limit'] ? "style='color: red'" : '') . '>' . $sensor['sensor_current'] . $sensor_unit . "</span>", $overlib_content) . "</td>\n          </tr>";
    }
    echo "</table>";
    echo "</div>";
    echo "</div>";
    echo "</div>";
    echo "</div>";
}
开发者ID:CumulusNetworks,项目名称:cldemo-archive,代码行数:31,代码来源:sensor.inc.php

示例14: array

        $graph_array = array();
        $graph_array['height'] = "100";
        $graph_array['width'] = "210";
        $graph_array['to'] = $config['time']['now'];
        $graph_array['device'] = $device['device_id'];
        $graph_array['id'] = $proc['id'];
        $graph_array['type'] = $graph_type;
        $graph_array['from'] = $config['time']['day'];
        $graph_array['legend'] = "no";
        $link_array = $graph_array;
        $link_array['page'] = "graphs";
        unset($link_array['height'], $link_array['width'], $link_array['legend']);
        $link = generate_url($link_array);
        $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
        $graph_array['width'] = 80;
        $graph_array['height'] = 20;
        $graph_array['bg'] = 'ffffff00';
        # the 00 at the end makes the area transparent.
        //    $graph_array['style'][] = 'margin-top: -6px';
        $minigraph = generate_graph_tag($graph_array);
        $count_button = $proc['count'] > 1 ? '<span class="label pull-right" style="margin-top: 2px; font-size: 11px;"><i class="icon-remove"></i> ' . $proc['count'] . '</span>' : '';
        echo '<tr>
           <td><span class="entity">' . overlib_link($link, $text_descr, $overlib_content) . '</span>' . $count_button . '</td>
           <td style="width: 90px">' . overlib_link($link, $minigraph, $overlib_content) . '</td>
           <td style="width: 200px">' . overlib_link($link, print_percentage_bar(200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content) . '</td>
         </tr>';
    }
    echo "</table>";
    echo "</div></div>";
}
// EOF
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:processors.inc.php

示例15: get_percentage_colours

            $background_in = get_percentage_colours($percent_in);
            $percent_out = $fabric['cc6kxbarStatisticsOutUtil'];
            $background_out = get_percentage_colours($percent_out);
            $graph_array = array();
            $graph_array['height'] = "100";
            $graph_array['width'] = "210";
            $graph_array['to'] = $config['time']['now'];
            $graph_array['device'] = $device['device_id'];
            $graph_array['mod'] = $index;
            $graph_array['chan'] = $subindex;
            $graph_array['type'] = "c6kxbar_util";
            $graph_array['from'] = $config['time']['day'];
            $graph_array['legend'] = "no";
            $link_array = $graph_array;
            $link_array['page'] = "graphs";
            unset($link_array['height'], $link_array['width'], $link_array['legend']);
            $link = generate_url($link_array);
            $text_descr = $entity['entPhysicalName'] . " - Fabric " . $subindex;
            $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
            $graph_array['width'] = 80;
            $graph_array['height'] = 20;
            $graph_array['bg'] = 'ffffff00';
            # the 00 at the end makes the area transparent.
            $graph_array['style'][] = 'margin-top: -6px';
            $minigraph = generate_graph_tag($graph_array);
            echo "<tr class=device-overview>\n          <td width=10></td>\n          <td width=150><strong>Fabric " . $subindex . "</strong></td>\n          <td><span style='font-weight: bold;' class=" . $fabric['mode_class'] . ">" . $fabric['cc6kxbarModuleChannelFabStatus'] . "</span></td>\n          <td>" . formatRates($fabric['cc6kxbarModuleChannelSpeed'] * 1000000) . "</td>\n          <td>" . overlib_link($link, $minigraph, $overlib_content) . "</td>\n          <td width=125>" . print_percentage_bar(125, 20, $percent_in, "Ingress", "ffffff", $background['left'], $percent_in . "%", "ffffff", $background['right']) . "</td>\n          <td width=125>" . print_percentage_bar(125, 20, $percent_out, "Egress", "ffffff", $background['left'], $percent_out . "%", "ffffff", $background['right']) . "</td>\n          </tr>";
        }
    }
}
echo "</table>";
echo "</div></div>";
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:c6kxbar.inc.php


注:本文中的overlib_link函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。