本文整理汇总了PHP中Check::findAllByGroupId方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::findAllByGroupId方法的具体用法?PHP Check::findAllByGroupId怎么用?PHP Check::findAllByGroupId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Check
的用法示例。
在下文中一共展示了Check::findAllByGroupId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<th class="masterTooltip" title="Graph Target that will be checked in Graphite">Target</th>
<th class="masterTooltip" title="The threshold level at which a Warning will be triggered">Warn</th>
<th class="masterTooltip" title="The threshold level at which an Error will be triggered">Error</th>
<th class="masterTooltip" title="Number of data points to use when calculating the moving average. Each data point spans one minute">Sample</th>
<th>Baseline</th>
<th class="masterTooltip" title="Over will trigger an alert when the value retrieved from Graphite is greater than the warning or error threshold. Under will trigger an alert when the value retrieved from Graphite is less than the warning or the error threshold">Over/Under</th>
<th class="masterTooltip" title="Public checks can be subscribed to by any user while private checks remain hidden from other users">Visibility</th>
<th>Action</th>
</tr></thead>
<tbody>
<?php
$first = TRUE;
if ($filter_group_id == -1) {
$checks = Check::findAll($check_type);
} else {
$checks = Check::findAllByGroupId($check_type, $filter_group_id);
}
if (isset($filter_text) && $filter_text != '') {
$filtered_checks = $checks->filter(array('getTarget|getName~' => $filter_text));
} else {
$filtered_checks = $checks;
}
foreach ($filtered_checks as $check) {
?>
<tr>
<td class="name">
<a href="<?php
echo CheckResult::makeURL('list', $check);
?>
">
<?php
示例2: catch
$check->setHourStart($hourStart);
$check->setHourEnd($hourEnd);
$check->setDayStart($dayStart);
$check->setDayEnd($dayEnd);
fRequest::validateCSRFToken(fRequest::get('token'));
$check->store();
fMessaging::create('affected', fURL::get(), $check->getName());
fMessaging::create('success', fURL::get(), 'The check ' . $check->getName() . ' was successfully created');
fURL::redirect($check_list_url);
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
}
if ($check_type == 'threshold') {
include VIEW_PATH . '/add_edit.php';
} elseif ($check_type == 'predictive') {
include VIEW_PATH . '/add_edit_predictive_check.php';
}
} else {
$page_num = fRequest::get('page', 'int', 1);
if ($filter_group_id == -1) {
$checks = Check::findAll($check_type, $sort, $sort_dir, $GLOBALS['PAGE_SIZE'], $page_num);
} else {
$checks = Check::findAllByGroupId($check_type, $filter_group_id, $sort, $sort_dir, $GLOBALS['PAGE_SIZE'], $page_num);
}
if ($check_type == 'threshold') {
include VIEW_PATH . '/list_checks.php';
} elseif ($check_type == 'predictive') {
include VIEW_PATH . '/list_predictive_checks.php';
}
}