• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP generate_overlib_content函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: str_replace

 $text_descr = $proc['processor_descr'];
 $text_descr = str_replace("Routing Processor", "RP", $text_descr);
 $text_descr = str_replace("Switching Processor", "SP", $text_descr);
 $text_descr = str_replace("Sub-Module", "Module ", $text_descr);
 $text_descr = str_replace("DFC Card", "DFC", $text_descr);
 $graph_array = array();
 $graph_array['to'] = $config['time']['now'];
 $graph_array['id'] = $proc['processor_id'];
 $graph_array['type'] = $graph_type;
 $graph_array['legend'] = "no";
 $link_array = $graph_array;
 $link_array['page'] = "graphs";
 unset($link_array['height'], $link_array['width'], $link_array['legend']);
 $link_graph = generate_url($link_array);
 $link = generate_url(array("page" => "device", "device" => $proc['device_id'], "tab" => "health", "metric" => 'processor'));
 $overlib_content = generate_overlib_content($graph_array, $proc['hostname'] . " - " . htmlentities($text_descr), NULL);
 $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'];
 $mini_graph = generate_graph_tag($graph_array);
 $perc = round($proc['processor_usage']);
 $background = get_percentage_colours($perc);
 echo '<tr class="' . $proc['html_row_class'] . '">
     <td class="entity">' . generate_device_link($proc) . '</td>
     <td>' . overlib_link($link, htmlentities($text_descr), $overlib_content) . '</td>
     <td>' . overlib_link($link_graph, $mini_graph, $overlib_content) . '</td>
     <td><a href="' . $link_graph . '">
       ' . print_percentage_bar(400, 20, $perc, $perc . "%", "ffffff", $background['left'], 100 - $perc . "%", "ffffff", $background['right']) . '
       </a>
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:processor.inc.php


示例2: generate_graph_tag

<?php 
    $graph_array['height'] = "100";
    $graph_array['width'] = "512";
    $graph_array['to'] = $config['time']['now'];
    $graph_array['device'] = $device['device_id'];
    $graph_array['type'] = "device_bits";
    $graph_array['from'] = $config['time']['day'];
    $graph_array['legend'] = "no";
    $graph = generate_graph_tag($graph_array);
    $link_array = $graph_array;
    $link_array['page'] = "graphs";
    unset($link_array['height'], $link_array['width']);
    $link = generate_url($link_array);
    $graph_array['width'] = "210";
    $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - Device Traffic");
    echo overlib_link($link, $graph, $overlib_content, NULL);
    echo '  <div style="height: 5px;"></div>';
    echo '<table class="table table-condensed table-striped table-bordered">
    <tr style="background-color: ' . $ports_colour . '; align: center;"><td></td>
      <td style="width: 25%"><img src="images/16/connect.png" alt="" /> ' . $ports['total'] . '</td>
      <td style="width: 25%" class="green"><img src="images/16/if-connect.png" alt="" /> ' . $ports['up'] . '</td>
      <td style="width: 25%" class="red"><img src="images/16/if-disconnect.png" alt="" /> ' . $ports['down'] . '</td>
      <td style="width: 25%" class="grey"><img src="images/16/if-disable.png" alt="" /> ' . $ports['disabled'] . '</td>
    </tr>
  </table>';
    echo '  <div style="margin: 8px; font-size: 11px; font-weight: bold;">';
    $ifsep = "";
    foreach (dbFetchRows("SELECT * FROM `ports` WHERE device_id = ? AND `deleted` != '1'", array($device['device_id'])) as $data) {
        humanize_port($data);
        $data = array_merge($data, $device);
开发者ID:skive,项目名称:observium,代码行数:30,代码来源:ports.inc.php


示例3: humanize_sensor

 humanize_sensor($sensor);
 // FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
 // FIXME - So now we need to clean this up and move it into a function. Isn't it just "print-graphrow"?
 // FIXME - DUPLICATED IN health/sensors
 $graph_colour = str_replace("#", "", $row_colour);
 $graph_array = array();
 $graph_array['to'] = $config['time']['now'];
 $graph_array['id'] = $sensor['sensor_id'];
 $graph_array['type'] = "sensor_" . $sensor_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);
 $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">
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:sensors.inc.php


示例4: generate_mempool_row

function generate_mempool_row($mempool, $vars)
{
    global $config;
    $table_cols = 7;
    if ($vars['page'] != "device" && $vars['popup'] != TRUE) {
        $table_cols++;
    }
    // Add a column for device.
    $graph_array = array();
    $graph_array['to'] = $config['time']['now'];
    $graph_array['id'] = $mempool['mempool_id'];
    $graph_array['type'] = "mempool_usage";
    $graph_array['legend'] = "no";
    $link_array = $graph_array;
    $link_array['page'] = "graphs";
    unset($link_array['height'], $link_array['width'], $link_array['legend']);
    $link_graph = generate_url($link_array);
    $link = generate_url(array("page" => "device", "device" => $mempool['device_id'], "tab" => "health", "metric" => 'mempool'));
    $overlib_content = generate_overlib_content($graph_array, $mempool['hostname'] . " - " . $mempool['mempool_descr']);
    $graph_array['width'] = 80;
    $graph_array['height'] = 20;
    $graph_array['bg'] = 'ffffff00';
    $graph_array['from'] = $config['time']['day'];
    $mini_graph = generate_graph_tag($graph_array);
    if ($mempool['mempool_total'] != '100') {
        $total = formatStorage($mempool['mempool_total']);
        $used = formatStorage($mempool['mempool_used']);
        $free = formatStorage($mempool['mempool_free']);
    } else {
        // If total == 100, than memory not have correct size and uses percents only
        $total = $mempool['mempool_total'] . '%';
        $used = $mempool['mempool_used'] . '%';
        $free = $mempool['mempool_free'] . '%';
    }
    $background = get_percentage_colours($mempool['mempool_perc']);
    $mempool['html_row_class'] = $background['class'];
    $row .= '<tr class="' . $mempool['html_row_class'] . '">
            <td class="state-marker"></td>';
    if ($vars['page'] != "device" && $vars['popup'] != TRUE) {
        $row .= '<td class="entity">' . generate_device_link($mempool) . '</td>';
    }
    $row .= '<td class="entity">' . generate_entity_link('mempool', $mempool) . '</td>
        <td>' . overlib_link($link_graph, $mini_graph, $overlib_content) . '</td>
        <td><a href="' . $link_graph . '">
          ' . print_percentage_bar(400, 20, $mempool['mempool_perc'], $used . '/' . $total . ' (' . $mempool['mempool_perc'] . '%)', "ffffff", $background['left'], $free . ' (' . (100 - $mempool['mempool_perc']) . '%)', "ffffff", $background['right']) . '
          </a>
        </td>
        <td>' . $mempool['mempool_perc'] . '%</td>
      </tr>
   ';
    if ($vars['view'] == "graphs") {
        $vars['graph'] = "usage";
    }
    if ($vars['graph']) {
        $row .= '<tr class="' . $mempool['html_row_class'] . '">';
        $row .= '<td class="state-marker"></td>';
        $row .= '<td colspan="' . $table_cols . '">';
        unset($graph_array['height'], $graph_array['width'], $graph_array['legend']);
        $graph_array['to'] = $config['time']['now'];
        $graph_array['id'] = $mempool['mempool_id'];
        $graph_array['type'] = 'mempool_' . $vars['graph'];
        print_graph_row($graph_array, TRUE);
        $row .= '</td></tr>';
    }
    # endif graphs
    return $row;
}
开发者ID:Natolumin,项目名称:observium,代码行数:67,代码来源:mempool.inc.php


示例5: generate_lazy_graph_tag

 //end foreach
 if ($config['cpu_details_overview'] === false) {
     //Generate average cpu graph
     $graph_array['height'] = '100';
     $graph_array['width'] = '485';
     $graph_array['device'] = $device['device_id'];
     $graph_array['type'] = 'device_processor';
     $graph = generate_lazy_graph_tag($graph_array);
     //Generate link to graphs
     $link_array = $graph_array;
     $link_array['page'] = 'graphs';
     unset($link_array['height'], $link_array['width']);
     $link = generate_url($link_array);
     //Generate tooltip
     $graph_array['width'] = '210';
     $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . ' - CPU usage');
     echo '<tr>
           <td colspan="4">';
     echo overlib_link($link, $graph, $overlib_content, null);
     echo '  </td>
         </tr>';
     //Add a row with CPU desc, count and percent graph
     $totalPercent = $totalPercent / count($processors);
     $background = get_percentage_colours($totalPercent);
     echo '<tr>
          <td>' . overlib_link($link, $text_descr, $overlib_content) . '</td>
          <td>' . overlib_link($link, 'x' . count($processors), $overlib_content) . '</td>
          <td>' . overlib_link($link, print_percentage_bar(200, 20, $totalPercent, null, 'ffffff', $background['left'], $percent . '%', 'ffffff', $background['right']), $overlib_content) . '</td>
        </tr>';
 }
 echo '</table>
开发者ID:samyscoub,项目名称:librenms,代码行数:31,代码来源:processors.inc.php


示例6: get_percentage_colours

     $free = $mempool['mempool_free'] . '%';
 }
 $background = get_percentage_colours($percent);
 $graph_array = array();
 $graph_array['height'] = "100";
 $graph_array['width'] = "210";
 $graph_array['to'] = $config['time']['now'];
 $graph_array['id'] = $mempool['mempool_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);
 echo '<tr class="device-overview">
    <td style="max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><strong>' . overlib_link($link, $text_descr, $overlib_content) . '</strong></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, $used . "/" . $total . " (" . $percent . "%)", "ffffff", $background['left'], $free . " (" . (100 - $percent) . "%)", "ffffff", $background['right']), $overlib_content) . '</td>
  </tr>';
 /**
   <tr class="small">
     <td colspan=3>
       <span class="pull-right">
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:mempools.inc.php


示例7: str_replace

 $text_descr = $proc['processor_descr'];
 $text_descr = str_replace("Routing Processor", "RP", $text_descr);
 $text_descr = str_replace("Switching Processor", "SP", $text_descr);
 $text_descr = str_replace("Sub-Module", "Module ", $text_descr);
 $text_descr = str_replace("DFC Card", "DFC", $text_descr);
 $graph_array = array();
 $graph_array['to'] = $config['time']['now'];
 $graph_array['id'] = $proc['processor_id'];
 $graph_array['type'] = $graph_type;
 $graph_array['legend'] = "no";
 $link_array = $graph_array;
 $link_array['page'] = "graphs";
 unset($link_array['height'], $link_array['width'], $link_array['legend']);
 $link_graph = generate_url($link_array);
 $link = generate_url(array("page" => "device", "device" => $proc['device_id'], "tab" => "health", "metric" => 'processor'));
 $overlib_content = generate_overlib_content($graph_array, $proc['hostname'] . " - " . $text_descr, NULL);
 $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'];
 $mini_graph = generate_graph_tag($graph_array);
 $perc = round($proc['processor_usage']);
 $background = get_percentage_colours($perc);
 echo '<tr>
   <td>' . generate_device_link($proc) . '</td>
   <td>' . overlib_link($link, $text_descr, $overlib_content) . '</td>
   <td>' . overlib_link($link_graph, $mini_graph, $overlib_content) . '</td>
   <td><a href="' . $proc_url . '" ' . $proc_popup . '>
     ' . print_percentage_bar(400, 20, $perc, $perc . "%", "ffffff", $background['left'], 100 - $perc . "%", "ffffff", $background['right']) . '
     </a>
开发者ID:RomanBogachev,项目名称:observium,代码行数:31,代码来源:processor.inc.php


示例8: foreach

foreach ($app_list as $app) {
    echo '<div style="clear: both;">';
    echo '<h2>' . generate_link(nicecase($app['app_type']), array('page' => 'apps', 'app' => $app['app_type'])) . '</h2>';
    $app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($app['app_type']));
    foreach ($app_devices as $app_device) {
        $graph_type = $graphs[$app['app_type']][0];
        $graph_array['type'] = "application_" . $app['app_type'] . "_" . $graph_type;
        $graph_array['id'] = $app_device['app_id'];
        $graph_array_zoom['type'] = "application_" . $app['app_type'] . "_" . $graph_type;
        $graph_array_zoom['id'] = $app_device['app_id'];
        $link_array = $graph_array;
        $link_array['page'] = "device";
        $link_array['device'] = $app_device['device_id'];
        $link_array['tab'] = "apps";
        $link_array['app'] = $app['app_type'];
        unset($link_array['height'], $link_array['width']);
        $overlib_url = generate_url($link_array);
        $overlib_link = '<span style="float:left; margin-left: 10px; font-weight: bold;">' . shorthost($app_device['hostname']) . "</span>";
        if (!empty($app_device['app_instance'])) {
            $overlib_link .= '<span style="float:right; margin-right: 10px; font-weight: bold;">' . $app_device['app_instance'] . "</span>";
            $app_device['content_add'] = '(' . $app_device['app_instance'] . ')';
        }
        $overlib_link .= "<br/>";
        $overlib_link .= generate_graph_tag($graph_array);
        $overlib_content = generate_overlib_content($graph_array, $app_device['hostname'] . " - " . $app_device['app_type'] . $app_device['content_add']);
        echo "<div style='display: block; padding: 1px; padding-top: 3px; margin: 2px; min-width: " . $width_div . "px; max-width:" . $width_div . "px; min-height:165px; max-height:165px;\n                      text-align: center; float: left; background-color: #f5f5f5;'>";
        echo overlib_link($overlib_url, $overlib_link, $overlib_content);
        echo "</div>";
    }
    echo '</div>';
}
开发者ID:REAP720801,项目名称:librenms,代码行数:31,代码来源:overview.inc.php


示例9: array

 if (!$config['web_show_disabled']) {
     if ($cache['devices']['id'][$storage['device_id']]['disabled']) {
         continue;
     }
 }
 $graph_array = array();
 $graph_array['to'] = $config['time']['now'];
 $graph_array['id'] = $storage['storage_id'];
 $graph_array['type'] = $graph_type;
 $graph_array['legend'] = "no";
 $link_array = $graph_array;
 $link_array['page'] = "graphs";
 unset($link_array['height'], $link_array['width'], $link_array['legend']);
 $link_graph = generate_url($link_array);
 $link = generate_url(array("page" => "device", "device" => $storage['device_id'], "tab" => "health", "metric" => 'storage'));
 $overlib_content = generate_overlib_content($graph_array, $storage['hostname'] . " - " . $storage['storage_descr'], NULL);
 $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'];
 $mini_graph = generate_graph_tag($graph_array);
 $total = formatStorage($storage['storage_size']);
 $used = formatStorage($storage['storage_used']);
 $free = formatStorage($storage['storage_free']);
 $background = get_percentage_colours($storage['storage_perc']);
 echo '<tr>
   <td class=strong>' . generate_device_link($storage) . '</td>
   <td>' . overlib_link($link, $storage['storage_descr'], $overlib_content) . '</td>
   <td>' . $total . '</td>
   <td>' . $used . '</td>
开发者ID:RomanBogachev,项目名称:observium,代码行数:31,代码来源:storage.inc.php


示例10: generate_processor_row

function generate_processor_row($processor, $vars)
{
    global $config;
    $table_cols = 4;
    if ($vars['page'] != "device" && $vars['popup'] != TRUE) {
        $table_cols++;
    }
    // Add a column for device.
    // FIXME should that really be done here? :-)
    // FIXME - not it shouldn't. we need some per-os rewriting on discovery-time.
    $text_descr = $processor['processor_descr'];
    $text_descr = str_replace("Routing Processor", "RP", $text_descr);
    $text_descr = str_replace("Switching Processor", "SP", $text_descr);
    $text_descr = str_replace("Sub-Module", "Module ", $text_descr);
    $text_descr = str_replace("DFC Card", "DFC", $text_descr);
    $graph_array = array();
    $graph_array['to'] = $config['time']['now'];
    $graph_array['id'] = $processor['processor_id'];
    $graph_array['type'] = 'processor_usage';
    $graph_array['legend'] = "no";
    $link_array = $graph_array;
    $link_array['page'] = "graphs";
    unset($link_array['height'], $link_array['width'], $link_array['legend']);
    $link_graph = generate_url($link_array);
    $link = generate_url(array("page" => "device", "device" => $processor['device_id'], "tab" => "health", "metric" => 'processor'));
    $overlib_content = generate_overlib_content($graph_array, $processor['hostname'] . " - " . $text_descr);
    $graph_array['width'] = 80;
    $graph_array['height'] = 20;
    $graph_array['bg'] = 'ffffff00';
    $graph_array['from'] = $config['time']['day'];
    $mini_graph = generate_graph_tag($graph_array);
    $perc = round($processor['processor_usage']);
    $background = get_percentage_colours($perc);
    $processor['html_row_class'] = $background['class'];
    $row .= '<tr class="' . $processor['html_row_class'] . '">
          <td class="state-marker"></td>';
    if ($vars['page'] != "device" && $vars['popup'] != TRUE) {
        $row .= '<td class="entity">' . generate_device_link($processor) . '</td>';
    }
    $row .= '  <td class="entity">' . generate_entity_link('processor', $processor) . '</td>
      <td>' . overlib_link($link_graph, $mini_graph, $overlib_content) . '</td>
      <td><a href="' . $link_graph . '">
        ' . print_percentage_bar(400, 20, $perc, $perc . "%", "ffffff", $background['left'], 100 - $perc . "%", "ffffff", $background['right']) . '
        </a>
      </td>
    </tr>
   ';
    if ($vars['view'] == "graphs") {
        $vars['graph'] = "usage";
    }
    if ($vars['graph']) {
        $row .= '<tr class="' . $processor['html_row_class'] . '">';
        $row .= '<td class="state-marker"></td>';
        $row .= '<td colspan=' . $table_cols . '>';
        unset($graph_array['height'], $graph_array['width'], $graph_array['legend']);
        $graph_array['to'] = $config['time']['now'];
        $graph_array['id'] = $processor['processor_id'];
        $graph_array['type'] = 'processor_' . $vars['graph'];
        print_graph_row($graph_array, TRUE);
        $row .= '</td></tr>';
    }
    # endif graphs
    return $row;
}
开发者ID:Natolumin,项目名称:observium,代码行数:64,代码来源:processor.inc.php


示例11: array

     }
 }
 // FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
 // FIXME - So now we need to clean this up and move it into a function. Isn't it just "print-graphrow"?
 // FIXME - DUPLICATED IN device/overview/sensors
 $graph_array = array();
 $graph_array['to'] = $config['time']['now'];
 $graph_array['id'] = $sensor['sensor_id'];
 $graph_array['type'] = $graph_type;
 $graph_array['legend'] = "no";
 $link_array = $graph_array;
 $link_array['page'] = "graphs";
 unset($link_array['height'], $link_array['width'], $link_array['legend']);
 $link_graph = generate_url($link_array);
 $link = generate_url(array("page" => "device", "device" => $sensor['device_id'], "tab" => "health", "metric" => $sensor['sensor_class']));
 $overlib_content = generate_overlib_content($graph_array, $sensor['hostname'] . " - " . $sensor['sensor_descr'], NULL);
 $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, '');
 if ($class == "frequency") {
     echo '<tr>
   <td class=strong>' . generate_device_link($sensor) . '</td>
   <td>' . overlib_link($link, $sensor['sensor_descr'], $overlib_content) . '</td>
   <td>' . $alert . '</td>
   <td>' . overlib_link($link_graph, $sensor_minigraph, $overlib_content) . '</td>
   <td style="font-weight: bold;">' . format_si($sensor['sensor_value']) . $unit . '</td>
   <td>' . format_si(round($sensor['sensor_limit_low'], 2)) . $unit . ' - ' . format_si(round($sensor['sensor_limit'], 2)) . $unit . '</td>
开发者ID:RomanBogachev,项目名称:observium,代码行数:31,代码来源:sensors.inc.php


示例12: toner_to_colour

            $background = toner_to_colour($supply['supply_descr'], $percent);
        }
        $background_percent = get_percentage_colours($percent - 100);
        $graph_array = array();
        $graph_array['height'] = "100";
        $graph_array['width'] = "210";
        $graph_array['to'] = $config['time']['now'];
        $graph_array['id'] = $supply['supply_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'] . " - " . $supply['supply_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);
        $percent_text = $percent < 0 ? "Unknown" : $percent . "%";
        echo '<tr class="' . $background_percent['class'] . '">
           <td class="state-marker"></td>
           <td class="entity">' . overlib_link($link, $supply['supply_descr'], $overlib_content) . "</td>\n           <td style='width: 90px;'>" . overlib_link($link, $minigraph, $overlib_content) . "</td>\n           <td style='width: 200px;'>" . overlib_link($link, print_percentage_bar(400, 20, $percent, $percent_text, 'ffffff', $background['right'], NULL, "ffffff", $background['left']), $overlib_content) . "</td>\n         </tr>";
    }
    echo "</table>";
    echo generate_box_close();
}
unset($supply_rows);
// EOF
开发者ID:Natolumin,项目名称:observium,代码行数:31,代码来源:printersupplies.inc.php


示例13: array

 $graph_array = array();
 $graph_array['height'] = "100";
 $graph_array['width'] = "512";
 $graph_array['to'] = $config['time']['now'];
 $graph_array['device'] = $device['device_id'];
 $graph_array['type'] = 'device_processor';
 $graph_array['from'] = $config['time']['day'];
 $graph_array['legend'] = "no";
 $graph = generate_graph_tag($graph_array);
 $link_array = $graph_array;
 $link_array['page'] = "graphs";
 unset($link_array['height'], $link_array['width']);
 $graph_link = generate_url($link_array);
 $link = generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'health', 'metric' => 'processor'));
 $graph_array['width'] = "210";
 $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - Processor Usage");
 echo overlib_link($graph_link, $graph, $overlib_content, NULL);
 $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('<table class="table table-condensed-more table-striped table-bordered">');
 $numprocs = 0;
 $total_percent = 0;
 foreach ($processors as $proc) {
     $text_descr = rewrite_entity_name($proc['processor_descr']);
     # disable short hrDeviceDescr. need to make this prettier.
     #$text_descr = rewrite_hrDevice($proc['processor_descr']);
     $percent = $proc['processor_usage'];
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:processors-unix.inc.php


示例14: formatStorage

        $free = formatStorage($drive['storage_free']);
        $used = formatStorage($drive['storage_used']);
        $background = get_percentage_colours($percent);
        $graph_array = array();
        $graph_array['height'] = "100";
        $graph_array['width'] = "210";
        $graph_array['to'] = $config['time']['now'];
        $graph_array['id'] = $drive['storage_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'] . " - " . $drive['storage_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 class="entity" style="max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">' . generate_entity_link('storage', $drive) . '</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, $used . "/" . $total . " (" . $percent . "%)", "ffffff", $background['left'], $free . " (" . (100 - $percent) . "%)", "ffffff", $background['right']), $overlib_content) . '</td>

         </tr>';
    }
    echo "</table>";
    echo generate_box_close();
开发者ID:Natolumin,项目名称:observium,代码行数:31,代码来源:storage.inc.php


示例15: unset

         $height = 102;
         $height_div = 158;
     }
 }
 $graph_array['height'] = 100;
 $graph_array['width'] = 210;
 $graph_array['to'] = $config['time']['now'];
 $graph_array['id'] = $port['port_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, $port['hostname'] . " - " . rewrite_ifname($port['label']));
 $graph_array['title'] = "yes";
 $graph_array['width'] = $width;
 $graph_array['height'] = $height;
 $graph = generate_graph_tag($graph_array);
 echo "<div style='display: block; padding: 1px; margin: 2px; min-width: " . $width_div . "px; max-width:" . $width_div . "px; min-height:" . $height_div . "px; max-height:" . $height_div . "; text-align: center; float: left; background-color: #f5f5f5;'>";
 echo overlib_link($link, $graph, $overlib_content);
 echo "</div>";
 #    echo("<div style='display: block; padding: 1px; margin: 2px; min-width: 393px; max-width:393px; min-height:180px; max-height:180px; text-align: center; float: left; background-color: #f5f5f5;'>
 #    <a href='".generate_port_url($port)."/' onmouseover=\"return overlib('\
 #    <div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
 #    <img src=\'graph.php?type=$graph_type&amp;id=".$port['port_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=450&amp;height=150&amp;title=yes\'>\
 #    ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\"  >".
 #    "<img src='graph.php?type=$graph_type&amp;id=".$port['port_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=315&amp;height=110&amp;legend=no&amp;title=yes'>
 #    </a>
 #    </div>");
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:graphs.inc.php


示例16: round

$avai_perc = round($device_state['ucd_mem']['mem_avail'] / $device_state['ucd_mem']['mem_total'] * 100);
$graph_array = array();
$graph_array['height'] = "100";
$graph_array['width'] = "512";
$graph_array['to'] = $config['time']['now'];
$graph_array['device'] = $device['device_id'];
$graph_array['type'] = 'device_ucd_memory';
$graph_array['from'] = $config['time']['day'];
$graph_array['legend'] = "no";
$graph = generate_graph_tag($graph_array);
$link_array = $graph_array;
$link_array['page'] = "graphs";
unset($link_array['height'], $link_array['width']);
$link = generate_url($link_array);
$graph_array['width'] = "210";
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - Memory Usage");
echo overlib_link($link, $graph, $overlib_content, NULL);
$percentage_bar = array();
$percentage_bar['border'] = "#EA8F00";
$percentage_bar['border'] = "#E25A00";
$percentage_bar['bg'] = "#f0f0f0";
$percentage_bar['width'] = "100%";
$percentage_bar['text'] = $avai_perc . "%";
$percentage_bar['text_c'] = "#E25A00";
$percentage_bar['bars'][0] = array('percent' => $used_perc, 'colour' => '#FFAA66', 'text' => $used_perc_total . '%');
$percentage_bar['bars'][1] = array('percent' => $shar_perc, 'colour' => '#008fea', 'text' => '');
$percentage_bar['bars'][2] = array('percent' => $buff_perc, 'colour' => '#cc0000', 'text' => '');
$percentage_bar['bars'][3] = array('percent' => $cach_perc, 'colour' => '#f0e0a0', 'text' => '');
echo '<table width="100%" class="table table-striped table-condensed-more table-bordered">';
echo '  <tr>';
echo '    <td class="entity">RAM</td>';
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:ucd_mem.inc.php


示例17: foreach

foreach ($sensors as $sensor) {
    humanize_sensor($sensor);
    $alert = $sensor['state_event'] == 'alert' ? 'oicon-exclamation-red' : '';
    // FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
    // FIXME - DUPLICATED IN device/overview/sensors
    $graph_array = array();
    $graph_array['to'] = $config['time']['now'];
    $graph_array['id'] = $sensor['sensor_id'];
    $graph_array['type'] = "sensor_{$sensor_type}";
    $graph_array['legend'] = "no";
    $link_array = $graph_array;
    $link_array['page'] = "graphs";
    unset($link_array['height'], $link_array['width'], $link_array['legend']);
    $link_graph = generate_url($link_array);
    $link = generate_url(array("page" => "device", "device" => $sensor['device_id'], "tab" => "health", "metric" => $sensor['sensor_class']));
    $overlib_content = generate_overlib_content($graph_array, $sensor['hostname'] . " - " . htmlentities($sensor['sensor_descr']), NULL);
    $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['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);
        $sensor_misc = '<span class="label">' . $sensor['entPhysicalClass'] . '</span>';
    } else {
        $sensor_value = $sensor['human_value'];
        $sensor_minigraph = overlib_link($link, generate_graph_tag($graph_array), $overlib_content);
        if ($sensor['sensor_limit_low'] != NULL) {
            switch ($sensor['sensor_class']) {
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:sensors.inc.php


示例18: unset

     $graph_array['from'] = $vars['from'];
     $graph_array['to'] = $vars['to'];
 } else {
     $graph_array['from'] = $config['time']['day'];
     $graph_array['to'] = $config['time']['now'];
 }
 $graph_array['height'] = 100;
 $graph_array['width'] = 210;
 $graph_array['id'] = $port['port_id'];
 $graph_array['type'] = $graph_type;
 $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, $port['hostname'] . ' - ' . rewrite_ifname($port['label'], FALSE));
 $graph_array['title'] = "yes";
 $graph_array['width'] = $width;
 $graph_array['height'] = $height;
 $graph = generate_graph_tag($graph_array);
 echo "<div style='display: block; padding: 1px; margin: 2px; min-width: " . $width_div . "px; max-width:" . $width_div . "px; min-height:" . $height_div . "px; max-height:" . $height_div . "; text-align: center; float: left; background-color: #f5f5f5;'>";
 echo overlib_link($link, $graph, $overlib_content);
 echo "</div>";
 #    echo("<div style='display: block; padding: 1px; margin: 2px; min-width: 393px; max-width:393px; min-height:180px; max-height:180px; text-align: center; float: left; background-color: #f5f5f5;'>
 #    <a href='".generate_port_url($port)."/' onmouseover=\"return overlib('\
 #    <div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
 #    <img src=\'graph.php?type=$graph_type&amp;id=".$port['port_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=450&amp;height=150&amp;title=yes\'>\
 #    ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\"  >".
 #    "<img src='graph.php?type=$graph_type&amp;id=".$port['port_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=315&amp;height=110&amp;legend=no&amp;title=yes'>
 #    </a>
 #    </div>");
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:graphs.inc.php


示例19: round

 $memory_free = $app_data['memory']['to 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP generate_page_type_patterns函数代码示例发布时间:2022-05-15
下一篇:
PHP generate_name函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap