mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
2012-12-06 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php, operation/integria_incidents/incident.php, godmode/massive/massive_delete_modules.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_plugin.php, godmode/agentes/fields_manager.php, godmode/agentes/module_manager.php, godmode/users/profile_list.php, godmode/events/event_filter.php: cleaned source code style. * operation/tree.php: fixed the url to childrem consoles from the metaconsole tree. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7234 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2dcd884f15
commit
c422f1a9b5
@ -1,3 +1,17 @@
|
||||
2012-12-06 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_agents.php,
|
||||
operation/integria_incidents/incident.php,
|
||||
godmode/massive/massive_delete_modules.php,
|
||||
godmode/modules/manage_network_templates_form.php,
|
||||
godmode/modules/manage_network_components_form_plugin.php,
|
||||
godmode/agentes/fields_manager.php,
|
||||
godmode/agentes/module_manager.php, godmode/users/profile_list.php,
|
||||
godmode/events/event_filter.php: cleaned source code style.
|
||||
|
||||
* operation/tree.php: fixed the url to childrem consoles from the
|
||||
metaconsole tree.
|
||||
|
||||
2012-12-05 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandoradb_data.sql,
|
||||
|
@ -136,7 +136,8 @@ if ($multiple_delete) {
|
||||
if (db_process_sql("UPDATE tagente_modulo
|
||||
SET nombre = 'pendingdelete', disabled = 1, delete_pending = 1 WHERE id_agente_modulo = ".$id_agent_module_del, "affected_rows", '', true, $status, false) === false) {
|
||||
$error++;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// Update module status count
|
||||
if ($module !== false) {
|
||||
if ($module['utimestamp'] == 0) {
|
||||
|
@ -238,5 +238,4 @@ foreach ($profiles as $profile) {
|
||||
echo "</div>";
|
||||
echo '</form>';
|
||||
unset ($table);
|
||||
|
||||
?>
|
@ -359,19 +359,24 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
|
||||
switch ($filter['status']) {
|
||||
// Normal
|
||||
case 0:
|
||||
$status_sql = "normal_count=total_count";
|
||||
$status_sql =
|
||||
"normal_count = total_count";
|
||||
break;
|
||||
// Warning
|
||||
case 2:
|
||||
$status_sql = "critical_count=0 AND warning_count>0";
|
||||
$status_sql =
|
||||
"critical_count = 0 AND warning_count > 0";
|
||||
break;
|
||||
// Critical
|
||||
case 1:
|
||||
$status_sql = "critical_count>0";
|
||||
$status_sql =
|
||||
"critical_count > 0";
|
||||
break;
|
||||
// Unknown
|
||||
case 3:
|
||||
$status_sql = "critical_count=0 AND warning_count=0 AND unknown_count>0";
|
||||
$status_sql =
|
||||
"critical_count = 0 AND warning_count = 0
|
||||
AND unknown_count > 0";
|
||||
break;
|
||||
// Not normal
|
||||
case 4:
|
||||
@ -459,10 +464,12 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
|
||||
}
|
||||
|
||||
if ($extra) {
|
||||
$where = sprintf('(%s OR (%s)) AND (%s) AND (%s) %s', $sql_extra, $where, $where_nogroup, $status_sql, $search);
|
||||
$where = sprintf('(%s OR (%s)) AND (%s) AND (%s) %s',
|
||||
$sql_extra, $where, $where_nogroup, $status_sql, $search);
|
||||
}
|
||||
else {
|
||||
$where = sprintf('%s AND %s AND (%s) %s', $where, $where_nogroup, $status_sql, $search);
|
||||
$where = sprintf('%s AND %s AND (%s) %s',
|
||||
$where, $where_nogroup, $status_sql, $search);
|
||||
}
|
||||
$sql = sprintf('SELECT %s
|
||||
FROM tagente
|
||||
|
@ -172,6 +172,7 @@ if($attach_file == 1) {
|
||||
break;
|
||||
default:
|
||||
ui_print_error_message (__('Generic upload error').'(Code: '.$_FILES['new_file']['error'].')');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ if (is_ajax ())
|
||||
if (enterprise_include_once('include/functions_policies.php') !== ENTERPRISE_NOT_HOOK) {
|
||||
$enterpriseEnable = true;
|
||||
require_once ('enterprise/include/functions_policies.php');
|
||||
require_once ('enterprise/meta/include/functions_ui_meta.php');
|
||||
}
|
||||
|
||||
$type = get_parameter('type');
|
||||
@ -59,7 +60,8 @@ if (is_ajax ())
|
||||
$server = metaconsole_get_connection ($server_name);
|
||||
metaconsole_connect($server);
|
||||
$console_url = $server['server_url'] . '/';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$console_url = '';
|
||||
}
|
||||
|
||||
@ -356,14 +358,64 @@ if (is_ajax ())
|
||||
|
||||
if (defined ('METACONSOLE')) {
|
||||
$console_url = $server['server_url'] . '/';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$console_url = '';
|
||||
}
|
||||
$link ="winopeng('" . $console_url . "operation/agentes/stat_win.php?type=$graph_type&period=86400&id=".$row["id_agente_modulo"]."&label=".base64_encode($row["nombre"])."&refresh=600','day_".$win_handle."')";
|
||||
|
||||
|
||||
//Icon and link to the Module graph.
|
||||
if (defined('METACONSOLE')) {
|
||||
$url_module_graph = ui_meta_get_url_console_child(
|
||||
$server['id'], null, null, null, null,
|
||||
"operation/agentes/stat_win.php?" .
|
||||
"type=$graph_type&" .
|
||||
"period=86400&" .
|
||||
"id=" . $row["id_agente_modulo"] . "&" .
|
||||
"label=" . base64_encode($row["nombre"]) . "&" .
|
||||
"refresh=600");
|
||||
}
|
||||
else {
|
||||
$url_module_graph = $console_url .
|
||||
"operation/agentes/stat_win.php?" .
|
||||
"type=$graph_type&" .
|
||||
"period=86400&" .
|
||||
"id=" . $row["id_agente_modulo"] . "&" .
|
||||
"label=" . base64_encode($row["nombre"]) . "&" .
|
||||
"refresh=600";
|
||||
}
|
||||
$link ="winopeng('" . $url_module_graph . "','day_".$win_handle."')";
|
||||
echo '<a href="javascript: '.$link.'">' . html_print_image ("images/chart_curve.png", true, array ("style" => 'vertical-align: middle;', "border" => "0" )) . '</a>';
|
||||
|
||||
|
||||
echo " ";
|
||||
echo "<a href='" . $console_url . "index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" . $row['id_agente'] . "&tab=data_view&period=86400&id=".$row["id_agente_modulo"]."'>" . html_print_image ("images/binary.png", true, array ("style" => 'vertical-align: middle;', "border" => "0" )) . "</a>";
|
||||
|
||||
|
||||
//Icon and link to the Module data.
|
||||
if (defined('METACONSOLE')) {
|
||||
|
||||
$url_module_data = ui_meta_get_url_console_child(
|
||||
$server['id'],
|
||||
"estado", "operation/agentes/ver_agente",
|
||||
"id_agente=" . $row['id_agente'] . "&" .
|
||||
"tab=data_view&" .
|
||||
"period=86400&" .
|
||||
"id=" . $row["id_agente_modulo"]);
|
||||
}
|
||||
else {
|
||||
$url_module_data = $console_url .
|
||||
"index.php?" .
|
||||
"sec=estado&" .
|
||||
"sec2=operation/agentes/ver_agente&" .
|
||||
"id_agente=" . $row['id_agente'] . "&" .
|
||||
"tab=data_view&" .
|
||||
"period=86400&" .
|
||||
"id=" . $row["id_agente_modulo"];
|
||||
}
|
||||
echo "<a href='" . $url_module_data . "'>" . html_print_image ("images/binary.png", true, array ("style" => 'vertical-align: middle;', "border" => "0" )) . "</a>";
|
||||
|
||||
echo " ";
|
||||
|
||||
echo io_safe_output($row['nombre']);
|
||||
if ($row['quiet']) {
|
||||
echo " ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user