<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 
Beispiel #2
0
            $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';
    }
}