예제 #1
0
?>
        </div>
        
    </div>

    <div id='tray_host_device' class='tray_section'>
    
        <div class='tray_title'>
            <?php 
echo _('Device Type');
?>
        </div>
        
        <div class='tray_content'>
            <?php 
$dev_obj = $asset->get_devices();
$devices = $dev_obj->get_devices_list();
if (count($devices) > 0) {
    echo '<ul><li>' . implode('</li><li>', $devices) . '</li></ul>';
} else {
    echo '-';
}
?>
        </div>
    </div>
        
    <div id='tray_host_description' class='tray_section'>
    
        <div class='tray_title'>
            <?php 
echo _('Description');
예제 #2
0
$ctx_name = empty($ctx) ? _('None') : Session::get_entity_name($conn, $ctx);
$ctx_name = Util::utf8_encode2($ctx_name);
//Icon
$icon = $asset->get_icon();
$icon = !empty($icon) ? 'data:image/png;base64,' . base64_encode($icon) : '';
//Server related to CTX
$server_obj = Server::get_server_by_ctx($conn, $ctx);
$s_name = '';
$s_ip = '';
if ($server_obj) {
    $s_name = $server_obj->get_name();
    $s_ip = $server_obj->get_ip();
}
//Asset Sensors
$asset_sensors = $asset->get_sensors();
$sensors = $asset_sensors->get_sensors();
//Asset Devices
$asset_devices = $asset->get_devices();
$_devices = $asset_devices->get_devices();
$devices = array();
foreach ($_devices as $dt_id => $dt_data) {
    foreach ($dt_data as $dst_id => $d_name) {
        $device_id = $dt_id;
        $device_id .= $dst_id > 0 ? ':' . $dst_id : '';
        $devices[$device_id] = $d_name;
    }
}
$data['status'] = 'OK';
$data['data'] = array('is_in_db' => $is_in_db, 'is_editable' => $is_editable, 'id' => $id, 'ctx' => array('id' => $ctx, 'name' => $ctx_name, 'related_server' => array('ip' => $s_ip, 'name' => $s_name)), 'name' => $name, 'ip' => implode(',', $ips), 'descr' => $descr, 'external' => $external, 'fqdns' => $fqdns, 'asset_value' => $asset_value, 'location' => $location, 'icon' => $icon, 'os' => $os, 'model' => $model, 'sensors' => $sensors, 'devices' => $devices);
$db->close();
echo json_encode($data);
예제 #3
0
$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();
//Host Devices
$host_devices = $host->get_devices();
$devices = $host_devices->get_devices();
//Host Scan
$is_nagios_enabled = Asset_host_scan::is_plugin_in_host($conn, $id, 2007);
//Closing database connection
$db->close();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
    	<title><?php 
echo _("OSSIM Framework");
?>
</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>