Added function to get all interfaces

This commit is contained in:
Arturo Gonzalez 2017-08-31 10:09:49 +02:00
parent e45face2fc
commit 7b949cb5bf
1 changed files with 20 additions and 0 deletions

View File

@ -1808,6 +1808,26 @@ function networkmap_get_new_nodes_from_ip_mask($ip_mask,
return $agents;
}
function modules_get_all_interfaces($id_agent) {
$return = array();
$modules = db_get_all_rows_filter('tagente_modulo',
array('id_agente' => $id_agent));
if (empty($modules))
$modules = array();
foreach ($modules as $module) {
if (preg_match ("/(.+)_ifOperStatus$/" , (string)$module['nombre'], $matches)) {
if ($matches[1]) {
$return[] = $module;
}
}
}
return $return;
}
?>
<script language="javascript" type="text/javascript">
$(document).ready (function () {