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


PHP Check::prepareWarn方法代码示例

本文整理汇总了PHP中Check::prepareWarn方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::prepareWarn方法的具体用法?PHP Check::prepareWarn怎么用?PHP Check::prepareWarn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Check的用法示例。


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

示例1: dirname

<?php

include dirname(__FILE__) . '/../inc/init.php';
fAuthorization::requireLoggedIn();
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
$debug = fRequest::get('debug', 'boolean');
if (!$debug) {
    header('Content-type: application/json');
}
$check_id = fRequest::get('check_id', 'integer');
$check = new Check($check_id);
$url = GRAPHITE_URL . '/graphlot/rawdata?&from=-24hour&until=-0hour' . '&target=' . $check->prepareTarget() . '&target=keepLastValue(threshold(' . $check->prepareWarn() . '))';
//       '&target=threshold(' . $check->prepareError() . ')';
$contents = file_get_contents($url);
//$contents = file_get_contents(GRAPHITE_URL . '/graphlot/rawdata?&from=-24hour&until=-0hour&target=' . $check->prepareTarget() . '&target=' . $check->prepareWarn() . '&target=' . $check->prepareError());
print $contents;
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:17,代码来源:get_rawdata.php

示例2:

        ?>
        <tr>
        <td><?php 
        echo $status_array[$check_result->prepareStatus()];
        ?>
</td>
        <td><?php 
        echo $check_result->prepareValue();
        ?>
</td>
        <td><?php 
        echo $check->prepareError();
        ?>
</td>
        <td><?php 
        echo $check->prepareWarn();
        ?>
</td>
        <td><?php 
        echo $check_result->prepareState();
        ?>
</td>
        <td><?php 
        echo $check_result->prepareTimestamp('Y-m-d H:i:s');
        ?>
</td>
        </tr>
    <?php 
    }
    ?>
    </table></div>
开发者ID:nagyist,项目名称:Tattle,代码行数:31,代码来源:list_check_results.php

示例3: Check

    <th>Value</th>
    <th>Error</th>
    <th>Warn</th>
    <th>State</th>
    <th>Time</th>
       </tr>    
	<?php
	$first = TRUE;
	foreach ($check_results as $check_result) {
        $check = new Check($check_result->getCheck_Id());
		?>
    	<tr>
        <td><?php echo ($check_result->prepareStatus() == 2 ? 'Warning' : 'Error'); ?></td>
        <td><?php echo $check_result->prepareValue() ?></td>
        <td><?php echo $check->prepareError() ?></td>
        <td><?php echo $check->prepareWarn() ?></td>
        <td><?php echo $check_result->prepareState() ?></td>
        <td><?php echo $check_result->prepareTimestamp('Y-m-d H:i:s'); ?></td>
        <?php /*<div id="graphite-event-modal_<?php echo $check_result->getResult_Id(); ?>" class="modal hide fade">
            <div class="modal-header">
              <a href="#" class="close">&times;</a>
              <h3>view Event</h3>
            </div>
            <div class="modal-body">
              Event Details
            </div>
          </div>*/ ?>
        </tr>
    <?php } ?>
    </table></div>
    <?
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:31,代码来源:list_check_results.php

示例4: Check

    <th>Value</th>
    <th>Error</th>
    <th>Warn</th>
    <th>State</th>
    <th>Time</th>
       </tr>    
	<?php
	$first = TRUE;
	foreach ($check_results as $check_result) {
        $check = new Check($check_result->getCheck_Id());
	?>
    	<tr>
        <td><?=($check_result->prepareStatus() == 2 ? 'Warning' : 'Error'); ?></td>
        <td><?=$check_result->prepareValue(); ?></td>
        <td><?=$check->prepareError(); ?></td>
        <td><?=$check->prepareWarn(); ?></td>
        <td><?=$check_result->prepareState(); ?></td>
        <td><?=$check_result->prepareTimestamp('Y-m-d H:i:s'); ?></td>
        </tr>
    <?php } ?>
    </table></div>
    <?
    //check to see if paging is needed
    $total_pages = ceil($check_results->count(TRUE) / $GLOBALS['PAGE_SIZE']);
    if ($total_pages > 1) {
      $prev_class = 'previous';
      $current_link = fURL::get() . "?action=$action&check_id=$check_id";
      $prev_link = $current_link . '&page=' . ($page_num - 1);
      $next_class = 'next';
      $next_link = $current_link . '&page=' . ($page_num + 1);
      if ($page_num == 1) {
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:list_check_results.php


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