当前位置: 首页>>代码示例>>PHP>>正文


PHP Asset_host::get_devices方法代码示例

本文整理汇总了PHP中Asset_host::get_devices方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset_host::get_devices方法的具体用法?PHP Asset_host::get_devices怎么用?PHP Asset_host::get_devices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Asset_host的用法示例。


在下文中一共展示了Asset_host::get_devices方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _

?>
        </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');
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:asset_tray.php

示例2: json_encode

$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);
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:get_asset_info.php

示例3: _

$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"/>
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:host_form.php


注:本文中的Asset_host::get_devices方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。