예제 #1
0
list($all_sensors, $s_total) = Av_sensor::get_list($conn, '', FALSE, TRUE);
//Getting host data
$id = $host->get_id();
$name = $host->get_name();
//CTX
$ctx = $host->get_ctx();
$ctx_name = empty($ctx) ? _('None') : Session::get_entity_name($conn, $ctx);
$is_ext_ctx = FALSE;
$context_type = 'local';
$ext_ctxs = Session::get_external_ctxs($conn);
if (!empty($ext_ctxs[$ctx])) {
    $is_ext_ctx = TRUE;
    $context_type = 'remote';
}
$descr = $host->get_descr();
$icon = $host->get_html_icon();
$fqdns = $host->get_fqdns();
$external = $host->get_external();
$location = $host->get_location();
$latitude = $location['lat'];
$longitude = $location['lon'];
$zoom = $location['zoom'];
$asset_value = $host->get_asset_value();
$threshold_a = $host->get_threshold_a();
$threshold_c = $host->get_threshold_c();
//Host Ips
$host_ips = $host->get_ips();
$ips = $host_ips->get_ips('string');
//Host Sensors
$host_sensors = $host->get_sensors();
$sensors = $host_sensors->get_sensors();