コード例 #1
0
ファイル: otx_pulse.php プロジェクト: jackpf/ossim-arc
function get_pulse_detail()
{
    $data = POST('data');
    ossim_valid($data['pulse_id'], OSS_HEX, 'illegal: Pulse ID');
    if (ossim_error()) {
        return array();
    }
    $otx = new Otx();
    $pulse = $otx->get_pulse_detail($data['pulse_id']);
    //Converting indicator hash to array to use it in the datatables.
    $pulse['indicators'] = array_values($pulse['indicators']);
    return $pulse;
}
コード例 #2
0
ファイル: base_common.php プロジェクト: jackpf/ossim-arc
function GetPulseName($pulse_id)
{
    if (!isset($_SESSION['_pulse_names'])) {
        $_SESSION['_pulse_names'] = array();
    }
    if ($_SESSION['_pulse_names'][$pulse_id] != '') {
        return $_SESSION['_pulse_names'][$pulse_id];
    }
    global $otx_unknown;
    $name = $otx_unknown;
    if (empty($pulse_id)) {
        return $name;
    }
    try {
        $otx = new Otx();
        $pulse = $otx->get_pulse_detail(strtolower($pulse_id), TRUE);
        if (!empty($pulse['name'])) {
            $name = Util::htmlentities(trim($pulse['name']), ENT_NOQUOTES);
        }
    } catch (Exception $e) {
    }
    $_SESSION['_pulse_names'][$pulse_id] = $name;
    return $name;
}
コード例 #3
0
ファイル: alarm_console.php プロジェクト: jackpf/ossim-arc
$parameters['beep'] = "beep=" . $beep;
$parameters['host_id'] = "host_id=" . $host_id;
$parameters['net_id'] = "net_id=" . $net_id;
$parameters['ctx'] = "ctx=" . $ctx;
$parameters['otx_activity'] = "otx_activity=" . $otx_activity;
$parameters['pulse_id'] = "pulse_id=" . $pulse_id;
$params_alarm = implode("&", $parameters);
$refresh_url = "alarm_console.php?" . $params_alarm;
//Autocompleted
$autocomplete_keys = array('hosts');
$hosts_str = Autocomplete::get_autocomplete($conn, $autocomplete_keys);
$pulse_name = '';
if ($pulse_id) {
    try {
        $otx = new Otx();
        $_p_data = $otx->get_pulse_detail($pulse_id, TRUE);
        $pulse_name = $_p_data['name'];
    } catch (Exception $e) {
    }
}
//Cleaning the stats
unset($_SESSION["_alarm_stats"]);
//New alarm time flag for new beep alarm.
$_SESSION['_alarm_last_refresh_time'] = gmdate("U");
$refresh_time_secs = 300;
$alarm_url = Alarm::get_alarm_path();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title><?php