2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php include/functions_users.php include/functions_html.php include/functions_menu.php include/functions_messages.php include/functions_modules.php include/functions_reporting.php include/functions_groups.php include/functions_gis.php include/auth/ldap.php include/auth/mysql.php include/functions_networkmap.php include/functions_network_components.php include/functions_visual_map.php include/functions_profile.php include/ajax/visual_console_builder.ajax.php include/ajax/alert_list.ajax.php include/ajax/module.php include/functions_config.php include/functions_api.php include/functions_ui.php include/functions_custom_graphs.php include/fgraph.php include/functions_agents.php include/functions_db.php include/functions_alerts.php include/functions_reports.php index.php extensions/insert_data.php extensions/agents_modules.php extensions/resource_registration.php extensions/resource_exportation.php extensions/module_groups.php operation/incidents/incident_detail.php operation/search_modules.php operation/agentes/status_monitor.php operation/agentes/export_csv.php operation/agentes/estado_ultimopaquete.php operation/agentes/datos_agente.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/sla_view.php operation/agentes/exportdata.php operation/agentes/gis_view.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/graphs.php operation/agentes/group_view.php operation/search_agents.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/integria_incidents/incident_detail.php operation/gis_maps/render_view.php operation/gis_maps/ajax.php operation/events/events_rss.php operation/events/export_csv.php operation/events/events_list.php operation/events/events_marquee.php operation/events/events.php operation/search_alerts.php operation/messages/message.php operation/search_users.php mobile/operation/agents/monitor_status.php mobile/operation/agents/view_agents.php mobile/operation/agents/view_alerts.php mobile/operation/agents/group_view.php mobile/operation/events/events.php ajax.php general/ui/agents_list.php godmode/groups/configure_group.php godmode/groups/group_list.php godmode/db/db_refine.php godmode/db/db_info.php godmode/db/db_purge.php godmode/agentes/module_manager_editor_common.php godmode/agentes/module_manager_editor_network.php godmode/agentes/module_manager_editor_wmi.php godmode/agentes/module_manager_editor_plugin.php godmode/agentes/module_manager_editor_prediction.php godmode/agentes/agent_conf_gis.php godmode/agentes/module_manager.php godmode/agentes/modificar_agente.php godmode/agentes/configurar_agente.php godmode/agentes/module_manager_editor.php godmode/agentes/planned_downtime.php godmode/agentes/manage_config_remote.php godmode/agentes/agent_manager.php godmode/servers/manage_recontask_form.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.php godmode/alerts/alert_list.php godmode/alerts/configure_alert_template.php godmode/alerts/alert_templates.php godmode/alerts/configure_alert_action.php godmode/alerts/alert_actions.php godmode/alerts/alert_list.builder.php godmode/setup/setup_auth.php godmode/users/user_list.php godmode/users/configure_user.php godmode/users/configure_profile.php godmode/massive/massive_add_alerts.php godmode/massive/massive_copy_modules.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.php godmode/massive/massive_delete_profiles.php godmode/massive/massive_edit_agents.php godmode/massive/massive_delete_action_alerts.php godmode/massive/massive_delete_modules.php godmode/massive/massive_add_profiles.php godmode/massive/massive_delete_alerts.php godmode/massive/massive_edit_modules.php godmode/massive/massive_standby_alerts.php godmode/massive/massive_add_action_alerts.php godmode/reporting/visual_console_builder.wizard.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/visual_console_builder.php godmode/reporting/reporting_builder.main.php godmode/reporting/visual_console_builder.data.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.php godmode/reporting/reporting_builder.item_editor.php: Functions in functions_profile.php, functions_agents.php, functions_users.php, functions_massive_policies.php, functions_audit.php, functions_backup.php, functions_collection.php, functions_skins.php, functions_enterprise.php, functions_groups.php, functions_local_components.php, functions_metaconsole.php, functions_policies.php, functions_reporting.php, functions_reporting_csv.php, functions_reporting_pdf2.php, functions_services.php have their own prefixes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b5e26cc7ef
commit
e0b8795251
|
@ -1,3 +1,136 @@
|
|||
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_graph.php
|
||||
include/functions_users.php
|
||||
include/functions_html.php
|
||||
include/functions_menu.php
|
||||
include/functions_messages.php
|
||||
include/functions_modules.php
|
||||
include/functions_reporting.php
|
||||
include/functions_groups.php
|
||||
include/functions_gis.php
|
||||
include/auth/ldap.php
|
||||
include/auth/mysql.php
|
||||
include/functions_networkmap.php
|
||||
include/functions_network_components.php
|
||||
include/functions_visual_map.php
|
||||
include/functions_profile.php
|
||||
include/ajax/visual_console_builder.ajax.php
|
||||
include/ajax/alert_list.ajax.php
|
||||
include/ajax/module.php
|
||||
include/functions_config.php
|
||||
include/functions_api.php
|
||||
include/functions_ui.php
|
||||
include/functions_custom_graphs.php
|
||||
include/fgraph.php
|
||||
include/functions_agents.php
|
||||
include/functions_db.php
|
||||
include/functions_alerts.php
|
||||
include/functions_reports.php
|
||||
index.php
|
||||
extensions/insert_data.php
|
||||
extensions/agents_modules.php
|
||||
extensions/resource_registration.php
|
||||
extensions/resource_exportation.php
|
||||
extensions/module_groups.php
|
||||
operation/incidents/incident_detail.php
|
||||
operation/search_modules.php
|
||||
operation/agentes/status_monitor.php
|
||||
operation/agentes/export_csv.php
|
||||
operation/agentes/estado_ultimopaquete.php
|
||||
operation/agentes/datos_agente.php
|
||||
operation/agentes/alerts_status.php
|
||||
operation/agentes/estado_generalagente.php
|
||||
operation/agentes/estado_agente.php
|
||||
operation/agentes/sla_view.php
|
||||
operation/agentes/exportdata.php
|
||||
operation/agentes/gis_view.php
|
||||
operation/agentes/estado_monitores.php
|
||||
operation/agentes/ver_agente.php
|
||||
operation/agentes/graphs.php
|
||||
operation/agentes/group_view.php
|
||||
operation/search_agents.php
|
||||
operation/snmpconsole/snmp_view.php
|
||||
operation/users/user_edit.php
|
||||
operation/integria_incidents/incident_detail.php
|
||||
operation/gis_maps/render_view.php
|
||||
operation/gis_maps/ajax.php
|
||||
operation/events/events_rss.php
|
||||
operation/events/export_csv.php
|
||||
operation/events/events_list.php
|
||||
operation/events/events_marquee.php
|
||||
operation/events/events.php
|
||||
operation/search_alerts.php
|
||||
operation/messages/message.php
|
||||
operation/search_users.php
|
||||
mobile/operation/agents/monitor_status.php
|
||||
mobile/operation/agents/view_agents.php
|
||||
mobile/operation/agents/view_alerts.php
|
||||
mobile/operation/agents/group_view.php
|
||||
mobile/operation/events/events.php
|
||||
ajax.php
|
||||
general/ui/agents_list.php
|
||||
godmode/groups/configure_group.php
|
||||
godmode/groups/group_list.php
|
||||
godmode/db/db_refine.php
|
||||
godmode/db/db_info.php
|
||||
godmode/db/db_purge.php
|
||||
godmode/agentes/module_manager_editor_common.php
|
||||
godmode/agentes/module_manager_editor_network.php
|
||||
godmode/agentes/module_manager_editor_wmi.php
|
||||
godmode/agentes/module_manager_editor_plugin.php
|
||||
godmode/agentes/module_manager_editor_prediction.php
|
||||
godmode/agentes/agent_conf_gis.php
|
||||
godmode/agentes/module_manager.php
|
||||
godmode/agentes/modificar_agente.php
|
||||
godmode/agentes/configurar_agente.php
|
||||
godmode/agentes/module_manager_editor.php
|
||||
godmode/agentes/planned_downtime.php
|
||||
godmode/agentes/manage_config_remote.php
|
||||
godmode/agentes/agent_manager.php
|
||||
godmode/servers/manage_recontask_form.php
|
||||
godmode/alerts/alert_list.list.php
|
||||
godmode/alerts/configure_alert_compound.php
|
||||
godmode/alerts/alert_compounds.php
|
||||
godmode/alerts/alert_list.php
|
||||
godmode/alerts/configure_alert_template.php
|
||||
godmode/alerts/alert_templates.php
|
||||
godmode/alerts/configure_alert_action.php
|
||||
godmode/alerts/alert_actions.php
|
||||
godmode/alerts/alert_list.builder.php
|
||||
godmode/setup/setup_auth.php
|
||||
godmode/users/user_list.php
|
||||
godmode/users/configure_user.php
|
||||
godmode/users/configure_profile.php
|
||||
godmode/massive/massive_add_alerts.php
|
||||
godmode/massive/massive_copy_modules.php
|
||||
godmode/massive/massive_delete_agents.php
|
||||
godmode/massive/massive_enable_disable_alerts.php
|
||||
godmode/massive/massive_delete_profiles.php
|
||||
godmode/massive/massive_edit_agents.php
|
||||
godmode/massive/massive_delete_action_alerts.php
|
||||
godmode/massive/massive_delete_modules.php
|
||||
godmode/massive/massive_add_profiles.php
|
||||
godmode/massive/massive_delete_alerts.php
|
||||
godmode/massive/massive_edit_modules.php
|
||||
godmode/massive/massive_standby_alerts.php
|
||||
godmode/massive/massive_add_action_alerts.php
|
||||
godmode/reporting/visual_console_builder.wizard.php
|
||||
godmode/reporting/reporting_builder.list_items.php
|
||||
godmode/reporting/visual_console_builder.php
|
||||
godmode/reporting/reporting_builder.main.php
|
||||
godmode/reporting/visual_console_builder.data.php
|
||||
godmode/reporting/visual_console_builder.elements.php
|
||||
godmode/reporting/graph_builder.graph_editor.php
|
||||
godmode/reporting/reporting_builder.php
|
||||
godmode/reporting/reporting_builder.item_editor.php: Functions in
|
||||
functions_profile.php, functions_agents.php, functions_users.php,
|
||||
functions_massive_policies.php, functions_audit.php, functions_backup.php,
|
||||
functions_collection.php, functions_skins.php, functions_enterprise.php,
|
||||
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
|
||||
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
|
||||
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
|
||||
|
||||
2011-05-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_profile.php: modified the function "create_user_profile"
|
||||
|
|
|
@ -39,7 +39,7 @@ $page .= '.php';
|
|||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK)
|
||||
$config["relative_path"] = enterprise_hook('set_image_skin_path',array($config['id_user']));
|
||||
$config["relative_path"] = enterprise_hook('skins_set_image_skin_path',array($config['id_user']));
|
||||
session_write_close ();
|
||||
if (file_exists ($page)) {
|
||||
require_once ($page);
|
||||
|
|
|
@ -69,7 +69,7 @@ function mainAgentsModules() {
|
|||
$hor_offset = get_parameter('hor_offset', 0);
|
||||
$block = 20;
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$filter_module_groups = '<form method="post" action="' . ui_get_url_refresh (array ('offset' => 0, 'hor_offset' => 0)).'">';
|
||||
$filter_module_groups .= '<b>'.__('Module group').'</b>';
|
||||
|
@ -115,7 +115,7 @@ function mainAgentsModules() {
|
|||
|
||||
$agents = '';
|
||||
if($group_id > 0) {
|
||||
$agents = get_group_agents($group_id);
|
||||
$agents = agents_get_group_agents($group_id);
|
||||
$agents = array_keys($agents);
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ function mainAgentsModules() {
|
|||
$filter_module_groups['id_module_group'] = $modulegroup;
|
||||
}
|
||||
|
||||
$all_modules = get_agent_modules($agents, false, $filter_module_groups, true, false);
|
||||
$all_modules = agents_get_modules($agents, false, $filter_module_groups, true, false);
|
||||
|
||||
$modules_by_name = array();
|
||||
$name = '';
|
||||
|
@ -197,7 +197,7 @@ function mainAgentsModules() {
|
|||
|
||||
foreach ($agents as $agent) {
|
||||
// Get stats for this group
|
||||
$agent_status = get_agent_status($agent['id_agente']);
|
||||
$agent_status = agents_get_status($agent['id_agente']);
|
||||
|
||||
switch($agent_status) {
|
||||
case 4: // Alert fired status
|
||||
|
@ -228,7 +228,7 @@ function mainAgentsModules() {
|
|||
|
||||
$file_name = string2image(ui_print_truncate_text($agent['nombre'],19, false, true, false, '...'), 140, 15, 3, 0, $rowcolor, $textcolor, 4, 0);
|
||||
echo "<td style='background-color: ".$rowcolor.";'><a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>".html_print_image($file_name, true, array('title' => $agent['nombre']))."</a></td>";
|
||||
$agent_modules = get_agent_modules($agent['id_agente']);
|
||||
$agent_modules = agents_get_modules($agent['id_agente']);
|
||||
|
||||
$nmodules = 0;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ function mainInsertData() {
|
|||
|
||||
|
||||
if ($save) {
|
||||
if (!check_acl($config['id_user'], get_agent_group(get_agent_id($id_agent)), "AW")) {
|
||||
if (!check_acl($config['id_user'], agents_get_agent_group(agents_get_agent_id($id_agent)), "AW")) {
|
||||
ui_print_error_message(__('You haven\'t privileges for insert data in the agent.'));
|
||||
}
|
||||
else {
|
||||
|
@ -122,7 +122,7 @@ function mainInsertData() {
|
|||
$table->data[1][0] = __('Module');
|
||||
$modules = array ();
|
||||
if ($id_agent)
|
||||
$modules = get_agent_modules ($id_agent, false, array("delete_pending" => 0));
|
||||
$modules = agents_get_modules ($id_agent, false, array("delete_pending" => 0));
|
||||
$table->data[1][1] = html_print_select ($modules, 'id_agent_module', $id_agent_module, true,
|
||||
__('Select'), 0, true, false, true, '', ($id_agent === ''));
|
||||
$table->data[2][0] = __('Data');
|
||||
|
|
|
@ -27,7 +27,7 @@ if (is_ajax ()) {
|
|||
$id_agent_group = (int)get_parameter('id_agent_group');
|
||||
|
||||
if ($get_info_alert_module_group) {
|
||||
$agents = get_group_agents($id_agent_group);
|
||||
$agents = agents_get_group_agents($id_agent_group);
|
||||
if (!empty($agents)) {
|
||||
$alerts = agents_get_alerts_simple($agents);
|
||||
|
||||
|
@ -123,8 +123,8 @@ function mainModuleGroups() {
|
|||
echo "<p>" . __("This table shows in columns the modules group and in rows agents group. The cell shows all modules") . "</p>";
|
||||
|
||||
|
||||
$agentGroups = get_user_groups ($config['id_user'], "AR", false);
|
||||
$modelGroups = get_all_model_groups();
|
||||
$agentGroups = users_get_groups ($config['id_user'], "AR", false);
|
||||
$modelGroups = users_get_all_model_groups();
|
||||
array_walk($modelGroups, 'translate'); //Translate all head titles to language is set
|
||||
|
||||
foreach ($modelGroups as $i => $n) {
|
||||
|
@ -159,7 +159,7 @@ function mainModuleGroups() {
|
|||
$rowsDB = db_get_all_rows_sql ($query);
|
||||
|
||||
|
||||
$agents = get_group_agents($idAgentGroup);
|
||||
$agents = agents_get_group_agents($idAgentGroup);
|
||||
if (!empty($agents)) {
|
||||
$alerts = agents_get_alerts_simple($agents);
|
||||
|
||||
|
|
|
@ -103,12 +103,12 @@ function output_xml_report($id) {
|
|||
echo "<description>" . io_safe_output($item['description']) . "</description>\n";
|
||||
echo "<period>" . io_safe_output($item['period']) . "</period>\n";
|
||||
if ($item['id_agent'] != 0) {
|
||||
$agent = get_agent_name($item['id_agent']);
|
||||
$agent = agents_get_name($item['id_agent']);
|
||||
}
|
||||
if ($item['id_agent_module'] != 0) {
|
||||
$module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']);
|
||||
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']);
|
||||
$agent = get_agent_name($item['id_agent']);
|
||||
$agent = agents_get_name($item['id_agent']);
|
||||
|
||||
echo "<module><![CDATA[" . io_safe_output($module) . "]]></module>\n";
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ function output_xml_report($id) {
|
|||
foreach ($slas as $sla) {
|
||||
$module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']);
|
||||
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']);
|
||||
$agent = get_agent_name($item['id_agent']);
|
||||
$agent = agents_get_name($item['id_agent']);
|
||||
echo "<sla>";
|
||||
echo "<agent><![CDATA[" . $agent . "]]></agent>\n";
|
||||
echo "<module><![CDATA[" . io_safe_output($module) . "]]></module>\n";
|
||||
|
@ -268,13 +268,13 @@ function output_xml_visual_console($id) {
|
|||
}
|
||||
$agent = '';
|
||||
if ($item['id_agent'] != 0) {
|
||||
$agent = get_agent_name($item['id_agent']);
|
||||
$agent = agents_get_name($item['id_agent']);
|
||||
}
|
||||
if (isset($item['id_agente_modulo'])) {
|
||||
if ($item['id_agente_modulo'] != 0) {
|
||||
$module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $item['id_agente_modulo']);
|
||||
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $item['id_agente_modulo']);
|
||||
$agent = get_agent_name($id_agent);
|
||||
$agent = agents_get_name($id_agent);
|
||||
|
||||
echo "<module><![CDATA[" . io_safe_output($module) . "]]></module>\n";
|
||||
}
|
||||
|
|
|
@ -631,7 +631,7 @@ function process_upload_xml_component($xml) {
|
|||
$values = array('description' => $description,
|
||||
'id_network_component_group' => $group,
|
||||
'os_version' => $os_version);
|
||||
$return = enterprise_hook('create_local_component', array($name, $data, $id_os, $values));
|
||||
$return = enterprise_hook('local_components_create_local_component', array($name, $data, $id_os, $values));
|
||||
if ($return !== ENTERPRISE_NOT_HOOK) {
|
||||
$idComponent = $return;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ if (is_ajax ()) {
|
|||
if ($id_group > 0 && check_acl ($config['id_user'], $id_group, $access))
|
||||
$filter['id_grupo'] = $id_group;
|
||||
else
|
||||
$filter['id_grupo'] = array_keys (get_user_groups (false, $access));
|
||||
$filter['id_grupo'] = array_keys (users_get_groups (false, $access));
|
||||
|
||||
$fields = '';
|
||||
if (isset ($_POST['fields']))
|
||||
|
|
|
@ -28,7 +28,7 @@ echo "<div style='margin-bottom: 10px;'></div>";
|
|||
|
||||
$agentData = gis_get_data_last_position_agent($id_agente);
|
||||
$updateGisData = db_get_value('update_gis_data','tagente', 'id_agente', $id_agente);
|
||||
$agent_name = get_agent_name($id_agente);
|
||||
$agent_name = agents_get_name($id_agente);
|
||||
|
||||
/* Map with the current position */
|
||||
echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:98%; height: 30em;\"></div>";
|
||||
|
|
|
@ -122,17 +122,17 @@ $table->data[1][1] = html_print_input_text ('direccion', $direccion_agente, '',
|
|||
if ($id_agente) {
|
||||
$table->data[1][1] .= ' ';
|
||||
|
||||
$ip_all = get_agent_addresses ($id_agente);
|
||||
$ip_all = agents_get_addresses ($id_agente);
|
||||
|
||||
$table->data[1][1] .= html_print_select ($ip_all, "address_list", $direccion_agente, '', '', 0, true);
|
||||
$table->data[1][1] .= " ". html_print_checkbox ("delete_ip", 1, false, true).__('Delete selected');
|
||||
}
|
||||
|
||||
$groups = get_user_groups ($config["id_user"], "AR",false);
|
||||
$agents = get_group_agents (array_keys ($groups));
|
||||
$groups = users_get_groups ($config["id_user"], "AR",false);
|
||||
$agents = agents_get_group_agents (array_keys ($groups));
|
||||
|
||||
$table->data[2][0] = __('Parent');
|
||||
$table->data[2][1] = html_print_input_text_extended ('id_parent', get_agent_name ($id_parent), 'text-id_parent', '', 30, 100, false, '',
|
||||
$table->data[2][1] = html_print_input_text_extended ('id_parent', agents_get_name ($id_parent), 'text-id_parent', '', 30, 100, false, '',
|
||||
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
|
||||
. '<a href="#" class="tip"> <span>' . __("Type at least two characters to search") . '</span></a>';
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ check_login ();
|
|||
$id_agente = (int) get_parameter ("id_agente");
|
||||
$group = 0;
|
||||
if ($id_agente)
|
||||
$group = get_agent_group ($id_agente);
|
||||
$group = agents_get_agent_group ($id_agente);
|
||||
|
||||
if (! check_acl ($config["id_user"], $group, "AW")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
|
@ -121,7 +121,7 @@ if ($create_agent) {
|
|||
$comentarios = (string) get_parameter_post ("comentarios", '');
|
||||
$modo = (int) get_parameter_post ("modo");
|
||||
$id_parent = (string) get_parameter_post ("id_parent",'');
|
||||
$id_parent = (int) get_agent_id ($id_parent);
|
||||
$id_parent = (int) agents_get_agent_id ($id_parent);
|
||||
$server_name = (string) get_parameter_post ("server_name");
|
||||
$id_os = (int) get_parameter_post ("id_os");
|
||||
$disabled = (int) get_parameter_post ("disabled");
|
||||
|
@ -145,7 +145,7 @@ if ($create_agent) {
|
|||
$agent_creation_error = __('No agent name specified');
|
||||
$agent_created_ok = 0;
|
||||
}
|
||||
elseif (get_agent_id ($nombre_agente)) {
|
||||
elseif (agents_get_agent_id ($nombre_agente)) {
|
||||
$agent_creation_error = __('There is already an agent in the database with this name');
|
||||
$agent_created_ok = 0;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ if ($create_agent) {
|
|||
array('id_field' => $key,'id_agent' => $id_agente, 'description' => $value));
|
||||
}
|
||||
// Create address for this agent in taddress
|
||||
agent_add_address ($id_agente, $direccion_agente);
|
||||
agents_add_address ($id_agente, $direccion_agente);
|
||||
|
||||
$agent_created_ok = true;
|
||||
|
||||
|
@ -310,7 +310,7 @@ if ($id_agente) {
|
|||
}
|
||||
}
|
||||
|
||||
ui_print_page_header (__('Agent configuration') . ' - ' . ui_print_truncate_text(get_agent_name ($id_agente), 25, false), "images/setup.png", false, "", true, $onheader);
|
||||
ui_print_page_header (__('Agent configuration') . ' - ' . ui_print_truncate_text(agents_get_name ($id_agente), 25, false), "images/setup.png", false, "", true, $onheader);
|
||||
|
||||
}
|
||||
// Create agent
|
||||
|
@ -326,7 +326,7 @@ if ($delete_conf_file) {
|
|||
$correct = false;
|
||||
// Delete remote configuration
|
||||
if (isset ($config["remote_config"])) {
|
||||
$agent_md5 = md5 (get_agent_name ($id_agente,'none'), FALSE);
|
||||
$agent_md5 = md5 (agents_get_name ($id_agente,'none'), FALSE);
|
||||
|
||||
if (file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5")) {
|
||||
// Agent remote configuration editor
|
||||
|
@ -383,7 +383,7 @@ if ($update_agent) { // if modified some agent paramenter
|
|||
$nombre_agente = str_replace('`','‘',(string) get_parameter_post ("agente", ""));
|
||||
$direccion_agente = (string) get_parameter_post ("direccion", '');
|
||||
$address_list = (string) get_parameter_post ("address_list", '');
|
||||
if ($address_list != $direccion_agente && $direccion_agente == get_agent_address ($id_agente) && $address_list != get_agent_address ($id_agente)) {
|
||||
if ($address_list != $direccion_agente && $direccion_agente == agents_get_address ($id_agente) && $address_list != agents_get_address ($id_agente)) {
|
||||
//If we selected another IP in the drop down list to be 'primary':
|
||||
// a) field is not the same as selectbox
|
||||
// b) field has not changed from current IP
|
||||
|
@ -399,7 +399,7 @@ if ($update_agent) { // if modified some agent paramenter
|
|||
$disabled = (bool) get_parameter_post ("disabled");
|
||||
$server_name = (string) get_parameter_post ("server_name", "");
|
||||
$id_parent = (string) get_parameter_post ("id_parent");
|
||||
$id_parent = (int) get_agent_id ($id_parent);
|
||||
$id_parent = (int) agents_get_agent_id ($id_parent);
|
||||
$custom_id = (string) get_parameter_post ("custom_id", "");
|
||||
$cascade_protection = (int) get_parameter_post ("cascade_protection", 0);
|
||||
$icon_path = (string) get_parameter_post ("icon_path",'');
|
||||
|
@ -436,18 +436,18 @@ if ($update_agent) { // if modified some agent paramenter
|
|||
echo '<h3 class="error">'.__('No agent name specified').'</h3>';
|
||||
//If there is an agent with the same name, but a different ID
|
||||
}
|
||||
elseif (get_agent_id ($nombre_agente) > 0 && get_agent_id ($nombre_agente) != $id_agente) {
|
||||
elseif (agents_get_agent_id ($nombre_agente) > 0 && agents_get_agent_id ($nombre_agente) != $id_agente) {
|
||||
echo '<h3 class="error">'.__('There is already an agent in the database with this name').'</h3>';
|
||||
}
|
||||
else {
|
||||
//If different IP is specified than previous, add the IP
|
||||
if ($direccion_agente != '' && $direccion_agente != get_agent_address ($id_agente))
|
||||
agent_add_address ($id_agente, $direccion_agente);
|
||||
if ($direccion_agente != '' && $direccion_agente != agents_get_address ($id_agente))
|
||||
agents_add_address ($id_agente, $direccion_agente);
|
||||
|
||||
//If IP is set for deletion, delete first
|
||||
if (isset ($_POST["delete_ip"])) {
|
||||
$delete_ip = get_parameter_post ("address_list");
|
||||
agent_delete_address ($id_agente, $delete_ip);
|
||||
agents_delete_address ($id_agente, $delete_ip);
|
||||
}
|
||||
|
||||
$result = db_process_sql_update ('tagente',
|
||||
|
@ -491,7 +491,7 @@ if ($update_agent) { // if modified some agent paramenter
|
|||
// This should be at the end of all operation checks, to read the changes - $id_agente doesn't have to be retrieved
|
||||
if ($id_agente) {
|
||||
//This has been done in the beginning of the page, but if an agent was created, this id might change
|
||||
$id_grupo = get_agent_group ($id_agente);
|
||||
$id_grupo = agents_get_agent_group ($id_agente);
|
||||
if (check_acl ($config["id_user"], $id_grupo, "AW") != 1) {
|
||||
db_pandora_audit("ACL Violation","Trying to admin an agent without access");
|
||||
require ("general/noaccess.php");
|
||||
|
@ -530,7 +530,7 @@ $edit_module = (bool) get_parameter ('edit_module');
|
|||
|
||||
// GET DATA for MODULE UPDATE OR MODULE INSERT
|
||||
if ($update_module || $create_module) {
|
||||
$id_grupo = get_agent_group ($id_agente);
|
||||
$id_grupo = agents_get_agent_group ($id_agente);
|
||||
|
||||
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
|
@ -574,7 +574,7 @@ if ($update_module || $create_module) {
|
|||
|
||||
enterprise_hook ('get_service_parameters');
|
||||
|
||||
$agent_name = (string) get_parameter('agent_name',get_agent_name ($id_agente));
|
||||
$agent_name = (string) get_parameter('agent_name',agents_get_name ($id_agente));
|
||||
|
||||
$snmp_community = (string) get_parameter ('snmp_community');
|
||||
$snmp_oid = (string) get_parameter ('snmp_oid');
|
||||
|
@ -621,7 +621,7 @@ if ($update_module || $create_module) {
|
|||
|
||||
// Make changes in the conf file if necessary
|
||||
enterprise_include_once('include/functions_config_agents.php');
|
||||
enterprise_hook('write_module_in_conf', array($id_agente, io_safe_output($old_configuration_data), io_safe_output($configuration_data)));
|
||||
enterprise_hook('config_agents_write_module_in_conf', array($id_agente, io_safe_output($old_configuration_data), io_safe_output($configuration_data)));
|
||||
}
|
||||
|
||||
// MODULE UPDATE
|
||||
|
@ -768,7 +768,7 @@ if ($create_module) {
|
|||
if ($delete_module) { // DELETE agent module !
|
||||
$id_borrar_modulo = (int) get_parameter_get ("delete_module",0);
|
||||
$module_data = db_get_row ('tagente_modulo', 'id_agente_modulo', $id_borrar_modulo);
|
||||
$id_grupo = (int) get_agent_group($id_agente);
|
||||
$id_grupo = (int) agents_get_agent_group($id_agente);
|
||||
|
||||
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
|
@ -785,7 +785,7 @@ if ($delete_module) { // DELETE agent module !
|
|||
}
|
||||
|
||||
enterprise_include_once('include/functions_config_agents.php');
|
||||
enterprise_hook('deleteLocalModuleInConf', array(modules_get_agentmodule_agent($id_borrar_modulo), modules_get_agentmodule_name($id_borrar_modulo)));
|
||||
enterprise_hook('config_agents_delete_module_in_conf', array(modules_get_agentmodule_agent($id_borrar_modulo), modules_get_agentmodule_name($id_borrar_modulo)));
|
||||
|
||||
//Init transaction
|
||||
$error = 0;
|
||||
|
|
|
@ -57,7 +57,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) {
|
|||
$id_origen = get_parameter ("origen");
|
||||
|
||||
// Security check here
|
||||
if (!user_access_to_agent ($id_origen)) {
|
||||
if (!users_access_to_agent ($id_origen)) {
|
||||
db_pandora_audit("ACL Violation", "Trying to forge a source agent in remote config tool");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
|
@ -71,14 +71,14 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) {
|
|||
$id_agente = $destino[$a];
|
||||
|
||||
// Security check here
|
||||
if (!user_access_to_agent ($id_agente)){
|
||||
if (!users_access_to_agent ($id_agente)){
|
||||
db_pandora_audit("ACL Violation", "Trying to forge a source agent in remote config tool");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$agent_name_src = get_agent_name($id_origen, "");
|
||||
$agent_name_dst = get_agent_name($id_agente, "");
|
||||
$agent_name_src = agents_get_name($id_origen, "");
|
||||
$agent_name_dst = agents_get_name($id_agente, "");
|
||||
echo "<br><br>".__('Making copy of configuration file for')." [<b>".$agent_name_src."</b>] ".__('to')." [<b>".$agent_name_dst."</b>]";
|
||||
|
||||
$agent_md5_src = md5($agent_name_src);
|
||||
|
@ -104,7 +104,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) {
|
|||
// Source group
|
||||
echo '<tr><td class="datost"><b>'. __('Source group'). '</b><br><br>';
|
||||
|
||||
$group_select = get_user_groups ($config['id_user']);
|
||||
$group_select = users_get_groups ($config['id_user']);
|
||||
$grouplist = implode (',', array_keys ($group_select));
|
||||
|
||||
echo html_print_select_groups($config['id_user'], "AR", true, 'id_group', $id_group, '', '', '', true);
|
||||
|
|
|
@ -52,11 +52,11 @@ $agent_to_delete = (int)get_parameter('borrar_agente');
|
|||
|
||||
if (!empty($agent_to_delete)) {
|
||||
$id_agente = $agent_to_delete;
|
||||
$agent_name = get_agent_name ($id_agente);
|
||||
$id_grupo = get_agent_group($id_agente);
|
||||
$agent_name = agents_get_name ($id_agente);
|
||||
$id_grupo = agents_get_agent_group($id_agente);
|
||||
if (check_acl ($config["id_user"], $id_grupo, "AW")==1) {
|
||||
$id_agentes[0] = $id_agente;
|
||||
delete_agent($id_agentes);
|
||||
agents_delete_agent($id_agentes);
|
||||
db_pandora_audit("Agent management", "Delete Agent " . $agent_name);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -84,7 +84,7 @@ if ($multiple_delete) {
|
|||
$id_agent_modules_delete = (array)get_parameter('id_delete');
|
||||
|
||||
foreach($id_agent_modules_delete as $id_agent_module_del) {
|
||||
$id_grupo = (int) get_agent_group($id_agente);
|
||||
$id_grupo = (int) agents_get_agent_group($id_agente);
|
||||
|
||||
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
|
@ -101,7 +101,7 @@ if ($multiple_delete) {
|
|||
}
|
||||
|
||||
enterprise_include_once('include/functions_config_agents.php');
|
||||
enterprise_hook('deleteLocalModuleInConf', array(modules_get_agentmodule_agent($id_agent_module_del), modules_get_agentmodule_name($id_agent_module_del)));
|
||||
enterprise_hook('config_agents_delete_module_in_conf', array(modules_get_agentmodule_agent($id_agent_module_del), modules_get_agentmodule_name($id_agent_module_del)));
|
||||
|
||||
//Init transaction
|
||||
$error = 0;
|
||||
|
@ -299,7 +299,7 @@ $table->align[2] = 'center';
|
|||
$table->align[7] = 'left';
|
||||
$table->data = array ();
|
||||
|
||||
$agent_interval = get_agent_interval ($id_agente);
|
||||
$agent_interval = agents_get_interval ($id_agente);
|
||||
$last_modulegroup = "0";
|
||||
|
||||
//Extract the ids only numeric modules for after show the normalize link.
|
||||
|
@ -344,14 +344,14 @@ foreach ($modules as $module) {
|
|||
$data[0] .= '</a>';
|
||||
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||
$policyInfo = infoModulePolicy($module['id_agente_modulo']);
|
||||
$policyInfo = policies_info_module_policy($module['id_agente_modulo']);
|
||||
if ($policyInfo === false)
|
||||
$data[1] = '';
|
||||
else {
|
||||
$linked = isModuleLinked($module['id_agente_modulo']);
|
||||
$linked = policies_is_module_linked($module['id_agente_modulo']);
|
||||
|
||||
$adopt = false;
|
||||
if (isModuleAdopt($module['id_agente_modulo'])) {
|
||||
if (policies_is_module_adopt($module['id_agente_modulo'])) {
|
||||
$adopt = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ if (is_ajax ()) {
|
|||
require_once ($config['homedir'].'/'.ENTERPRISE_DIR.'/include/functions_local_components.php');
|
||||
|
||||
$id_module_group = (int) get_parameter ('id_module_component_group');
|
||||
$localComponents = get_local_components(array('id_network_component_group' => $id_module_group), array('id', 'name'));
|
||||
$localComponents = local_components_get_local_components(array('id_network_component_group' => $id_module_group), array('id', 'name'));
|
||||
|
||||
echo json_encode($localComponents);
|
||||
return;
|
||||
|
@ -65,7 +65,7 @@ if (is_ajax ()) {
|
|||
$component[$index] = html_entity_decode($element, ENT_QUOTES, "UTF-8");
|
||||
}
|
||||
|
||||
$typeName = parseLocalModuleExtractValue('module_type',$component['data']);
|
||||
$typeName = local_components_parse_module_extract_value('module_type',$component['data']);
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
|
@ -130,7 +130,7 @@ if ($id_agent_module) {
|
|||
$min = $module['min'];
|
||||
$interval = $module['module_interval'];
|
||||
if ($interval == 0) {
|
||||
$interval = get_agent_interval ($id_agente);
|
||||
$interval = agents_get_interval ($id_agente);
|
||||
}
|
||||
$tcp_port = $module['tcp_port'];
|
||||
$tcp_send = $module['tcp_send'];
|
||||
|
@ -155,7 +155,7 @@ if ($id_agent_module) {
|
|||
|
||||
$ip_target = $module['ip_target'];
|
||||
if (empty ($ip_target)) {
|
||||
$ip_target = get_agent_address ($id_agente);
|
||||
$ip_target = agents_get_address ($id_agente);
|
||||
}
|
||||
$disabled = $module['disabled'];
|
||||
$id_export = $module['id_export'];
|
||||
|
@ -201,7 +201,7 @@ else {
|
|||
else
|
||||
$snmp_community = "public";
|
||||
$snmp_oid = '';
|
||||
$ip_target = get_agent_address ($id_agente);
|
||||
$ip_target = agents_get_address ($id_agente);
|
||||
$plugin_user = '';
|
||||
$plugin_pass = '';
|
||||
$plugin_parameter = '';
|
||||
|
@ -229,14 +229,14 @@ $relink_policy = get_parameter('relink_policy', 0);
|
|||
$unlink_policy = get_parameter('unlink_policy', 0);
|
||||
|
||||
if($relink_policy) {
|
||||
$result = relink_module_policy($id_agent_module);
|
||||
$result = policies_relink_module($id_agent_module);
|
||||
ui_print_result_message($result, 'Module relinked to the policy successful');
|
||||
|
||||
db_pandora_audit("Agent management", "Re-link module " . $id_agent_module);
|
||||
}
|
||||
|
||||
if($unlink_policy) {
|
||||
$result = unlink_module_policy($id_agent_module);
|
||||
$result = policies_unlink_module($id_agent_module);
|
||||
ui_print_result_message($result, 'Module unlinked from the policy successful');
|
||||
|
||||
db_pandora_audit("Agent management", "Unlink module " . $id_agent_module);
|
||||
|
@ -247,7 +247,7 @@ switch ($moduletype) {
|
|||
case 1:
|
||||
$moduletype = 1;
|
||||
// Has remote configuration ?
|
||||
$agent_md5 = md5 (get_agent_name($id_agente), false);
|
||||
$agent_md5 = md5 (agents_get_name($id_agente), false);
|
||||
$remote_conf = file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5");
|
||||
|
||||
/* Categories is an array containing the allowed module types
|
||||
|
@ -258,7 +258,7 @@ switch ($moduletype) {
|
|||
if ($config['enterprise_installed'] && $remote_conf) {
|
||||
if($id_agent_module) {
|
||||
enterprise_include_once('include/functions_config_agents.php');
|
||||
$configuration_data = enterprise_hook('get_module_from_conf', array($id_agente, get_agentmodule_name($id_agent_module)));
|
||||
$configuration_data = enterprise_hook('config_agents_get_module_from_conf', array($id_agente, get_agentmodule_name($id_agent_module)));
|
||||
}
|
||||
enterprise_include ('godmode/agentes/module_manager_editor_data.php');
|
||||
}
|
||||
|
@ -316,8 +316,8 @@ if (isset ($extra_title))
|
|||
echo '</h3>';
|
||||
|
||||
if($config['enterprise_installed'] && $id_agent_module) {
|
||||
if (isModuleInPolicy($id_agent_module)) {
|
||||
add_policy_linkation($id_agent_module);
|
||||
if (policies_is_module_in_policy($id_agent_module)) {
|
||||
policies_add_policy_linkation($id_agent_module);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ $disabledTextBecauseInPolicy = '';
|
|||
$page = get_parameter('page', '');
|
||||
if (strstr($page, "policy_modules") === false && $id_agent_module) {
|
||||
if ($config['enterprise_installed'])
|
||||
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
|
||||
$disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module);
|
||||
else
|
||||
$disabledBecauseInPolicy = false;
|
||||
if ($disabledBecauseInPolicy)
|
||||
|
|
|
@ -21,7 +21,7 @@ $page = get_parameter('page', '');
|
|||
if (strstr($page, "policy_modules") === false) {
|
||||
if ($config['enterprise_installed']) {
|
||||
|
||||
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
|
||||
$disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -60,7 +60,7 @@ $data[0] = __('SNMP community');
|
|||
$adopt = false;
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK && isset($id_agent_module)) {
|
||||
|
||||
$adopt = isModuleAdopt($id_agent_module);
|
||||
$adopt = policies_is_module_adopt($id_agent_module);
|
||||
|
||||
}
|
||||
if (!$adopt) {
|
||||
|
|
|
@ -20,7 +20,7 @@ $disabledTextBecauseInPolicy = '';
|
|||
$page = get_parameter('page', '');
|
||||
if (strstr($page, "policy_modules") === false) {
|
||||
if ($config['enterprise_installed'])
|
||||
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
|
||||
$disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module);
|
||||
else
|
||||
$disabledBecauseInPolicy = false;
|
||||
if ($disabledBecauseInPolicy)
|
||||
|
|
|
@ -20,7 +20,7 @@ $disabledBecauseInPolicy = false;
|
|||
$disabledTextBecauseInPolicy = '';
|
||||
$page = get_parameter('page', '');
|
||||
$id_agente = get_parameter('id_agente', '');
|
||||
$agent_name = get_parameter('agent_name', get_agent_name($id_agente));
|
||||
$agent_name = get_parameter('agent_name', agents_get_name($id_agente));
|
||||
$id_agente_modulo= get_parameter('id_agent_module',0);
|
||||
$sql = 'SELECT * FROM tagente_modulo WHERE id_agente_modulo = '.$id_agente_modulo;
|
||||
$row = db_get_row_sql($sql);
|
||||
|
@ -38,7 +38,7 @@ else {
|
|||
}
|
||||
if (strstr($page, "policy_modules") === false) {
|
||||
if ($config['enterprise_installed'])
|
||||
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
|
||||
$disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module);
|
||||
else
|
||||
$disabledBecauseInPolicy = false;
|
||||
if ($disabledBecauseInPolicy)
|
||||
|
|
|
@ -19,7 +19,7 @@ $disabledTextBecauseInPolicy = '';
|
|||
$page = get_parameter('page', '');
|
||||
if (strstr($page, "policy_modules") === false) {
|
||||
if ($config['enterprise_installed'])
|
||||
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
|
||||
$disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module);
|
||||
else
|
||||
$disabledBecauseInPolicy = false;
|
||||
if ($disabledBecauseInPolicy)
|
||||
|
|
|
@ -49,7 +49,7 @@ $id_downtime = (int) get_parameter ('id_downtime',0);
|
|||
$insert_downtime_agent = (int) get_parameter ("insert_downtime_agent", 0);
|
||||
$delete_downtime_agent = (int) get_parameter ("delete_downtime_agent", 0);
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__("Planned Downtime"), "images/god1.png", false, "", true, "");
|
||||
|
|
|
@ -71,9 +71,9 @@ if ($copy_action) {
|
|||
}else{
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
||||
else
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM", false));
|
||||
$is_in_group = in_array($al_action['id_group'], $own_groups);
|
||||
// Then action group have to be in his own groups
|
||||
if ($is_in_group)
|
||||
|
@ -215,9 +215,9 @@ if ($delete_action) {
|
|||
else{
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
||||
else
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM", false));
|
||||
$is_in_group = in_array($al_action['id_group'], $own_groups);
|
||||
// Then action group have to be in his own groups
|
||||
if ($is_in_group)
|
||||
|
|
|
@ -40,11 +40,11 @@ if ($id_agent)
|
|||
if ($search != '');
|
||||
$url .= '&search='.$search;
|
||||
|
||||
$groups = get_user_groups (0, 'LM');
|
||||
$groups = users_get_groups (0, 'LM');
|
||||
if ($id_group > 0 && isset ($groups[$id_group]))
|
||||
$agents = get_group_agents ($id_group, false, "none");
|
||||
$agents = agents_get_group_agents ($id_group, false, "none");
|
||||
else
|
||||
$agents = get_group_agents (array_keys ($groups), false, "none");
|
||||
$agents = agents_get_group_agents (array_keys ($groups), false, "none");
|
||||
|
||||
$update_compound = (bool) get_parameter ('update_compound');
|
||||
$delete_alert = (int) get_parameter ('delete_alert');
|
||||
|
@ -233,7 +233,7 @@ foreach ($id_alerts as $alert) {
|
|||
$data[1] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_compound&id='.$alert['id'].'">';
|
||||
$data[1] .= $alert['name'];
|
||||
$data[1] .= '</a>';
|
||||
$data[2] = get_agent_name ($alert['id_agent']);
|
||||
$data[2] = agents_get_name ($alert['id_agent']);
|
||||
$data[3] = '<a href="'.$url.'&delete_alert=1&id='.$alert['id'].'"
|
||||
onClick="javascript:confirm(\''.__('Are you sure?').'\')">';
|
||||
$data[3] .= html_print_image("images/cross.png", true, array("title" => __('Delete')));
|
||||
|
|
|
@ -55,7 +55,7 @@ if (! $id_agente) {
|
|||
$table->data[0][0] = __('Module');
|
||||
$modules = array ();
|
||||
if ($id_agente)
|
||||
$modules = get_agent_modules ($id_agente, false, array("delete_pending" => 0));
|
||||
$modules = agents_get_modules ($id_agente, false, array("delete_pending" => 0));
|
||||
|
||||
$table->data[0][1] = html_print_select ($modules, 'id_agent_module', 0, true,
|
||||
__('Select'), 0, true, false, true, '', ($id_agente == 0));
|
||||
|
@ -71,7 +71,7 @@ $own_info = get_user_info ($config['id_user']);
|
|||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$templates = alerts_get_alert_templates (false, array ('id', 'name'));
|
||||
else{
|
||||
$usr_groups = get_user_groups($config['id_user'], 'LW', true);
|
||||
$usr_groups = users_get_groups($config['id_user'], 'LW', true);
|
||||
$filter_groups = '';
|
||||
$filter_groups = implode(',', array_keys($usr_groups));
|
||||
$templates = alerts_get_alert_templates (array ('id_group IN (' . $filter_groups . ')'), array ('id', 'name'));
|
||||
|
|
|
@ -416,7 +416,7 @@ foreach ($simple_alerts as $alert) {
|
|||
$data[2] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$id_agent.'">';
|
||||
if ($alert['disabled'])
|
||||
$data[2] .= '<span style="font-style: italic; color: #aaaaaa;">';
|
||||
$data[2] .= get_agent_name ($id_agent);
|
||||
$data[2] .= agents_get_name ($id_agent);
|
||||
if ($alert['disabled'])
|
||||
$data[2] .= '</span>';
|
||||
$data[2] .= '</a>';
|
||||
|
@ -431,7 +431,7 @@ foreach ($simple_alerts as $alert) {
|
|||
$data[4] .= "</a>";
|
||||
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||
$policyInfo = isAlertInPolicy2($alert['id'], false);
|
||||
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
||||
if ($policyInfo === false)
|
||||
$data[5] = '';
|
||||
else {
|
||||
|
@ -505,7 +505,7 @@ foreach ($simple_alerts as $alert) {
|
|||
$data[6] .= html_print_input_hidden ('add_action', 1, true);
|
||||
$data[6] .= html_print_input_hidden ('id_alert_module', $alert['id'], true);
|
||||
$own_info = get_user_info($config['id_user']);
|
||||
$own_groups = get_user_groups($config['id_user'], 'LW', $own_info['is_admin']);
|
||||
$own_groups = users_get_groups($config['id_user'], 'LW', $own_info['is_admin']);
|
||||
$filter_groups = '';
|
||||
$filter_groups = implode(',', array_keys($own_groups));
|
||||
$actions = alerts_get_alert_actions_filter(true, 'id_group IN (' . $filter_groups . ')');
|
||||
|
|
|
@ -33,7 +33,7 @@ $isFunctionPolicies = enterprise_include ('include/functions_policies.php');
|
|||
$id_group = 0;
|
||||
/* Check if this page is included from a agent edition */
|
||||
if (isset ($id_agente)) {
|
||||
$id_group = get_agent_group ($id_agente);
|
||||
$id_group = agents_get_agent_group ($id_agente);
|
||||
}
|
||||
else {
|
||||
$id_agente = 0;
|
||||
|
@ -78,7 +78,7 @@ if ($create_alert) {
|
|||
|
||||
$alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template);
|
||||
$module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module);
|
||||
$agent_name = get_agent_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module));
|
||||
$agent_name = agents_get_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module));
|
||||
|
||||
// Audit the creation only when the alert creation is correct
|
||||
if($id) {
|
||||
|
@ -114,7 +114,7 @@ if ($delete_alert) {
|
|||
$id_agent_module = $temp["id_agent_module"];
|
||||
$alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template);
|
||||
$module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module);
|
||||
$agent_name = get_agent_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module));
|
||||
$agent_name = agents_get_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module));
|
||||
|
||||
$result = alerts_delete_alert_agent_module ($id_alert_agent_module);
|
||||
|
||||
|
@ -231,10 +231,10 @@ if ($standbyoff_alert) {
|
|||
}
|
||||
|
||||
if ($id_agente) {
|
||||
$agents = array ($id_agente => get_agent_name ($id_agente));
|
||||
$agents = array ($id_agente => agents_get_name ($id_agente));
|
||||
|
||||
if ($group == 0) {
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
}
|
||||
else {
|
||||
$groups = array(0 => __('All'));
|
||||
|
@ -270,12 +270,12 @@ else {
|
|||
switch ($tab) {
|
||||
case 'list':
|
||||
if ($group == 0) {
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
}
|
||||
else {
|
||||
$groups = array(0 => __('All'));
|
||||
}
|
||||
$agents = get_group_agents (array_keys ($groups), false, "none");
|
||||
$agents = agents_get_group_agents (array_keys ($groups), false, "none");
|
||||
|
||||
require_once('godmode/alerts/alert_list.list.php');
|
||||
|
||||
|
@ -283,7 +283,7 @@ else {
|
|||
break;
|
||||
case 'builder':
|
||||
if ($group == 0) {
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
}
|
||||
else {
|
||||
$groups = array(0 => __('All'));
|
||||
|
|
|
@ -153,9 +153,9 @@ if ($delete_template) {
|
|||
}else{
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
||||
else
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM", false));
|
||||
$is_in_group = in_array($al_template['id_group'], $own_groups);
|
||||
// Then template group have to be is his own groups
|
||||
if ($is_in_group)
|
||||
|
|
|
@ -48,9 +48,9 @@ if ($al_action !== false){
|
|||
}else{
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
||||
else
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM", false));
|
||||
$is_in_group = in_array($al_action['id_group'], $own_groups);
|
||||
// Then action group have to be in his own groups
|
||||
if ($is_in_group)
|
||||
|
@ -97,7 +97,7 @@ $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true);
|
|||
|
||||
$table->data[1][0] = __('Group');
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
// Only display group "All" if user is administrator or has "PM" privileges
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
|
|
|
@ -228,7 +228,7 @@ if ($id && ! $create_compound) {
|
|||
$field2_recovery = $compound['field2_recovery'];
|
||||
$field3_recovery = $compound['field3_recovery'];
|
||||
$id_agent = $compound['id_agent'];
|
||||
$id_group = get_agent_group ($id_agent);
|
||||
$id_group = agents_get_agent_group ($id_agent);
|
||||
if (! check_acl ($config['id_user'], $id_group, "AW")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access Alert Management");
|
||||
|
@ -278,7 +278,7 @@ if ($update_compound) {
|
|||
|
||||
print_alert_compound_steps ($step, $id);
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'compound';
|
||||
$table->width = '90%';
|
||||
|
@ -438,7 +438,7 @@ if ($step == 2) {
|
|||
$table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true);
|
||||
|
||||
$table->data[1][0] = __('Assigned to');
|
||||
$table->data[1][1] = html_print_select (get_group_agents (array_keys ($groups)),
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents (array_keys ($groups)),
|
||||
'id_agent', $id_agent, '', __('Select'), 0, true);
|
||||
$table->data[2][0] = __('Description');
|
||||
$table->data[2][1] = html_print_textarea ('description', 10, 30,
|
||||
|
@ -475,8 +475,8 @@ if ($step == 2) {
|
|||
$data[0] = '<a href="#" class="remove_alert" id="alert-'.$alert['id'].'" />';
|
||||
$data[0] .= html_print_image("images/delete.png", true);
|
||||
$data[0] .= '</a>';
|
||||
$idAgent = get_agent_module_id($alert['id_agent_module']);
|
||||
$nameAgent = get_agent_name($idAgent);
|
||||
$idAgent = agents_get_module_id($alert['id_agent_module']);
|
||||
$nameAgent = agents_get_name($idAgent);
|
||||
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $idAgent . '">' . $nameAgent . '</a>';
|
||||
$data[2] = alerts_get_alert_template_name ($alert['id_alert_template']);
|
||||
$data[3] = modules_get_agentmodule_name ($alert['id_agent_module']);
|
||||
|
@ -541,7 +541,7 @@ if ($step == 1) {
|
|||
$table->data[0][1] = html_print_select_groups(false, "AR", true, 'search_id_group', $id_group,
|
||||
false, '', '', true);
|
||||
$table->data[0][2] = __('Agent');
|
||||
$table->data[0][3] = html_print_select (get_group_agents ($id_group, false, "none"),
|
||||
$table->data[0][3] = html_print_select (agents_get_group_agents ($id_group, false, "none"),
|
||||
'search_id_agent', $id_agent, false, __('Select'), 0, true);
|
||||
$table->data[0][3] .= '<span id="agent_loading" class="invisible">';
|
||||
$table->data[0][3] .= html_print_image('images/spinner.png', true);
|
||||
|
|
|
@ -55,9 +55,9 @@ if ($a_template !== false){
|
|||
}else{
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
||||
else
|
||||
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM", false));
|
||||
$is_in_group = in_array($a_template['id_group'], $own_groups);
|
||||
// Then template group have to be in his own groups
|
||||
if ($is_in_group)
|
||||
|
@ -456,7 +456,7 @@ if ($step == 2) {
|
|||
$table->data['field3'][1] = html_print_textarea ('field3', 10, 30, $field3, '', true);
|
||||
|
||||
$table->data[4][0] = __('Default action');
|
||||
$usr_groups = implode(',', array_keys(get_user_groups($config['id_user'], 'LM', true)));
|
||||
$usr_groups = implode(',', array_keys(users_get_groups($config['id_user'], 'LM', true)));
|
||||
$sql_query = sprintf('SELECT id, name FROM talert_actions WHERE id_group IN (%s) ORDER BY name', $usr_groups);
|
||||
$table->data[4][1] = html_print_select_from_sql ($sql_query,
|
||||
'default_action', $default_action, '', __('None'), 0,
|
||||
|
@ -517,7 +517,7 @@ if ($step == 2) {
|
|||
$table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true);
|
||||
|
||||
$table->data[0][1] .= " ". __("Group");
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
$own_info = get_user_info($config['id_user']);
|
||||
// Only display group "All" if user is administrator or has "PM" privileges
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
|
|
|
@ -70,9 +70,9 @@ $table->head[0] = __('Agent name');
|
|||
$table->head[1] = __('Assigned modules');
|
||||
$table->head[2] = __('Total data');
|
||||
|
||||
$agents = get_group_agents (0);
|
||||
$agents = agents_get_group_agents (0);
|
||||
|
||||
$count = get_agent_modules_data_count (array_keys ($agents));
|
||||
$count = agents_get_modules_data_count (array_keys ($agents));
|
||||
|
||||
unset ($count["total"]); //Not interested in total
|
||||
asort ($count, SORT_NUMERIC);
|
||||
|
|
|
@ -76,7 +76,7 @@ $data["total"] = 0;
|
|||
if (isset($_POST["purgedb"])) {
|
||||
$from_date = get_parameter_post ("date_purge", 0);
|
||||
if ($id_agent > 0) {
|
||||
echo __('Purge task launched for agent')." ".get_agent_name ($id_agent)." :: ".__('Data older than')." ".human_time_description_raw ($from_date);
|
||||
echo __('Purge task launched for agent')." ".agents_get_name ($id_agent)." :: ".__('Data older than')." ".human_time_description_raw ($from_date);
|
||||
echo "<h3>".__('Please be patient. This operation can take a long time depending on the amount of modules.')."</h3>";
|
||||
|
||||
$sql = sprintf ("SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = %d", $id_agent);
|
||||
|
@ -151,7 +151,7 @@ if (isset($_POST["purgedb"])) {
|
|||
}
|
||||
|
||||
# Select Agent for further operations.
|
||||
$agents = get_group_agents (0, true);
|
||||
$agents = agents_get_group_agents (0, true);
|
||||
$agents[-1] = __('Choose agent');
|
||||
$agents[0] = __('All agents');
|
||||
|
||||
|
@ -165,7 +165,7 @@ ui_print_help_tip (__("Click here to get the data from the agent specified in th
|
|||
echo '</noscript><br />';
|
||||
|
||||
if ($id_agent > 0) {
|
||||
$title = __('Information on agent %s in the database', get_agent_name ($id_agent));
|
||||
$title = __('Information on agent %s in the database', agents_get_name ($id_agent));
|
||||
} else {
|
||||
$title = __('Information on all agents in the database');
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ echo '<h3>'.$title.'</h3>';
|
|||
flush ();
|
||||
|
||||
if ($id_agent > 0) { //If the agent is not All or Not selected
|
||||
$modules = get_agent_modules ($id_agent);
|
||||
$modules = agents_get_modules ($id_agent);
|
||||
$query = sprintf (" AND id_agente_modulo IN (%s)", implode (",", array_keys ($modules)));
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -68,7 +68,7 @@ echo '<div style="float:left; width: 250px;">';
|
|||
echo '<b>'.__('Source agent').'</b><br /><br />';
|
||||
|
||||
$agent_selected = get_parameter_post ("origen", 0);
|
||||
$agents = get_group_agents (array_keys (get_user_groups ($config["id_user"], "AW")));
|
||||
$agents = agents_get_group_agents (array_keys (users_get_groups ($config["id_user"], "AW")));
|
||||
|
||||
html_print_select ($agents, "origen", $agent_selected, 'javascript:this.form.update_agent.click();', __('No agent selected'), '0', false, false, false, 'w130');
|
||||
|
||||
|
@ -80,7 +80,7 @@ echo '<br /><br />';
|
|||
echo '<b>'.__('Modules').'</b><br /><br />';
|
||||
|
||||
$module_selected = get_parameter_post ("origen", array ());
|
||||
$modules = get_agent_modules ($module_selected, false, 'delete_pending != 1');
|
||||
$modules = agents_get_modules ($module_selected, false, 'delete_pending != 1');
|
||||
|
||||
html_print_select ($modules, "origen_modulo[]", $module_selected, '', '', '0', false, true, false, 'w130');
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ $table->data[2][0] = __('Parent');
|
|||
$sql = 'SELECT id_grupo, nombre FROM tgrupo ';
|
||||
if ($id_group)
|
||||
$sql .= sprintf ('WHERE id_grupo != %d', $id_group);
|
||||
$groups = get_user_groups();
|
||||
$groups = users_get_groups();
|
||||
if ($id_group) {
|
||||
$table->data[2][1] = html_print_select_groups(false, "AR", true, 'id_parent', $id_parent,
|
||||
'', '', '', true, false, true, '', false, false, false, $id_group);
|
||||
|
@ -108,7 +108,7 @@ $table->data[5][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255
|
|||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
$table->data[6][0] = __('Skin');
|
||||
$table->data[6][1] = print_select_skins($config["id_user"], 'skin', $skin, '', __('None'), 0, true);
|
||||
$table->data[6][1] = skins_print_select($config["id_user"], 'skin', $skin, '', __('None'), 0, true);
|
||||
}
|
||||
|
||||
echo '<form name="grupo" method="post" action="index.php?sec=gagente&sec2=godmode/groups/group_list">';
|
||||
|
|
|
@ -72,7 +72,7 @@ if (is_ajax ()) {
|
|||
return;
|
||||
}
|
||||
|
||||
echo json_encode (get_group_agents ($id_group, array('disabled' => $disabled), "none"));
|
||||
echo json_encode (agents_get_group_agents ($id_group, array('disabled' => $disabled), "none"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ $table->align[1] = 'center';
|
|||
$table->align[3] = 'center';
|
||||
$table->data = array ();
|
||||
|
||||
$groups = get_user_groups_tree ($config['id_user'], "AR", true);
|
||||
$groups = users_get_groups_tree ($config['id_user'], "AR", true);
|
||||
$iterator = 0;
|
||||
|
||||
foreach ($groups as $id_group => $group) {
|
||||
|
|
|
@ -131,7 +131,7 @@ if ($add) {
|
|||
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '95%';
|
||||
|
@ -152,7 +152,7 @@ $table->data[1][0] = __('Agents');
|
|||
$table->data[1][0] .= '<span id="agent_loading" class="invisible">';
|
||||
$table->data[1][0] .= html_print_image('images/spinner.png', true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents ($id_group, false, "none"),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
if (empty($id_agents)) {
|
||||
|
|
|
@ -35,7 +35,7 @@ if (is_ajax ()) {
|
|||
if ($get_agents) {
|
||||
$id_group = (int) get_parameter ('id_group');
|
||||
|
||||
$agents_alerts = get_group_agents ($id_group);
|
||||
$agents_alerts = agents_get_group_agents ($id_group);
|
||||
|
||||
echo json_encode ($agents_alerts);
|
||||
return;
|
||||
|
@ -100,7 +100,7 @@ if ($add) {
|
|||
process_manage_add ($id_alert_template, $id_agents, $module_names);
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'add_table';
|
||||
$table->width = '95%';
|
||||
|
|
|
@ -49,7 +49,7 @@ if ($create_profiles) {
|
|||
if ($profile_data === false) {
|
||||
db_pandora_audit("User management",
|
||||
"Added profile for user ".io_safe_input($user));
|
||||
$return = create_user_profile ($user, $profile, $group);
|
||||
$return = profile_create_user_profile ($user, $profile, $group);
|
||||
if ($return !== false) {
|
||||
$n_added ++;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ $table->size[2] = '33%';
|
|||
|
||||
$data = array ();
|
||||
$data[0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users&option=add_profiles">';
|
||||
$data[0] .= html_print_select (get_profiles (), 'profiles_id[]', '', '', '',
|
||||
$data[0] .= html_print_select (profile_get_profiles (), 'profiles_id[]', '', '', '',
|
||||
'', true, true, false, '', false, 'width: 100%');
|
||||
$data[1] = html_print_select_groups($config['id_user'], "UM", true,
|
||||
'groups_id[]', '', '', '', '', true, true, false, '', false, 'width: 100%');
|
||||
|
@ -103,7 +103,7 @@ $data[2] .= html_print_image('images/spinner.png', true);
|
|||
$data[2] .= '</span>';
|
||||
$users_profiles = "";
|
||||
|
||||
$data[2] .= html_print_select (get_users_info(), 'users_id[]', '', '', '',
|
||||
$data[2] .= html_print_select (users_get_info(), 'users_id[]', '', '', '',
|
||||
'', true, true, true, '', false, 'width: 100%');
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ if ($do_operation) {
|
|||
}
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->class = 'databox';
|
||||
$table->width = '95%';
|
||||
|
@ -72,7 +72,7 @@ $table->data[0][2] = __('Agent');
|
|||
$table->data[0][2] .= ' <span id="source_agent_loading" class="invisible">';
|
||||
$table->data[0][2] .= html_print_image ("images/spinner.png", true);
|
||||
$table->data[0][2] .= '</span>';
|
||||
$table->data[0][3] = html_print_select (get_group_agents ($source_id_group, false, "none"),
|
||||
$table->data[0][3] = html_print_select (agents_get_group_agents ($source_id_group, false, "none"),
|
||||
'source_id_agent', $source_id_agent, false, __('Select'), 0, true);
|
||||
|
||||
//$table->data[0][3] = html_print_input_text_extended ('id_agent', __('Select'), 'text-id_agent', '', 25, 100, false, '',
|
||||
|
@ -94,7 +94,7 @@ $table->data = array ();
|
|||
|
||||
$modules = array ();
|
||||
if ($source_id_agent)
|
||||
$modules = get_agent_modules ($source_id_agent, 'nombre');
|
||||
$modules = agents_get_modules ($source_id_agent, 'nombre');
|
||||
|
||||
$table->data['operations'][0] = __('Operations');
|
||||
$table->data['operations'][1] = '<span class="with_modules'.(empty ($modules) ? ' invisible': '').'">';
|
||||
|
@ -156,7 +156,7 @@ $table->data[1][0] = __('Agent');
|
|||
$table->data[1][0] .= '<span id="destiny_agent_loading" class="invisible">';
|
||||
$table->data[1][0] .= html_print_image ("images/spinner.png", true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$table->data[1][1] = html_print_select (get_group_agents ($destiny_id_group, false, "none"),
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents ($destiny_id_group, false, "none"),
|
||||
'destiny_id_agent[]', 0, false, '', '', true, true);
|
||||
|
||||
echo '<fieldset id="fieldset_destiny"'.($source_id_agent ? '' : ' class="invisible"').'>';
|
||||
|
|
|
@ -140,7 +140,7 @@ if ($delete) {
|
|||
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '95%';
|
||||
|
@ -161,7 +161,7 @@ $table->data[1][0] = __('Agents');
|
|||
$table->data[1][0] .= '<span id="agent_loading" class="invisible">';
|
||||
$table->data[1][0] .= html_print_image('images/spinner.png', true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents ($id_group, false, "none"),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
if (empty($id_agents)) {
|
||||
|
|
|
@ -43,14 +43,14 @@ function process_manage_delete ($id_agents) {
|
|||
|
||||
$error = false;
|
||||
foreach ($id_agents as $id_agent) {
|
||||
$success = delete_agent ($id_agent);
|
||||
$success = agents_delete_agent ($id_agent);
|
||||
if (! $success)
|
||||
break;
|
||||
}
|
||||
|
||||
if (! $success) {
|
||||
echo '<h3 class="error">'.__('There was an error deleting the agent, the operation has been cancelled').'</h3>';
|
||||
echo '<h4>'.__('Could not delete agent').' '.get_agent_name ($id_agent).'</h4>';
|
||||
echo '<h4>'.__('Could not delete agent').' '.agents_get_name ($id_agent).'</h4>';
|
||||
db_process_sql_rollback ();
|
||||
|
||||
return false;
|
||||
|
@ -81,7 +81,7 @@ if ($delete) {
|
|||
}
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '95%';
|
||||
|
@ -102,7 +102,7 @@ $table->data[1][0] = __('Agents');
|
|||
$table->data[1][0] .= '<span id="agent_loading" class="invisible">';
|
||||
$table->data[1][0] .= html_print_image('images/spinner.png', true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents ($id_group, false, "none"),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_agents" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
|
|
|
@ -107,7 +107,7 @@ if ($delete) {
|
|||
}
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '95%';
|
||||
|
|
|
@ -58,7 +58,7 @@ function process_manage_delete ($module_name, $id_agents) {
|
|||
}
|
||||
|
||||
db_process_sql_begin ();
|
||||
$modules = get_agent_modules ($id_agents, 'id_agente_modulo',
|
||||
$modules = agents_get_modules ($id_agents, 'id_agente_modulo',
|
||||
array ('nombre' => $module_name), true);
|
||||
$success = modules_delete_agent_module ($modules);
|
||||
if (! $success) {
|
||||
|
@ -94,7 +94,7 @@ if ($delete) {
|
|||
}
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '95%';
|
||||
|
@ -110,7 +110,7 @@ $table->data = array ();
|
|||
|
||||
$table->data[0][0] = __('Modules');
|
||||
|
||||
$modules = get_agent_modules();
|
||||
$modules = agents_get_modules();
|
||||
$modulesSelect = array();
|
||||
foreach ($modules as $module) {
|
||||
$modulesSelect[$module] = $module;
|
||||
|
|
|
@ -62,7 +62,7 @@ if ($delete_profiles) {
|
|||
db_pandora_audit("User management",
|
||||
"Deleted profile for user ".io_safe_input($user));
|
||||
|
||||
$result = delete_user_profile ($user, $id_up);
|
||||
$result = profile_delete_user_profile ($user, $id_up);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ $table->size[2] = '33%';
|
|||
|
||||
$data = array ();
|
||||
$data[0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users&option=delete_profiles">';
|
||||
$data[0] .= html_print_select (get_profiles (), 'profiles_id[]', '', '', '',
|
||||
$data[0] .= html_print_select (profile_get_profiles (), 'profiles_id[]', '', '', '',
|
||||
'', true, false, false, '', false, 'width: 100%');
|
||||
$data[1] = html_print_select_groups($config['id_user'], "UM", true,
|
||||
'groups_id[]', '', '', '', '', true, false, false, '', false, 'width: 100%');
|
||||
|
|
|
@ -38,7 +38,7 @@ if (is_ajax ()) {
|
|||
$id_agents = get_parameter('id_agents');
|
||||
$cont = 0;
|
||||
foreach($id_agents as $id_agent) {
|
||||
$name = get_agent_name($id_agent);
|
||||
$name = agents_get_name($id_agent);
|
||||
$agent_md5 = md5($name);
|
||||
if (file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5"))
|
||||
$cont ++;
|
||||
|
@ -59,7 +59,7 @@ if ($update_agents) {
|
|||
if (get_parameter ('id_os', '') != -1)
|
||||
$values['id_os'] = get_parameter ('id_os');
|
||||
if (get_parameter ('id_parent', '') != '')
|
||||
$values['id_parent'] = get_agent_id(get_parameter ('id_parent'));
|
||||
$values['id_parent'] = agents_get_agent_id(get_parameter ('id_parent'));
|
||||
if (get_parameter ('server_name', '') != -1)
|
||||
$values['server_name'] = get_parameter ('server_name');
|
||||
if (get_parameter ('description', '') != '')
|
||||
|
@ -100,7 +100,7 @@ if ($update_agents) {
|
|||
unset($values['delete_conf']);
|
||||
$n_deleted = 0;
|
||||
foreach ($id_agents as $id_agent) {
|
||||
$agent_md5 = md5(get_agent_name($id_agent));
|
||||
$agent_md5 = md5(agents_get_name($id_agent));
|
||||
@unlink ($config["remote_config"]."/md5/".$agent_md5.".md5");
|
||||
$result = @unlink ($config["remote_config"]."/conf/".$agent_md5.".conf");
|
||||
|
||||
|
@ -174,7 +174,7 @@ if ($update_agents) {
|
|||
}
|
||||
$id_group = 0;
|
||||
|
||||
$groups = get_user_groups();
|
||||
$groups = users_get_groups();
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '95%';
|
||||
|
@ -195,8 +195,8 @@ $table->data[1][0] = __('Agents');
|
|||
$table->data[1][0] .= '<span id="agent_loading" class="invisible">';
|
||||
$table->data[1][0] .= html_print_image('images/spinner.png', true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$enabled_agents = get_group_agents ($id_group, array('disabled' => 0), "none");
|
||||
$all_agents = get_group_agents ($id_group, array('disabled' => 1), "none") + $enabled_agents;
|
||||
$enabled_agents = agents_get_group_agents ($id_group, array('disabled' => 0), "none");
|
||||
$all_agents = agents_get_group_agents ($id_group, array('disabled' => 1), "none") + $enabled_agents;
|
||||
|
||||
$table->data[1][1] = html_print_select ($all_agents,
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
@ -225,11 +225,11 @@ $table->style = array ();
|
|||
$table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
$table->data = array ();
|
||||
|
||||
$groups = get_user_groups ($config["id_user"], "AR",false);
|
||||
$agents = get_group_agents (array_keys ($groups));
|
||||
$groups = users_get_groups ($config["id_user"], "AR",false);
|
||||
$agents = agents_get_group_agents (array_keys ($groups));
|
||||
|
||||
$table->data[0][0] = __('Parent');
|
||||
$table->data[0][1] = html_print_input_text_extended ('id_parent', get_agent_name ($id_parent), 'text-id_parent', '', 30, 100, false, '',
|
||||
$table->data[0][1] = html_print_input_text_extended ('id_parent', agents_get_name ($id_parent), 'text-id_parent', '', 30, 100, false, '',
|
||||
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
|
||||
. '<a href="#" class="tip"> <span>' . __("Type at least two characters to search") . '</span></a>';
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ if ($update) {
|
|||
}
|
||||
|
||||
foreach($agents_select as $agent_name) {
|
||||
$agents_[] = get_agent_id($agent_name);
|
||||
$agents_[] = agents_get_agent_id($agent_name);
|
||||
}
|
||||
$modules_ = $module_name;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ if ($update) {
|
|||
}
|
||||
}
|
||||
else if($force == 'group') {
|
||||
$agents_ = array_keys (get_group_agents ($group_select, false, "none"));
|
||||
$agents_ = array_keys (agents_get_group_agents ($group_select, false, "none"));
|
||||
foreach($agents_ as $id_agent) {
|
||||
$module_name = db_get_all_rows_filter('tagente_modulo', array('id_agente' => $id_agent),'nombre');
|
||||
if($module_name == false) {
|
||||
|
@ -205,7 +205,7 @@ if (! $module_type) {
|
|||
$table->rowstyle['edit6'] = 'display: none';
|
||||
$table->rowstyle['edit7'] = 'display: none';
|
||||
}
|
||||
$agents = get_group_agents (array_keys (get_user_groups ()), false, "none");
|
||||
$agents = agents_get_group_agents (array_keys (users_get_groups ()), false, "none");
|
||||
$module_types = db_get_all_rows_filter ('tagente_modulo,ttipo_modulo',
|
||||
array ('tagente_modulo.id_tipo_modulo = ttipo_modulo.id_tipo',
|
||||
'id_agente' => array_keys ($agents),
|
||||
|
@ -254,7 +254,7 @@ else {
|
|||
$filter = false;
|
||||
}
|
||||
|
||||
$names = get_agent_modules (array_keys ($agents),
|
||||
$names = agents_get_modules (array_keys ($agents),
|
||||
'DISTINCT(nombre)', $filter, false);
|
||||
foreach ($names as $name) {
|
||||
$modules[$name['nombre']] = $name['nombre'];
|
||||
|
|
|
@ -106,7 +106,7 @@ switch($action) {
|
|||
break;
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '95%';
|
||||
|
@ -130,7 +130,7 @@ $table->data[1][0] = __('Agents');
|
|||
$table->data[1][0] .= '<span id="agent_loading" class="invisible">';
|
||||
$table->data[1][0] .= html_print_image("images/spinner.png", true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents ($id_group, false, "none"),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
$table->data[2][0] = __('Alert template');
|
||||
|
|
|
@ -107,7 +107,7 @@ switch($action) {
|
|||
break;
|
||||
}
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '95%';
|
||||
|
@ -132,7 +132,7 @@ $table->data[1][0] = __('Agents');
|
|||
$table->data[1][0] .= '<span id="agent_loading" class="invisible">';
|
||||
$table->data[1][0] .= html_print_image('images/spinner.png', true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents ($id_group, false, "none"),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
$table->data[2][0] = __('Alert template');
|
||||
|
|
|
@ -128,7 +128,7 @@ echo "<td style='vertical-align: top;'>".__('Agents')."</td>";
|
|||
echo "<td></td>";
|
||||
echo "<td style='vertical-align: top;'>".__('Modules')."</td>";
|
||||
echo "</tr><tr>";
|
||||
echo "<td>".html_print_select (get_group_agents(), 'id_agents[]', 0, false, '', '', true, true, true, '', false, 'width:200px;')."</td>";
|
||||
echo "<td>".html_print_select (agents_get_group_agents(), 'id_agents[]', 0, false, '', '', true, true, true, '', false, 'width:200px;')."</td>";
|
||||
echo "<td style='vertical-align: center; text-align: center;'>" . html_print_image("images/darrowright.png", true) . "</td>";
|
||||
echo "<td>".html_print_select (array (), 'module[]', 0, false, '', 0, true, true, true, '', false, 'width:200px;')."</td>";
|
||||
echo "</tr><tr>";
|
||||
|
|
|
@ -354,7 +354,7 @@ html_print_input_hidden('id_item', $idItem);
|
|||
<td style="">
|
||||
<?php
|
||||
html_print_input_hidden('id_agent', $idAgent) .
|
||||
html_print_input_text_extended ('agent', get_agent_name ($idAgent), 'text-agent', '', 30, 100, false, '',
|
||||
html_print_input_text_extended ('agent', agents_get_name ($idAgent), 'text-agent', '', 30, 100, false, '',
|
||||
array('style' => 'background: url(images/lightning.png) no-repeat right;'))
|
||||
. '<a href="#" class="tip"> <span>' . __("Type at least two characters to search") . '</span></a>';
|
||||
?>
|
||||
|
@ -514,7 +514,7 @@ ui_require_jquery_file ('timeentry');
|
|||
ui_require_jquery_file ('autocomplete');
|
||||
ui_require_javascript_file('pandora');
|
||||
if ($enterpriseEnable) {
|
||||
enterpriseTextBox();
|
||||
reporting_enterprise_text_box();
|
||||
}
|
||||
|
||||
function print_SLA_list($width, $action, $idItem = null) {
|
||||
|
@ -549,7 +549,7 @@ function print_SLA_list($width, $action, $idItem = null) {
|
|||
}
|
||||
foreach ($itemsSLA as $item) {
|
||||
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
||||
$nameAgent = get_agent_name ($idAgent);
|
||||
$nameAgent = agents_get_name ($idAgent);
|
||||
$nameModule = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
||||
|
||||
echo '<tr id="sla_' . $item['id'] . '" style="" class="datos">
|
||||
|
@ -627,7 +627,7 @@ function print_General_list($width, $action, $idItem = null) {
|
|||
}
|
||||
foreach ($itemsGeneral as $item) {
|
||||
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
||||
$nameAgent = get_agent_name ($idAgent);
|
||||
$nameAgent = agents_get_name ($idAgent);
|
||||
$nameModule = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
||||
|
||||
echo '<tr id="general_' . $item['id'] . '" style="" class="datos">
|
||||
|
|
|
@ -226,12 +226,12 @@ foreach ($items as $item) {
|
|||
$row[3] = '-';
|
||||
}
|
||||
else {
|
||||
$row[2] = ui_print_truncate_text(get_agent_name(get_agent_module_id($item['id_agent_module'])), 20);
|
||||
$row[2] = ui_print_truncate_text(agents_get_name(agents_get_module_id($item['id_agent_module'])), 20);
|
||||
$row[3] = ui_print_truncate_text(db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module'])), 20);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$row[2] = ui_print_truncate_text(get_agent_name($item['id_agent']), 20);
|
||||
$row[2] = ui_print_truncate_text(agents_get_name($item['id_agent']), 20);
|
||||
|
||||
if ($item['id_agent_module'] == '') {
|
||||
$row [3] = '-';
|
||||
|
|
|
@ -25,7 +25,7 @@ if (! check_acl ($config['id_user'], 0, "IW")) {
|
|||
|
||||
require_once ($config['homedir'].'/include/functions_users.php');
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
|
||||
switch ($action) {
|
||||
case 'new':
|
||||
|
|
|
@ -318,7 +318,7 @@ switch ($action) {
|
|||
break;
|
||||
default:
|
||||
if ($enterpriseEnable) {
|
||||
$resultOperationDB = enterprise_updateAction();
|
||||
$resultOperationDB = reporting_enterprise_update_action();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ switch ($action) {
|
|||
}
|
||||
|
||||
if ($enterpriseEnable) {
|
||||
$result = enterprise_actionsDB($action, $activeTab, $idReport);
|
||||
$result = reporting_enterprise_actions_DB($action, $activeTab, $idReport);
|
||||
if ($result !== null) {
|
||||
$resultOperationDB = $result;
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ $buttons = array(
|
|||
);
|
||||
|
||||
if ($enterpriseEnable) {
|
||||
$buttons = enterprise_addTabs($buttons, $idReport);
|
||||
$buttons = reporting_enterprise_add_Tabs($buttons, $idReport);
|
||||
}
|
||||
|
||||
$buttons['preview'] = array('active' => false,
|
||||
|
@ -540,7 +540,7 @@ switch ($activeTab) {
|
|||
require_once('godmode/reporting/reporting_builder.preview.php');
|
||||
break;
|
||||
default:
|
||||
enterprise_selectTab($activeTab);
|
||||
reporting_enterprise_select_tab($activeTab);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ $table->data[0][0] = __('Name:'). ui_print_help_tip (__("Use [ or ( as first cha
|
|||
|
||||
$table->data[0][1] = html_print_input_text ('name', $visualConsoleName, '', 21, 30, true);
|
||||
$table->data[1][0] = __('Group:');
|
||||
$groups = get_user_groups ($config['id_user']);
|
||||
$groups = users_get_groups ($config['id_user']);
|
||||
|
||||
$own_info = get_user_info($config['id_user']);
|
||||
// Only display group "All" if user is administrator or has "PM" privileges
|
||||
|
|
|
@ -175,7 +175,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||
//Agent
|
||||
if (($layoutData['type'] != ICON) && ($layoutData['type'] != LABEL)) {
|
||||
$table->data[$i + 2][0] = '<a href="#" class="tip"> <span>' . __("Type at least two characters to search.") . '</span></a>' .
|
||||
html_print_input_text_extended ('agent_' . $idLayoutData, get_agent_name($layoutData['id_agent']), 'text-agent_' . $idLayoutData, '', 15, 100, false, '',
|
||||
html_print_input_text_extended ('agent_' . $idLayoutData, agents_get_name($layoutData['id_agent']), 'text-agent_' . $idLayoutData, '', 15, 100, false, '',
|
||||
array('class' => 'text-agent', 'style' => 'background: #ffffff url(images/lightning.png) no-repeat right;'), true);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -125,7 +125,7 @@ switch ($activeTab) {
|
|||
$values['pos_x'] = get_parameter('left_' . $id, 0);
|
||||
$values['pos_y'] = get_parameter('top_' . $id, 0);
|
||||
$agentName = get_parameter('agent_' . $id, '');
|
||||
$values['id_agent'] = get_agent_id($agentName);
|
||||
$values['id_agent'] = agents_get_agent_id($agentName);
|
||||
$values['id_agente_modulo'] = get_parameter('module_' . $id, 0);
|
||||
$values['parent_item'] = get_parameter('parent_' . $id, 0);
|
||||
$values['id_layout_linked'] = get_parameter('map_linked_' . $id, 0);
|
||||
|
|
|
@ -61,7 +61,7 @@ $table->data[2][1] = __('Width').': '.html_print_input_text ('width', 0, '', 5,
|
|||
$table->data[2][1] .= '<br />'.__('Height').': '.html_print_input_text ('height', 0, '', 5, 5, true);
|
||||
|
||||
$table->data[3][0] = __('Agents');
|
||||
$table->data[3][1] = html_print_select (get_group_agents ($visualConsole['id_group'], false, "none", false, true),
|
||||
$table->data[3][1] = html_print_select (agents_get_group_agents ($visualConsole['id_group'], false, "none", false, true),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
$table->data[4][0] = __('Modules');
|
||||
|
|
|
@ -153,7 +153,7 @@ $table->data[8][1] .= '<a href="#" class="tip"> <span>'.__('Ports defined l
|
|||
|
||||
// Group
|
||||
$table->data[9][0] = "<b>".__('Group');
|
||||
$groups = get_user_groups (false, "AR", false);
|
||||
$groups = users_get_groups (false, "AR", false);
|
||||
$table->data[9][1] = html_print_select_groups(false, "AR", false, 'id_group', $id_group, '', '', 0, true);
|
||||
|
||||
// Incident
|
||||
|
|
|
@ -46,7 +46,7 @@ $table->data[1][1] = __('Yes').' '.html_print_radio_button_extended ('autoc
|
|||
$table->data[1][1] .= __('No').' '.html_print_radio_button_extended ('autocreate_remote_users', 0, '', $config['autocreate_remote_users'], false, 'enable_profile_options ();', '', true);
|
||||
$table->rowstyle[1] = $config['auth'] != 'mysql' ? '' : 'display: none;';
|
||||
$table->data[2][0] = __('Autocreate profile');
|
||||
$profile_list = get_profiles ();
|
||||
$profile_list = profile_get_profiles ();
|
||||
if ($profile_list === false) {
|
||||
$profile_list = array ();
|
||||
}
|
||||
|
|
|
@ -196,7 +196,7 @@ if ($id_profile || $new_profile) {
|
|||
' Alert edit: ' . $alert_edit . ' User management: ' . $user_management .
|
||||
' DB management: ' . $db_management . ' Alert management: ' . $alert_management .
|
||||
' Pandora Management: ' . $pandora_management;
|
||||
enterprise_hook('pandora_audit_enterprise', array($id_audit, $info));
|
||||
enterprise_hook('audit_pandora_enterprise', array($id_audit, $info));
|
||||
|
||||
|
||||
$page_title = __('Update profile');
|
||||
|
|
|
@ -252,7 +252,7 @@ if ($delete_profile) {
|
|||
db_pandora_audit("User management",
|
||||
"Deleted profile for user ".io_safe_input($id2), false, false, 'The profile with id ' . $id_perfil . ' in the group ' . $perfilUser['id_grupo']);
|
||||
|
||||
$return = delete_user_profile ($id2, $id_up);
|
||||
$return = profile_delete_user_profile ($id2, $id_up);
|
||||
ui_print_result_message ($return,
|
||||
__('Successfully deleted'),
|
||||
__('Could not be deleted'));
|
||||
|
@ -323,10 +323,10 @@ else
|
|||
$display_all_group = false;
|
||||
|
||||
if ($new_user){
|
||||
$usr_groups = (get_user_groups($config['id_user'], 'AR', $display_all_group));
|
||||
$usr_groups = (users_get_groups($config['id_user'], 'AR', $display_all_group));
|
||||
$id_usr = $config['id_user'];
|
||||
}else{
|
||||
$usr_groups = (get_user_groups($id, 'AR', $display_all_group));
|
||||
$usr_groups = (users_get_groups($id, 'AR', $display_all_group));
|
||||
$id_usr = $id;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ if ($new_user){
|
|||
if (count($usr_groups) > 1){
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
$table->data[10][0] = __('Skin');
|
||||
$table->data[10][1] = print_select_skins($id_usr,'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||
$table->data[10][1] = skins_print_select($id_usr,'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ if ($result === false) {
|
|||
foreach ($result as $profile) {
|
||||
$data = array ();
|
||||
|
||||
$data[0] = '<a href="index.php?sec=gusaurios&sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'">'.get_profile_name ($profile['id_perfil']).'</a>';
|
||||
$data[0] = '<a href="index.php?sec=gusaurios&sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'">'.profile_get_name ($profile['id_perfil']).'</a>';
|
||||
$data[1] = ui_print_group_icon($profile["id_grupo"],true).' <a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$profile['id_grupo'].'">' . ui_print_truncate_text(groups_get_name ($profile['id_grupo'], True), 35).'</a>';
|
||||
$data[2] = '<form method="post" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
|
||||
$data[2] .= html_print_input_hidden ('delete_profile', 1, true);
|
||||
|
@ -415,11 +415,11 @@ if (!$enterprise_include) {
|
|||
|
||||
$data[0] = '<form method="post">';
|
||||
if (check_acl ($config['id_user'], 0, "PM")) {
|
||||
$data[0] .= html_print_select (get_profiles (), 'assign_profile', 0, '',
|
||||
$data[0] .= html_print_select (profile_get_profiles (), 'assign_profile', 0, '',
|
||||
__('None'), 0, true, false, false);
|
||||
}
|
||||
else {
|
||||
$data[0] .= html_print_select (get_profiles (array ('pandora_management' => '<> 1',
|
||||
$data[0] .= html_print_select (profile_get_profiles (array ('pandora_management' => '<> 1',
|
||||
'db_management' => '<> 1')), 'assign_profile', 0, '', __('None'), 0,
|
||||
true, false, false);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ if (isset ($_GET["user_del"])) { //delete user
|
|||
}
|
||||
elseif (isset ($_GET["profile_del"])) { //delete profile
|
||||
$id_profile = (int) get_parameter_post ("delete_profile");
|
||||
$result = delete_profile ($id_profile);
|
||||
$result = profile_delete_profile ($id_profile);
|
||||
ui_print_result_message ($result,
|
||||
__('Successfully deleted'),
|
||||
__('There was a problem deleting the profile'));
|
||||
|
@ -151,7 +151,7 @@ $info1 = get_users ($order, array ('offset' => (int) get_parameter ('offset'),
|
|||
|
||||
$info = array();
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
$own_groups = get_user_groups ($config['id_user'], 'AR', $own_info['is_admin']);
|
||||
$own_groups = users_get_groups ($config['id_user'], 'AR', $own_info['is_admin']);
|
||||
|
||||
if ($own_info['is_admin'])
|
||||
$info = $info1;
|
||||
|
@ -159,7 +159,7 @@ if ($own_info['is_admin'])
|
|||
else
|
||||
foreach ($info1 as $key => $usr){
|
||||
$u = get_user_info ($key);
|
||||
$g = get_user_groups ($key, 'AR', $u['is_admin']);
|
||||
$g = users_get_groups ($key, 'AR', $u['is_admin']);
|
||||
$result = array_intersect($g, $own_groups);
|
||||
if (!$usr['is_admin'] && !empty($result))
|
||||
$info[$key] = $usr;
|
||||
|
@ -203,7 +203,7 @@ foreach ($info as $user_id => $user_info) {
|
|||
$result = db_get_all_rows_field_filter ("tusuario_perfil", "id_usuario", $user_id);
|
||||
if ($result !== false) {
|
||||
foreach ($result as $row) {
|
||||
$data[3] .= get_profile_name ($row["id_perfil"]);
|
||||
$data[3] .= profile_get_name ($row["id_perfil"]);
|
||||
$data[3] .= " / ";
|
||||
$data[3] .= groups_get_name ($row["id_grupo"]);
|
||||
$data[3] .= "<br />";
|
||||
|
|
|
@ -38,7 +38,7 @@ if ($get_agent_alerts_simple) {
|
|||
echo json_encode (false);
|
||||
return;
|
||||
}
|
||||
$id_group = get_agent_group ($id_agent);
|
||||
$id_group = agents_get_agent_group ($id_agent);
|
||||
|
||||
if (! check_acl ($config['id_user'], $id_group, "AR")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
|
|
|
@ -23,7 +23,7 @@ if ($search_modules) {
|
|||
$filter = get_parameter('q', '') . '%';
|
||||
$other_filter = json_decode(io_safe_output(get_parameter('other_filter')), true);
|
||||
|
||||
$modules = get_agent_modules($id_agents, false, (array('nombre' => $filter) + $other_filter));
|
||||
$modules = agents_get_modules($id_agents, false, (array('nombre' => $filter) + $other_filter));
|
||||
|
||||
if ($modules === false) $modules = array();
|
||||
$modules = array_unique($modules);
|
||||
|
|
|
@ -137,7 +137,7 @@ switch ($action) {
|
|||
$values['pos_y'] = $top;
|
||||
}
|
||||
if ($agent !== null) {
|
||||
$id_agent = get_agent_id($agent);
|
||||
$id_agent = agents_get_agent_id($agent);
|
||||
$values['id_agent'] = $id_agent;
|
||||
}
|
||||
if ($id_module !== null) {
|
||||
|
@ -208,10 +208,10 @@ switch ($action) {
|
|||
case 'label':
|
||||
case 'icon':
|
||||
$elementFields = db_get_row_filter('tlayout_data', array('id' => $id_element));
|
||||
$elementFields['agent_name'] = io_safe_output(get_agent_name($elementFields['id_agent']));
|
||||
$elementFields['agent_name'] = io_safe_output(agents_get_name($elementFields['id_agent']));
|
||||
//Make the html of select box of modules about id_agent.
|
||||
if ($elementFields['id_agent'] != 0) {
|
||||
$modules = get_agent_modules($elementFields['id_agent'], false, array('disabled' => 0, 'id_agente' => $elementFields['id_agent']));
|
||||
$modules = agents_get_modules($elementFields['id_agent'], false, array('disabled' => 0, 'id_agente' => $elementFields['id_agent']));
|
||||
|
||||
$elementFields['modules_html'] = '<option value="0">--</option>';
|
||||
foreach ($modules as $id => $name) {
|
||||
|
@ -243,7 +243,7 @@ switch ($action) {
|
|||
$values['pos_x'] = $left;
|
||||
$values['pos_y'] = $top;
|
||||
if ($agent != '')
|
||||
$values['id_agent'] = get_agent_id($agent);
|
||||
$values['id_agent'] = agents_get_agent_id($agent);
|
||||
else
|
||||
$values['id_agent'] = 0;
|
||||
$values['id_agente_modulo'] = $id_module;
|
||||
|
|
|
@ -129,7 +129,7 @@ function process_user_login ($login, $pass) {
|
|||
$config["auth_error"] = "No profile"; //Error message, don't translate
|
||||
return false; //User doesn't have a profile so doesn't have access
|
||||
} elseif ($profile === false && !empty ($config["auth"]["create_user_undefined"])) {
|
||||
$ret = create_user_profile ($login); //User doesn't have a profile but we are asked to create one
|
||||
$ret = profile_create_user_profile ($login); //User doesn't have a profile but we are asked to create one
|
||||
if ($ret === false) {
|
||||
$config["auth_error"] = "Profile creation failed"; //Error message, don't translate
|
||||
return false; //We couldn't create the profile for some or another reason
|
||||
|
|
|
@ -176,7 +176,7 @@ function process_user_login ($login, $pass) {
|
|||
return false;
|
||||
}
|
||||
|
||||
create_user_profile ($login, $config['default_remote_profile'], $config['default_remote_group']);
|
||||
profile_create_user_profile ($login, $config['default_remote_profile'], $config['default_remote_group']);
|
||||
return $login;
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
|
|||
|
||||
$agent_module_id = $module_list[$i];
|
||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||
$agent_id = get_agent_id ($agent_name);
|
||||
$agent_id = agents_get_agent_id ($agent_name);
|
||||
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
||||
$module_name_list[$i] = $agent_name." / ".substr ($module_name, 0, 40);
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
|
@ -781,7 +781,7 @@ function graph_db_agentes_modulos ($width, $height) {
|
|||
$modules = array ();
|
||||
|
||||
foreach ($modules as $module) {
|
||||
$agent_name = get_agent_name ($module['id_agente'], "none");
|
||||
$agent_name = agents_get_name ($module['id_agente'], "none");
|
||||
switch ($config['dbtype']){
|
||||
case "mysql":
|
||||
case "postgresql":
|
||||
|
@ -1003,7 +1003,7 @@ function grafico_eventos_grupo ($width = 300, $height = 200, $url = "") {
|
|||
if ($row["id_agente"] == 0) {
|
||||
$name = __('SYSTEM')." (".$row["count"].")";
|
||||
} else {
|
||||
$name = mb_substr (get_agent_name ($row["id_agente"], "lower"), 0, 14)." (".$row["count"].")";
|
||||
$name = mb_substr (agents_get_name ($row["id_agente"], "lower"), 0, 14)." (".$row["count"].")";
|
||||
}
|
||||
$data[$name] = $row["count"];
|
||||
}
|
||||
|
@ -1146,8 +1146,8 @@ function grafico_db_agentes_paquetes ($width = 380, $height = 300) {
|
|||
$data = array ();
|
||||
$legend = array ();
|
||||
|
||||
$agents = get_group_agents (array_keys (get_user_groups ()), false, "none");
|
||||
$count = get_agent_modules_data_count (array_keys ($agents));
|
||||
$agents = agents_get_group_agents (array_keys (users_get_groups ()), false, "none");
|
||||
$count = agents_get_modules_data_count (array_keys ($agents));
|
||||
unset ($count["total"]);
|
||||
arsort ($count, SORT_NUMERIC);
|
||||
$count = array_slice ($count, 0, 8, true);
|
||||
|
@ -1178,7 +1178,7 @@ function grafico_db_agentes_purge ($id_agent, $width, $height) {
|
|||
$id_agent = -1;
|
||||
$query = "";
|
||||
} else {
|
||||
$modules = get_agent_modules ($id_agent);
|
||||
$modules = agents_get_modules ($id_agent);
|
||||
$query = sprintf (" AND id_agente_modulo IN (%s)", implode (",", array_keys ($modules)));
|
||||
}
|
||||
|
||||
|
@ -1279,7 +1279,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
||||
$interval = (int) ($period / $resolution);
|
||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||
$agent_id = get_agent_id ($agent_name);
|
||||
$agent_id = agents_get_agent_id ($agent_name);
|
||||
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
$module_type = modules_get_moduletype_name ($id_module_type);
|
||||
|
@ -1366,7 +1366,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
// Get baseline data
|
||||
$baseline_data = array ();
|
||||
if ($baseline == 1) {
|
||||
$baseline_data = enterprise_hook ('enterprise_get_baseline', array ($agent_module_id, $period, $width, $height , $title, $unit_name, $date));
|
||||
$baseline_data = enterprise_hook ('reporting_enterprise_get_baseline', array ($agent_module_id, $period, $width, $height , $title, $unit_name, $date));
|
||||
if ($baseline_data === ENTERPRISE_NOT_HOOK) {
|
||||
$baseline_data = array ();
|
||||
}
|
||||
|
@ -1535,7 +1535,7 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
|
|||
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
||||
$interval = (int) ($period / $resolution);
|
||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||
$agent_id = get_agent_id ($agent_name);
|
||||
$agent_id = agents_get_agent_id ($agent_name);
|
||||
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
$module_type = modules_get_moduletype_name ($id_module_type);
|
||||
|
@ -1796,7 +1796,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
|||
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
||||
$interval = (int) ($period / $resolution);
|
||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||
$agent_id = get_agent_id ($agent_name);
|
||||
$agent_id = agents_get_agent_id ($agent_name);
|
||||
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
$module_type = modules_get_moduletype_name ($id_module_type);
|
||||
|
@ -2013,7 +2013,7 @@ function grafico_modulo_log4x ($id_agente_modulo, $periodo, $show_event,
|
|||
|
||||
$nombre_agente = modules_get_agentmodule_agent_name ($id_agente_modulo);
|
||||
$nombre_modulo = modules_get_agentmodule_name ($id_agente_modulo);
|
||||
$id_agente = get_agent_id ($nombre_agente);
|
||||
$id_agente = agents_get_agent_id ($nombre_agente);
|
||||
|
||||
|
||||
$one_second = 1;
|
||||
|
|
|
@ -58,7 +58,7 @@ function agents_create_agent ($name, $id_group, $interval, $ip_address, $values
|
|||
}
|
||||
|
||||
// Create address for this agent in taddress
|
||||
agent_add_address ($id_agent, $ip_address);
|
||||
agents_add_address ($id_agent, $ip_address);
|
||||
|
||||
// Create special module agent_keepalive
|
||||
$id_agent_module = db_process_sql_insert ('tagente_modulo',
|
||||
|
@ -170,7 +170,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f
|
|||
}
|
||||
else {
|
||||
$id_agent = (array) $id_agent;
|
||||
$id_modules = array_keys (get_agent_modules ($id_agent, false, array('delete_pending' => 0)));
|
||||
$id_modules = array_keys (agents_get_modules ($id_agent, false, array('delete_pending' => 0)));
|
||||
|
||||
if (empty ($id_modules))
|
||||
return array ();
|
||||
|
@ -332,7 +332,7 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
|
|||
}
|
||||
|
||||
//Get user groups
|
||||
$groups = array_keys (get_user_groups ($config["id_user"], $access, false));
|
||||
$groups = array_keys (users_get_groups ($config["id_user"], $access, false));
|
||||
|
||||
//If no group specified, get all user groups
|
||||
if (empty ($filter['id_grupo'])) {
|
||||
|
@ -589,12 +589,12 @@ function agents_get_next_contact($idAgent, $maxModules = false) {
|
|||
* Example:
|
||||
<code>
|
||||
Both are similars:
|
||||
$modules = get_agent_modules ($id_agent, false, array ('disabled' => 0));
|
||||
$modules = get_agent_modules ($id_agent, false, 'disabled = 0');
|
||||
$modules = agents_get_modules ($id_agent, false, array ('disabled' => 0));
|
||||
$modules = agents_get_modules ($id_agent, false, 'disabled = 0');
|
||||
|
||||
Both are similars:
|
||||
$modules = get_agent_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
||||
$modules = get_agent_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
||||
$modules = agents_get_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
||||
$modules = agents_get_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
||||
</code>
|
||||
*
|
||||
* @return array An array with all modules in the agent.
|
||||
|
@ -665,12 +665,12 @@ function agents_common_modules_with_alerts ($id_agent, $filter = false, $indexed
|
|||
* Example:
|
||||
<code>
|
||||
Both are similars:
|
||||
$modules = get_agent_modules ($id_agent, false, array ('disabled' => 0));
|
||||
$modules = get_agent_modules ($id_agent, false, 'disabled = 0');
|
||||
$modules = agents_get_modules ($id_agent, false, array ('disabled' => 0));
|
||||
$modules = agents_get_modules ($id_agent, false, 'disabled = 0');
|
||||
|
||||
Both are similars:
|
||||
$modules = get_agent_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
||||
$modules = get_agent_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
||||
$modules = agents_get_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
||||
$modules = agents_get_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
||||
</code>
|
||||
*
|
||||
* @return array An array with all modules in the agent.
|
||||
|
@ -737,7 +737,7 @@ function agents_common_modules ($id_agent, $filter = false, $indexed = true, $ge
|
|||
*
|
||||
* @return array An array with all agents in the group or an empty array
|
||||
*/
|
||||
function get_group_agents ($id_group = 0, $search = false, $case = "lower", $noACL = false, $childGroups = false) {
|
||||
function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower", $noACL = false, $childGroups = false) {
|
||||
global $config;
|
||||
|
||||
|
||||
|
@ -751,7 +751,7 @@ function get_group_agents ($id_group = 0, $search = false, $case = "lower", $noA
|
|||
}
|
||||
|
||||
if ($childGroups) {
|
||||
$id_group = array_keys(get_user_groups(false, "AR", true, false, (array)$id_group));
|
||||
$id_group = array_keys(users_get_groups(false, "AR", true, false, (array)$id_group));
|
||||
}
|
||||
|
||||
if (is_array($id_group)) {
|
||||
|
@ -866,23 +866,23 @@ function get_group_agents ($id_group = 0, $search = false, $case = "lower", $noA
|
|||
* Example:
|
||||
<code>
|
||||
Both are similars:
|
||||
$modules = get_agent_modules ($id_agent, false, array ('disabled' => 0));
|
||||
$modules = get_agent_modules ($id_agent, false, 'disabled = 0');
|
||||
$modules = agents_get_modules ($id_agent, false, array ('disabled' => 0));
|
||||
$modules = agents_get_modules ($id_agent, false, 'disabled = 0');
|
||||
|
||||
Both are similars:
|
||||
$modules = get_agent_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
||||
$modules = get_agent_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
||||
$modules = agents_get_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
||||
$modules = agents_get_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
||||
</code>
|
||||
*
|
||||
* @return array An array with all modules in the agent.
|
||||
* If multiple rows are selected, they will be in an array
|
||||
*/
|
||||
function get_agent_modules ($id_agent = null, $details = false, $filter = false, $indexed = true, $get_not_init_modules = true) {
|
||||
function agents_get_modules ($id_agent = null, $details = false, $filter = false, $indexed = true, $get_not_init_modules = true) {
|
||||
global $config;
|
||||
|
||||
if ($id_agent === null) {
|
||||
//Extract the agents of group user.
|
||||
$groups = get_user_groups(false, 'AR', false);
|
||||
$groups = users_get_groups(false, 'AR', false);
|
||||
$id_groups = array_keys($groups);
|
||||
|
||||
$sql = "SELECT id_agente FROM tagente WHERE id_grupo IN (" . implode(',', $id_groups) . ")";
|
||||
|
@ -897,7 +897,7 @@ function get_agent_modules ($id_agent = null, $details = false, $filter = false,
|
|||
|
||||
$id_agent = safe_int ($id_agent, 1);
|
||||
|
||||
$userGroups = get_user_groups($config['id_user'], 'AR', false);
|
||||
$userGroups = users_get_groups($config['id_user'], 'AR', false);
|
||||
$id_userGroups = array_keys($userGroups);
|
||||
|
||||
$where = " WHERE (
|
||||
|
@ -1037,7 +1037,7 @@ function get_agent_modules ($id_agent = null, $details = false, $filter = false,
|
|||
*
|
||||
* @return int Id from the agent of the given id module.
|
||||
*/
|
||||
function get_agent_module_id ($id_agente_modulo) {
|
||||
function agents_get_module_id ($id_agente_modulo) {
|
||||
return (int) db_get_value ('id_agente', 'tagente_modulo', 'id_agente_modulo', $id_agente_modulo);
|
||||
}
|
||||
|
||||
|
@ -1048,7 +1048,7 @@ function get_agent_module_id ($id_agente_modulo) {
|
|||
*
|
||||
* @return int Id from the agent of the given name.
|
||||
*/
|
||||
function get_agent_id ($agent_name) {
|
||||
function agents_get_agent_id ($agent_name) {
|
||||
return (int) db_get_value ('id_agente', 'tagente', 'nombre', $agent_name);
|
||||
}
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ function get_agent_id ($agent_name) {
|
|||
*
|
||||
* @return string Name of the given agent.
|
||||
*/
|
||||
function get_agent_name ($id_agent, $case = "none") {
|
||||
function agents_get_name ($id_agent, $case = "none") {
|
||||
$agent = (string) db_get_value ('nombre', 'tagente', 'id_agente', (int) $id_agent);
|
||||
// Version 3.0 has enforced case sensitive agent names
|
||||
// so we always should show real case names.
|
||||
|
@ -1087,7 +1087,7 @@ function get_agent_name ($id_agent, $case = "none") {
|
|||
*
|
||||
* @return mixed The number of data in the database
|
||||
*/
|
||||
function get_agent_modules_data_count ($id_agent = 0) {
|
||||
function agents_get_modules_data_count ($id_agent = 0) {
|
||||
$id_agent = safe_int ($id_agent, 1);
|
||||
|
||||
if (empty ($id_agent)) {
|
||||
|
@ -1105,7 +1105,7 @@ function get_agent_modules_data_count ($id_agent = 0) {
|
|||
foreach ($id_agent as $agent_id) {
|
||||
//Init value
|
||||
$count[$agent_id] = 0;
|
||||
$modules = array_keys (get_agent_modules ($agent_id));
|
||||
$modules = array_keys (agents_get_modules ($agent_id));
|
||||
foreach ($query as $sql) {
|
||||
//Add up each table's data
|
||||
$count[$agent_id] += (int) db_get_sql ($sql." WHERE id_agente_modulo IN (".implode (",", $modules).")", 0, true);
|
||||
|
@ -1134,7 +1134,7 @@ function get_agent_modules_data_count ($id_agent = 0) {
|
|||
*
|
||||
* @return bool True if the agent has fired alerts.
|
||||
*/
|
||||
function check_alert_fired ($id_agent) {
|
||||
function agents_check_alert_fired ($id_agent) {
|
||||
$sql = sprintf ("SELECT COUNT(*)
|
||||
FROM talert_template_modules, tagente_modulo
|
||||
WHERE talert_template_modules.id_agent_module = tagente_modulo.id_agente_modulo
|
||||
|
@ -1155,7 +1155,7 @@ function check_alert_fired ($id_agent) {
|
|||
*
|
||||
* @return int The interval value of a given agent
|
||||
*/
|
||||
function get_agent_interval ($id_agent) {
|
||||
function agents_get_interval ($id_agent) {
|
||||
return (int) db_get_value ('intervalo', 'tagente', 'id_agente', $id_agent);
|
||||
}
|
||||
|
||||
|
@ -1166,7 +1166,7 @@ function get_agent_interval ($id_agent) {
|
|||
*
|
||||
* @return int The interval value of a given agent
|
||||
*/
|
||||
function get_agent_os ($id_agent) {
|
||||
function agents_get_os ($id_agent) {
|
||||
return (int) db_get_value ('id_os', 'tagente', 'id_agente', $id_agent);
|
||||
}
|
||||
|
||||
|
@ -1177,7 +1177,7 @@ function get_agent_os ($id_agent) {
|
|||
*
|
||||
* @return bool The flag value of an agent module.
|
||||
*/
|
||||
function give_agentmodule_flag ($id_agent_module) {
|
||||
function agents_give_agentmodule_flag ($id_agent_module) {
|
||||
return db_get_value ('flag', 'tagente_modulo', 'id_agente_modulo', $id_agent_module);
|
||||
}
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ function give_agentmodule_flag ($id_agent_module) {
|
|||
* @param int Agent id
|
||||
* @param string IP address to assign
|
||||
*/
|
||||
function agent_add_address ($id_agent, $ip_address) {
|
||||
function agents_add_address ($id_agent, $ip_address) {
|
||||
global $config;
|
||||
|
||||
// Check if already is attached to agent
|
||||
|
@ -1227,7 +1227,7 @@ function agent_add_address ($id_agent, $ip_address) {
|
|||
* @param int Agent id
|
||||
* @param string IP address to unassign
|
||||
*/
|
||||
function agent_delete_address ($id_agent, $ip_address) {
|
||||
function agents_delete_address ($id_agent, $ip_address) {
|
||||
global $config;
|
||||
|
||||
$sql = sprintf ("SELECT id_ag FROM taddress_agent, taddress
|
||||
|
@ -1237,13 +1237,13 @@ function agent_delete_address ($id_agent, $ip_address) {
|
|||
if ($id_ag !== false) {
|
||||
db_process_sql_delete('taddress_agent', array('id_ag' => $id_ag));
|
||||
}
|
||||
$agent_name = get_agent_name($id_agent, "");
|
||||
$agent_name = agents_get_name($id_agent, "");
|
||||
db_pandora_audit("Agent management",
|
||||
"Deleted IP $ip_address from agent '$agent_name'");
|
||||
|
||||
// Need to change main address?
|
||||
if (get_agent_address ($id_agent) == $ip_address) {
|
||||
$new_ips = get_agent_addresses ($id_agent);
|
||||
if (agents_get_address ($id_agent) == $ip_address) {
|
||||
$new_ips = agents_get_addresses ($id_agent);
|
||||
// Change main address in agent to first one in the list
|
||||
|
||||
db_process_sql_update('tagente', array('direccion' => current ($new_ips)),
|
||||
|
@ -1258,7 +1258,7 @@ function agent_delete_address ($id_agent, $ip_address) {
|
|||
*
|
||||
* @return string The address of the given agent
|
||||
*/
|
||||
function get_agent_address ($id_agent) {
|
||||
function agents_get_address ($id_agent) {
|
||||
return (string) db_get_value ('direccion', 'tagente', 'id_agente', (int) $id_agent);
|
||||
}
|
||||
|
||||
|
@ -1269,7 +1269,7 @@ function get_agent_address ($id_agent) {
|
|||
*
|
||||
* @return mixed The agent that has the IP address given. False if none were found.
|
||||
*/
|
||||
function get_agent_with_ip ($ip_address) {
|
||||
function agents_get_agent_with_ip ($ip_address) {
|
||||
global $config;
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
|
@ -1300,7 +1300,7 @@ function get_agent_with_ip ($ip_address) {
|
|||
*
|
||||
* @return array Array with the IP address of the given agent or an empty array.
|
||||
*/
|
||||
function get_agent_addresses ($id_agent) {
|
||||
function agents_get_addresses ($id_agent) {
|
||||
$sql = sprintf ("SELECT ip
|
||||
FROM taddress_agent, taddress
|
||||
WHERE taddress_agent.id_a = taddress.id_a
|
||||
|
@ -1328,10 +1328,10 @@ function get_agent_addresses ($id_agent) {
|
|||
* @return int Worst status of an agent for all of its modules.
|
||||
* The value -1 is returned in case the agent has exceed its interval.
|
||||
*/
|
||||
function get_agent_status($id_agent = 0) {
|
||||
function agents_get_status($id_agent = 0) {
|
||||
global $config;
|
||||
|
||||
$modules = get_agent_modules ($id_agent, 'id_agente_modulo', array('disabled' => 0), true, false);
|
||||
$modules = agents_get_modules ($id_agent, 'id_agente_modulo', array('disabled' => 0), true, false);
|
||||
|
||||
$modules_status = array();
|
||||
$modules_async = 0;
|
||||
|
@ -1404,7 +1404,7 @@ function get_agent_status($id_agent = 0) {
|
|||
*
|
||||
* @return bool False if error, true if success.
|
||||
*/
|
||||
function delete_agent ($id_agents, $disableACL = false) {
|
||||
function agents_delete_agent ($id_agents, $disableACL = false) {
|
||||
global $config;
|
||||
|
||||
$error = false;
|
||||
|
@ -1421,10 +1421,10 @@ function delete_agent ($id_agents, $disableACL = false) {
|
|||
if ($id_agent < 1)
|
||||
continue;
|
||||
|
||||
$agent_name = get_agent_name($id_agent, "");
|
||||
$agent_name = agents_get_name($id_agent, "");
|
||||
|
||||
/* Check for deletion permissions */
|
||||
$id_group = get_agent_group ($id_agent);
|
||||
$id_group = agents_get_agent_group ($id_agent);
|
||||
if ((! check_acl ($config['id_user'], $id_group, "AW")) && !$disableACL) {
|
||||
db_process_sql_rollback ();
|
||||
return false;
|
||||
|
@ -1487,7 +1487,7 @@ function delete_agent ($id_agents, $disableACL = false) {
|
|||
// db_process_delete_temp ("tagent_access", "id_agent", $id_agent);
|
||||
|
||||
// Delete agent policies
|
||||
enterprise_hook('delete_agent_policies', array($id_agent));
|
||||
enterprise_hook('policies_delete_agent', array($id_agent));
|
||||
|
||||
// tagente_datos_inc
|
||||
// Dont delete here, this records are deleted later, in database script
|
||||
|
@ -1536,9 +1536,9 @@ function delete_agent ($id_agents, $disableACL = false) {
|
|||
*
|
||||
* @return int The group id
|
||||
*/
|
||||
function get_agentmodule_group ($id_module) {
|
||||
function agents_get_agentmodule_group ($id_module) {
|
||||
$agent = (int) modules_get_agentmodule_agent ((int) $id_module);
|
||||
return (int) get_agent_group ($agent);
|
||||
return (int) agents_get_agent_group ($agent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1548,7 +1548,7 @@ function get_agentmodule_group ($id_module) {
|
|||
*
|
||||
* @return int The group id
|
||||
*/
|
||||
function get_agent_group ($id_agent) {
|
||||
function agents_get_agent_group ($id_agent) {
|
||||
return (int) db_get_value ('id_grupo', 'tagente', 'id_agente', (int) $id_agent);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query =
|
|||
$typeWhere = ' AND event_type IN (' . implode(',', $temp) . ')';
|
||||
}
|
||||
|
||||
$agents = get_group_agents($idGroup, false, "lower", false);
|
||||
$agents = agents_get_group_agents($idGroup, false, "lower", false);
|
||||
|
||||
$idAgents = array_keys($agents);
|
||||
|
||||
|
@ -290,7 +290,7 @@ function alerts_clone_alert_action ($id_alert_action) {
|
|||
* @return array The list of actions.
|
||||
*/
|
||||
function alerts_get_alert_actions ($only_names = true, $acl = false) {
|
||||
$groups = get_user_groups(false, "AR", true);
|
||||
$groups = users_get_groups(false, "AR", true);
|
||||
|
||||
if ($groups === false) {
|
||||
$groups = array();
|
||||
|
@ -1113,7 +1113,7 @@ function alerts_validate_alert_agent_module ($id_alert_agent_module) {
|
|||
foreach ($alerts as $id) {
|
||||
$alert = alerts_get_alert_agent_module ($id);
|
||||
$agent_id = modules_get_agentmodule_agent ($alert["id_agent_module"]);
|
||||
$group_id = get_agentmodule_group ($agent_id);
|
||||
$group_id = agents_get_agentmodule_group ($agent_id);
|
||||
|
||||
if (! check_acl ($config['id_user'], $group_id, "AW")) {
|
||||
continue;
|
||||
|
@ -1469,7 +1469,7 @@ function alerts_validate_alert_compound ($id_alert_compound) {
|
|||
$alert = alerts_get_alert_compound ($id);
|
||||
|
||||
$agent_id = $alert["id_agent"];
|
||||
$group_id = get_agent_group ($agent_id);
|
||||
$group_id = agents_get_agent_group ($agent_id);
|
||||
|
||||
if (! check_acl ($config['id_user'], $group_id, "AW")) {
|
||||
continue;
|
||||
|
@ -1530,11 +1530,11 @@ function alerts_get_agents_with_alert_template ($id_alert_template, $id_group, $
|
|||
if (empty ($id_agents)) {
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$filter['`tagente`.id_agente'] = array_keys (get_group_agents ($id_group, false, "none"));
|
||||
$filter['`tagente`.id_agente'] = array_keys (agents_get_group_agents ($id_group, false, "none"));
|
||||
break;
|
||||
case "postgresql":
|
||||
case "oracle":
|
||||
$filter['tagente.id_agente'] = array_keys (get_group_agents ($id_group, false, "none"));
|
||||
$filter['tagente.id_agente'] = array_keys (agents_get_group_agents ($id_group, false, "none"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1682,7 +1682,7 @@ function get_group_alerts ($id_group) {
|
|||
require_once ($config["homedir"].'/include/functions_agents.php');
|
||||
|
||||
$alerts = array ();
|
||||
$agents = get_group_agents ($id_group, false, "none");
|
||||
$agents = agents_get_group_agents ($id_group, false, "none");
|
||||
|
||||
foreach ($agents as $agent_id => $agent_name) {
|
||||
$agent_alerts = agents_get_alerts ($agent_id);
|
||||
|
|
|
@ -152,7 +152,7 @@ function isInACL($ip) {
|
|||
|
||||
function get_agent_module_name_last_value($agentName, $moduleName, $other = ';', $returnType)
|
||||
{
|
||||
$idAgent = get_agent_id($agentName);
|
||||
$idAgent = agents_get_agent_id($agentName);
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$sql = sprintf('SELECT id_agente_modulo
|
||||
|
@ -647,7 +647,7 @@ function set_new_agent($thrash1, $thrash2, $other, $thrash3) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (get_agent_id ($name)) {
|
||||
if (agents_get_agent_id ($name)) {
|
||||
returnError('agent_name_exist', 'The name of agent yet exist in DB.');
|
||||
}
|
||||
else if (($idParent != 0) &&
|
||||
|
@ -693,8 +693,8 @@ function set_new_agent($thrash1, $thrash2, $other, $thrash3) {
|
|||
*/
|
||||
function set_delete_agent($id, $thrash1, $thrast2, $thrash3) {
|
||||
$agentName = $id;
|
||||
$idAgent[0] = get_agent_id($agentName);
|
||||
if (!delete_agent ($idAgent, true))
|
||||
$idAgent[0] = agents_get_agent_id($agentName);
|
||||
if (!agents_delete_agent ($idAgent, true))
|
||||
returnError('error_delete', 'Error in delete operation.');
|
||||
else
|
||||
returnData('string', array('type' => 'string', 'data' => __('Correct Delete')));
|
||||
|
@ -718,7 +718,7 @@ function set_delete_agent($id, $thrash1, $thrast2, $thrash3) {
|
|||
*/
|
||||
function set_create_network_module($id, $thrash1, $other, $thrash3) {
|
||||
$agentName = $id;
|
||||
$idAgent = get_agent_id($agentName);
|
||||
$idAgent = agents_get_agent_id($agentName);
|
||||
|
||||
$name = $other['data'][0];
|
||||
|
||||
|
@ -827,7 +827,7 @@ function otherParameter2Filter($other) {
|
|||
|
||||
$idAgent = null;
|
||||
if ($other['data'][2] != '') {
|
||||
$idAgent = get_agent_id($other['data'][2]);
|
||||
$idAgent = agents_get_agent_id($other['data'][2]);
|
||||
$filter['id_agente'] = $idAgent;
|
||||
}
|
||||
|
||||
|
@ -888,7 +888,7 @@ function set_new_alert_template($id, $id2, $other, $trash1) {
|
|||
return;
|
||||
}
|
||||
else if ($other['type'] == 'array') {
|
||||
$idAgent = get_agent_id($id);
|
||||
$idAgent = agents_get_agent_id($id);
|
||||
|
||||
$row = db_get_row_filter('talert_templates', array('name' => $id2));
|
||||
|
||||
|
@ -932,7 +932,7 @@ function set_delete_module($id, $id2, $other, $trash1) {
|
|||
$simulate = true;
|
||||
}
|
||||
|
||||
$idAgent = get_agent_id($id);
|
||||
$idAgent = agents_get_agent_id($id);
|
||||
|
||||
$idAgentModule = db_get_value_filter('id_agente_modulo', 'tagente_modulo', array('id_agente' => $idAgent, 'nombre' => $id2));
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ function set_new_module($id, $id2, $other, $trash1) {
|
|||
}
|
||||
else if ($other['type'] == 'array') {
|
||||
$values = array();
|
||||
$values['id_agente'] = get_agent_id($id);
|
||||
$values['id_agente'] = agents_get_agent_id($id);
|
||||
$values['nombre'] = $id2;
|
||||
|
||||
$values['id_tipo_modulo'] = db_get_value_filter('id_tipo', 'ttipo_modulo', array('nombre' => $other['data'][0]));
|
||||
|
@ -1112,7 +1112,7 @@ function set_alert_actions($id, $id2, $other, $trash1) {
|
|||
return;
|
||||
}
|
||||
else if ($other['type'] == 'array') {
|
||||
$idAgent = get_agent_id($id);
|
||||
$idAgent = agents_get_agent_id($id);
|
||||
|
||||
$row = db_get_row_filter('talert_templates', array('name' => $id2));
|
||||
if ($row === false) {
|
||||
|
@ -1219,7 +1219,7 @@ function set_new_event($trash1, $trash2, $other, $trash3) {
|
|||
return;
|
||||
}
|
||||
else {
|
||||
$values['id_agente'] = get_agent_id($other['data'][3]);
|
||||
$values['id_agente'] = agents_get_agent_id($other['data'][3]);
|
||||
}
|
||||
|
||||
if (($other['data'][4] == null) && ($other['data'][4] == '')) {
|
||||
|
@ -1470,7 +1470,7 @@ function set_add_user_profile($id, $thrash1, $other, $thrash2) {
|
|||
$group = $other['data'][0];
|
||||
$profile = $other['data'][1];
|
||||
|
||||
if (!create_user_profile ($id, $profile, $group,'API'))
|
||||
if (!profile_create_user_profile ($id, $profile, $group,'API'))
|
||||
returnError('error_add_user_profile', 'Error add user profile.');
|
||||
else
|
||||
returnData('string', array('type' => 'string', 'data' => __('Add user profile.')));
|
||||
|
|
|
@ -245,14 +245,14 @@ function config_update_config () {
|
|||
|
||||
$enterprise = enterprise_include_once('include/functions_policies.php');
|
||||
if ($enterprise !== ENTERPRISE_NOT_HOOK) {
|
||||
$locked = enterprise_hook('semaphore_policy_test_and_set');
|
||||
$locked = enterprise_hook('policies_semaphore_test_and_set');
|
||||
if ($locked) {
|
||||
db_pandora_audit("Policy management", "BLOCK policies for change tconfig['can_block_policies'] by " . $config['id_user']);
|
||||
|
||||
config_update_value ('can_block_policies', get_parameter('can_block_policies', $config['can_block_policies']));
|
||||
|
||||
db_pandora_audit("Policy management", "UNBLOCK policies for change tconfig['can_block_policies'] by " . $config['id_user']);
|
||||
enterprise_hook('semaphore_policy_unlock');
|
||||
enterprise_hook('policies_semaphore_unlock');
|
||||
}
|
||||
else {
|
||||
db_pandora_audit("Policy management", "Try to BLOCK policies for change tconfig['can_block_policies'] by " . $config['id_user']);
|
||||
|
@ -644,9 +644,9 @@ function config_process_config () {
|
|||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
if(isset($config['id_user']))
|
||||
$relative_path = enterprise_hook('set_image_skin_path',array($config['id_user']));
|
||||
$relative_path = enterprise_hook('skins_set_image_skin_path',array($config['id_user']));
|
||||
else
|
||||
$relative_path = enterprise_hook('set_image_skin_path',array($_POST['nick']));
|
||||
$relative_path = enterprise_hook('skins_set_image_skin_path',array($_POST['nick']));
|
||||
$config['relative_path'] = $relative_path;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ function custom_graphs_get_user ($id_user = 0, $only_names = false, $returnAllGr
|
|||
$id_user = $config['id_user'];
|
||||
}
|
||||
|
||||
$groups = get_user_groups ($id_user, $privileges, $returnAllGroup);
|
||||
$groups = users_get_groups ($id_user, $privileges, $returnAllGroup);
|
||||
|
||||
$all_graphs = db_get_all_rows_in_table ('tgraph', 'name');
|
||||
if ($all_graphs === false)
|
||||
|
|
|
@ -137,7 +137,7 @@ function db_pandora_audit($accion, $descripcion, $user_id = false, $ip = false,
|
|||
$id_audit = db_process_sql_insert('tsesion', $values);
|
||||
|
||||
enterprise_include_once('include/functions_audit.php');
|
||||
enterprise_hook('pandora_audit_enterprise', array($id_audit, $info));
|
||||
enterprise_hook('audit_pandora_enterprise', array($id_audit, $info));
|
||||
|
||||
return $id_audit;
|
||||
}
|
||||
|
|
|
@ -472,7 +472,7 @@ function gis_get_agent_icon_map($idAgent, $state = false, $status = null) {
|
|||
}
|
||||
else {
|
||||
if ($status === null) {
|
||||
$status = get_agent_status($idAgent);
|
||||
$status = agents_get_status($idAgent);
|
||||
if ($status === null) {
|
||||
$status = -1;
|
||||
}
|
||||
|
@ -730,7 +730,7 @@ function gis_save_map($map_name, $map_initial_longitude, $map_initial_latitude,
|
|||
db_process_sql_insert('tgis_map_layer_has_tagente',
|
||||
array(
|
||||
'tgis_map_layer_id_tmap_layer' => $idLayer,
|
||||
'tagente_id_agente' => get_agent_id($agent_name)
|
||||
'tagente_id_agente' => agents_get_agent_id($agent_name)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -795,7 +795,7 @@ function gis_update_map($idMap, $map_name, $map_initial_longitude, $map_initial_
|
|||
db_process_sql_insert('tgis_map_layer_has_tagente',
|
||||
array(
|
||||
'tgis_map_layer_id_tmap_layer' => $idLayer,
|
||||
'tagente_id_agente' => get_agent_id($agent_name)
|
||||
'tagente_id_agente' => agents_get_agent_id($agent_name)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -855,7 +855,7 @@ function gis_get_agent_map($agent_id, $heigth, $width, $show_history = false, $c
|
|||
$agentPositionAltitude = $agent_position['stored_altitude'];
|
||||
}
|
||||
|
||||
$agent_name = get_agent_name($agent_id);
|
||||
$agent_name = agents_get_name($agent_id);
|
||||
|
||||
$baselayers[0]['name'] = $defaultMap['conection_name'];
|
||||
$baselayers[0]['num_zoom_levels'] = $defaultMap['num_zoom_levels'];
|
||||
|
@ -900,7 +900,7 @@ function gis_get_agent_map($agent_id, $heigth, $width, $show_history = false, $c
|
|||
gis_make_layer("layer_for_agent_".$agent_name);
|
||||
|
||||
$agent_icon = gis_get_agent_icon_map($agent_id, true);
|
||||
$status = get_agent_status($agent_id);
|
||||
$status = agents_get_status($agent_id);
|
||||
|
||||
/* If show_history is true, show the path of the agent */
|
||||
if ($show_history) {
|
||||
|
|
|
@ -41,7 +41,7 @@ function grafico_modulo_sparse2 ($agent_module_id, $period, $show_events,
|
|||
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
||||
$interval = (int) ($period / $resolution);
|
||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||
$agent_id = get_agent_id ($agent_name);
|
||||
$agent_id = agents_get_agent_id ($agent_name);
|
||||
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
$module_type = modules_get_moduletype_name ($id_module_type);
|
||||
|
@ -130,7 +130,7 @@ function grafico_modulo_sparse2 ($agent_module_id, $period, $show_events,
|
|||
// Get baseline data
|
||||
$baseline_data = array ();
|
||||
if ($baseline == 1) {
|
||||
$baseline_data = enterprise_hook ('enterprise_get_baseline', array ($agent_module_id, $period, $width, $height , $title, $unit_name, $date));
|
||||
$baseline_data = enterprise_hook ('reporting_enterprise_get_baseline', array ($agent_module_id, $period, $width, $height , $title, $unit_name, $date));
|
||||
if ($baseline_data === ENTERPRISE_NOT_HOOK) {
|
||||
$baseline_data = array ();
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ function graphic_combined_module2 ($module_list, $weight_list, $period, $width,
|
|||
|
||||
$agent_module_id = $module_list[$i];
|
||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||
$agent_id = get_agent_id ($agent_name);
|
||||
$agent_id = agents_get_agent_id ($agent_name);
|
||||
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
||||
$module_name_list[$i] = $agent_name." / ".substr ($module_name, 0, 40);
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
|
@ -803,7 +803,7 @@ function grafico_db_agentes_purge2 ($id_agent, $width, $height) {
|
|||
$id_agent = -1;
|
||||
$query = "";
|
||||
} else {
|
||||
$modules = get_agent_modules ($id_agent);
|
||||
$modules = agents_get_modules ($id_agent);
|
||||
$query = sprintf (" AND id_agente_modulo IN (%s)", implode (",", array_keys ($modules)));
|
||||
}
|
||||
|
||||
|
@ -863,8 +863,8 @@ function grafico_db_agentes_paquetes2($width = 380, $height = 300) {
|
|||
$data = array ();
|
||||
$legend = array ();
|
||||
|
||||
$agents = get_group_agents (array_keys (get_user_groups ()), false, "none");
|
||||
$count = get_agent_modules_data_count (array_keys ($agents));
|
||||
$agents = agents_get_group_agents (array_keys (users_get_groups ()), false, "none");
|
||||
$count = agents_get_modules_data_count (array_keys ($agents));
|
||||
unset ($count["total"]);
|
||||
arsort ($count, SORT_NUMERIC);
|
||||
$count = array_slice ($count, 0, 8, true);
|
||||
|
@ -913,7 +913,7 @@ function graph_db_agentes_modulos2($width, $height) {
|
|||
$modules = array ();
|
||||
|
||||
foreach ($modules as $module) {
|
||||
$agent_name = get_agent_name ($module['id_agente'], "none");
|
||||
$agent_name = agents_get_name ($module['id_agente'], "none");
|
||||
switch ($config['dbtype']){
|
||||
case "mysql":
|
||||
case "postgresql":
|
||||
|
@ -1209,7 +1209,7 @@ function grafico_eventos_grupo2 ($width = 300, $height = 200, $url = "") {
|
|||
if ($row["id_agente"] == 0) {
|
||||
$name = __('SYSTEM')." (".$row["count"].")";
|
||||
} else {
|
||||
$name = mb_substr (get_agent_name ($row["id_agente"], "lower"), 0, 14)." (".$row["count"].")";
|
||||
$name = mb_substr (agents_get_name ($row["id_agente"], "lower"), 0, 14)." (".$row["count"].")";
|
||||
}
|
||||
$data[$name] = $row["count"];
|
||||
}
|
||||
|
@ -1479,7 +1479,7 @@ function grafico_modulo_boolean2 ($agent_module_id, $period, $show_events,
|
|||
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
||||
$interval = (int) ($period / $resolution);
|
||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||
$agent_id = get_agent_id ($agent_name);
|
||||
$agent_id = agents_get_agent_id ($agent_name);
|
||||
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
$module_type = modules_get_moduletype_name ($id_module_type);
|
||||
|
@ -1793,7 +1793,7 @@ function grafico_modulo_string2 ($agent_module_id, $period, $show_events,
|
|||
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
||||
$interval = (int) ($period / $resolution);
|
||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||
$agent_id = get_agent_id ($agent_name);
|
||||
$agent_id = agents_get_agent_id ($agent_name);
|
||||
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
$module_type = modules_get_moduletype_name ($id_module_type);
|
||||
|
@ -2013,7 +2013,7 @@ function grafico_modulo_log4x_2 ($id_agente_modulo, $periodo, $show_event,
|
|||
|
||||
$nombre_agente = modules_get_agentmodule_agent_name ($id_agente_modulo);
|
||||
$nombre_modulo = modules_get_agentmodule_name ($id_agente_modulo);
|
||||
$id_agente = get_agent_id ($nombre_agente);
|
||||
$id_agente = agents_get_agent_id ($nombre_agente);
|
||||
|
||||
|
||||
$one_second = 1;
|
||||
|
|
|
@ -215,7 +215,7 @@ function groups_check_used($idGroup) {
|
|||
|
||||
$hookEnterprise = enterprise_include_once('include/functions_groups.php');
|
||||
if ($hookEnterprise !== ENTERPRISE_NOT_HOOK) {
|
||||
$returnEnterprise = enterprise_hook('checkUsedGroupEnterprise', array($idGroup));
|
||||
$returnEnterprise = enterprise_hook('groups_check_used_group_enterprise', array($idGroup));
|
||||
|
||||
if ($returnEnterprise['return']) {
|
||||
$return['return'] = true;
|
||||
|
@ -302,7 +302,7 @@ function groups_safe_acl ($id_user, $id_groups, $access) {
|
|||
if (!is_array ($id_groups) && check_acl ($id_user, $id_groups, $access)) {
|
||||
/* Return all the user groups if it's the group All */
|
||||
if ($id_groups == 0)
|
||||
return array_keys (get_user_groups ($id_user, $access));
|
||||
return array_keys (users_get_groups ($id_user, $access));
|
||||
return array ($id_groups);
|
||||
}
|
||||
elseif (!is_array ($id_groups)) {
|
||||
|
@ -490,11 +490,11 @@ function groups_get_groups_tree_recursive($groups, $parent = 0, $deep = 0) {
|
|||
* @return int Status of the agents.
|
||||
*/
|
||||
function groups_get_status ($id_group = 0) {
|
||||
$agents = get_group_agents($id_group);
|
||||
$agents = agents_get_group_agents($id_group);
|
||||
|
||||
$agents_status = array();
|
||||
foreach($agents as $key => $agent){
|
||||
$agents_status[] = get_agent_status($key);
|
||||
$agents_status[] = agents_get_status($key);
|
||||
}
|
||||
|
||||
$childrens = groups_get_childrens($id_group);
|
||||
|
|
|
@ -183,7 +183,7 @@ function html_print_select_groups($id_user = false, $privilege = "AR", $returnAl
|
|||
$multiple = false, $sort = true, $class = '', $disabled = false, $style = false, $option_style = false, $id_group = false) {
|
||||
global $config;
|
||||
|
||||
$user_groups = get_user_groups ($id_user, $privilege, $returnAllGroup, true);
|
||||
$user_groups = users_get_groups ($id_user, $privilege, $returnAllGroup, true);
|
||||
|
||||
if ($id_group !== false) {
|
||||
$childrens = groups_get_childrens($id_group);
|
||||
|
@ -576,7 +576,7 @@ function html_print_input_image ($name, $src, $value, $style = '', $return = fal
|
|||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
$skin_path = enterprise_hook('get_image_skin_path',array($src));
|
||||
$skin_path = enterprise_hook('skins_get_image_path',array($src));
|
||||
if ($skin_path)
|
||||
$src = $skin_path;
|
||||
}
|
||||
|
@ -1125,7 +1125,7 @@ function html_print_image ($src, $return = false, $options = false, $return_src
|
|||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
$skin_path = enterprise_hook('get_image_skin_path',array($src));
|
||||
$skin_path = enterprise_hook('skins_get_image_path',array($src));
|
||||
if ($skin_path)
|
||||
$src = $skin_path;
|
||||
}
|
||||
|
@ -1328,7 +1328,7 @@ function html_print_autocomplete_modules($name = 'module', $default = '', $id_ag
|
|||
if ($id_agents === false) {
|
||||
$groups = array();
|
||||
if ($ACL) {
|
||||
$groups = get_user_groups($config['id_user'], "AW", false);
|
||||
$groups = users_get_groups($config['id_user'], "AW", false);
|
||||
$groups = array_keys($groups);
|
||||
|
||||
$agents = db_get_all_rows_sql('SELECT id_agente FROM tagente WHERE id_grupo IN (' . implode(',', $groups) . ')');
|
||||
|
@ -1346,7 +1346,7 @@ function html_print_autocomplete_modules($name = 'module', $default = '', $id_ag
|
|||
}
|
||||
else {
|
||||
if ($ACL) {
|
||||
$groups = get_user_groups($config['id_user'], "AW", false);
|
||||
$groups = users_get_groups($config['id_user'], "AW", false);
|
||||
$groups = array_keys($groups);
|
||||
|
||||
$agents = db_get_all_rows_sql('SELECT id_agente FROM tagente WHERE id_grupo IN (' . implode(',', $groups) . ')');
|
||||
|
|
|
@ -85,7 +85,7 @@ function menu_print_menu (&$menu) {
|
|||
foreach ($main["sub"] as $subsec2 => $sub) {
|
||||
|
||||
// Choose valid suboptions (sec2)
|
||||
if (enterprise_hook ('acl_enterprise', array ($config['id_user'], $mainsec, $subsec2)) == false){
|
||||
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $subsec2)) == false){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ function menu_print_menu (&$menu) {
|
|||
|
||||
// Choose valid section (sec)
|
||||
|
||||
if (enterprise_hook ('acl_enterprise', array ($config['id_user'], $mainsec, $main["sec2"])) == false){
|
||||
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $main["sec2"])) == false){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ require_once ($config['homedir'].'/include/functions_groups.php');
|
|||
* @return bool true when delivered, false in case of error
|
||||
*/
|
||||
function messages_create_message ($usuario_origen, $usuario_destino, $subject, $mensaje) {
|
||||
$users = get_users_info ();
|
||||
$users = users_get_info ();
|
||||
|
||||
if (!array_key_exists ($usuario_origen, $users) || !array_key_exists ($usuario_destino, $users)) {
|
||||
return false; //Users don't exist so don't send to them
|
||||
|
@ -68,7 +68,7 @@ function messages_create_message ($usuario_origen, $usuario_destino, $subject, $
|
|||
* @return bool true when delivered, false in case of error
|
||||
*/
|
||||
function messages_create_group ($usuario_origen, $dest_group, $subject, $mensaje) {
|
||||
$users = get_users_info ();
|
||||
$users = users_get_info ();
|
||||
$group_users = groups_get_users ($dest_group);
|
||||
|
||||
if (! array_key_exists ($usuario_origen, $users)) {
|
||||
|
|
|
@ -44,13 +44,13 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
|
|||
if($forced_name !== false)
|
||||
$module['nombre'] = $forced_name;
|
||||
|
||||
$modules = get_agent_modules ($id_destiny_agent, false,
|
||||
$modules = agents_get_modules ($id_destiny_agent, false,
|
||||
array ('nombre' => $module['nombre'], 'disabled' => false));
|
||||
|
||||
if (! empty ($modules))
|
||||
return array_pop (array_keys ($modules));
|
||||
|
||||
$modulesDisabled = get_agent_modules ($id_destiny_agent, false,
|
||||
$modulesDisabled = agents_get_modules ($id_destiny_agent, false,
|
||||
array ('nombre' => $module['nombre'], 'disabled' => true));
|
||||
|
||||
if (!empty($modulesDisabled)) {
|
||||
|
@ -78,7 +78,7 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
|
|||
|
||||
/* Rewrite different values */
|
||||
$new_module['id_agente'] = $id_destiny_agent;
|
||||
$new_module['ip_target'] = get_agent_address ($id_destiny_agent);
|
||||
$new_module['ip_target'] = agents_get_address ($id_destiny_agent);
|
||||
|
||||
/* Unset numeric indexes or SQL would fail */
|
||||
$len = count ($new_module) / 2;
|
||||
|
@ -95,7 +95,7 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
|
|||
|
||||
/* Rewrite different values */
|
||||
$new_module['id_agente'] = $id_destiny_agent;
|
||||
$new_module['ip_target'] = get_agent_address ($id_destiny_agent);
|
||||
$new_module['ip_target'] = agents_get_address ($id_destiny_agent);
|
||||
|
||||
/* Unset numeric indexes or SQL would fail */
|
||||
$len = count ($new_module) / 2;
|
||||
|
@ -151,7 +151,7 @@ function modules_delete_agent_module ($id_agent_module) {
|
|||
|
||||
$where = array ('id_agent_module' => $id_agent_module);
|
||||
|
||||
enterprise_hook('deleteLocalModuleInConf', array(modules_get_agentmodule_agent($id_agent_module), modules_get_agentmodule_name($id_agent_module)));
|
||||
enterprise_hook('config_agents_delete_module_in_conf', array(modules_get_agentmodule_agent($id_agent_module), modules_get_agentmodule_name($id_agent_module)));
|
||||
|
||||
db_process_sql_delete ('talert_template_modules', $where);
|
||||
db_process_sql_delete ('tgraph_source', $where);
|
||||
|
@ -208,7 +208,7 @@ function modules_create_agent_module ($id_agent, $name, $values = false, $disabl
|
|||
global $config;
|
||||
|
||||
if (!$disableACL) {
|
||||
if (empty ($id_agent) || ! user_access_to_agent ($id_agent, 'AW'))
|
||||
if (empty ($id_agent) || ! users_access_to_agent ($id_agent, 'AW'))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -291,7 +291,7 @@ function modules_get_agents_with_module_name ($module_name, $id_group, $filter =
|
|||
$filter = array ();
|
||||
$filter[] = 'tagente_modulo.id_agente = tagente.id_agente';
|
||||
$filter['tagente_modulo.nombre'] = $module_name;
|
||||
$filter['tagente.id_agente'] = array_keys (get_group_agents ($id_group, false, "none"));
|
||||
$filter['tagente.id_agente'] = array_keys (agents_get_group_agents ($id_group, false, "none"));
|
||||
|
||||
return db_get_all_rows_filter ('tagente, tagente_modulo',
|
||||
$filter, $fields);
|
||||
|
@ -518,7 +518,7 @@ function modules_get_agentmodule_agent ($id_agentmodule) {
|
|||
*/
|
||||
function modules_get_agentmodule_agent_name ($id_agentmodule) {
|
||||
// Since this is a helper function we don't need to do casting
|
||||
return (string) get_agent_name (modules_get_agentmodule_agent ($id_agentmodule));
|
||||
return (string) agents_get_name (modules_get_agentmodule_agent ($id_agentmodule));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -650,7 +650,7 @@ function modules_get_monitors_in_group ($id_group) {
|
|||
if ($id_group <= 0) {
|
||||
//We select all groups the user has access to if it's 0 or -1
|
||||
global $config;
|
||||
$id_group = array_keys (get_user_groups ($config['id_user']));
|
||||
$id_group = array_keys (users_get_groups ($config['id_user']));
|
||||
}
|
||||
|
||||
if (is_array ($id_group)) {
|
||||
|
@ -810,7 +810,7 @@ function modules_get_interval ($id_agent_module) {
|
|||
return $interval;
|
||||
|
||||
$id_agent = modules_give_agent_id_from_module_id ($id_agent_module);
|
||||
return (int) get_agent_interval ($id_agent);
|
||||
return (int) agents_get_interval ($id_agent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -289,7 +289,7 @@ function network_components_delete_network_component ($id_network_component) {
|
|||
* @return array New agent module id if created. False if could not be created
|
||||
*/
|
||||
function network_components_create_module_from_network_component ($id_network_component, $id_agent) {
|
||||
if (! user_access_to_agent ($id_agent, 'AW'))
|
||||
if (! users_access_to_agent ($id_agent, 'AW'))
|
||||
return false;
|
||||
$component = network_components_get_network_component ($id_network_component,
|
||||
false,
|
||||
|
@ -324,7 +324,7 @@ function network_components_create_module_from_network_component ($id_network_co
|
|||
unset ($values[$i]);
|
||||
$name = $values['name'];
|
||||
unset ($values['name']);
|
||||
$values['ip_target'] = get_agent_address ($id_agent);
|
||||
$values['ip_target'] = agents_get_address ($id_agent);
|
||||
|
||||
return modules_create_agent_module ($id_agent, $name, $values);
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
|||
}
|
||||
|
||||
// Get agent modules data
|
||||
$modules = get_agent_modules ($agent['id_agente'], false, array('disabled' => 0), true, false);
|
||||
$modules = agents_get_modules ($agent['id_agente'], false, array('disabled' => 0), true, false);
|
||||
// Parse modules
|
||||
foreach ($modules as $key => $module) {
|
||||
$node_count ++;
|
||||
|
@ -220,7 +220,7 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
|||
|
||||
if($hidepolicymodules && $config['enterprise_installed']){
|
||||
enterprise_include_once('include/functions_policies.php');
|
||||
if(isModuleInPolicy($key)) {
|
||||
if(policies_is_module_in_policy($key)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ function networkmap_create_group_node ($group, $simple = 0, $font_size = 10) {
|
|||
|
||||
// Returns a node definition
|
||||
function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10) {
|
||||
$status = get_agent_status($agent['id_agente']);
|
||||
$status = agents_get_status($agent['id_agente']);
|
||||
|
||||
// Set node status
|
||||
switch($status) {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
*
|
||||
* @return string Profile name of the given id
|
||||
*/
|
||||
function get_profile_name ($id_profile) {
|
||||
function profile_get_name ($id_profile) {
|
||||
return (string) db_get_value ('name', 'tperfil', 'id_perfil', (int) $id_profile);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ function get_profile_name ($id_profile) {
|
|||
*
|
||||
* @return array List of all profiles
|
||||
*/
|
||||
function get_profiles ($filter = false) {
|
||||
function profile_get_profiles ($filter = false) {
|
||||
if ($filter === false) {
|
||||
$profiles = db_get_all_rows_in_table ("tperfil", "name");
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ function get_profiles ($filter = false) {
|
|||
*
|
||||
* @return mixed Number id if succesful, false if not
|
||||
*/
|
||||
function create_user_profile ($id_user, $id_profile = 1, $id_group = 0, $assignUser = false) {
|
||||
function profile_create_user_profile ($id_user, $id_profile = 1, $id_group = 0, $assignUser = false) {
|
||||
global $config;
|
||||
|
||||
if (empty ($id_profile) || $id_group < 0)
|
||||
|
@ -100,7 +100,7 @@ function create_user_profile ($id_user, $id_profile = 1, $id_group = 0, $assignU
|
|||
*
|
||||
* @return bool Whether or not it's deleted
|
||||
*/
|
||||
function delete_user_profile ($id_user, $id_profile) {
|
||||
function profile_delete_user_profile ($id_user, $id_profile) {
|
||||
$where = array(
|
||||
'id_usuario' => $id_user,
|
||||
'id_up' => $id_profile);
|
||||
|
@ -114,7 +114,7 @@ function delete_user_profile ($id_user, $id_profile) {
|
|||
*
|
||||
* @return bool Whether or not it's deleted
|
||||
*/
|
||||
function delete_profile ($id_profile) {
|
||||
function profile_delete_profile ($id_profile) {
|
||||
return (bool)db_process_sql_delete('tperfil', array('id_perfil' => $id_profile));
|
||||
}
|
||||
|
||||
|
|
|
@ -745,7 +745,7 @@ function reporting_get_group_stats ($id_group = 0) {
|
|||
}
|
||||
|
||||
if ($id_group == 0) {
|
||||
$id_group = array_keys (get_user_groups ());
|
||||
$id_group = array_keys (users_get_groups ());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
@ -1105,7 +1105,7 @@ function reporting_get_fired_alerts_table ($alerts_fired) {
|
|||
$alert_module = $tuple[0];
|
||||
$template = $tuple[1];
|
||||
if (! isset ($data[0]))
|
||||
$data[0] = get_agent_name ($id_agent);
|
||||
$data[0] = agents_get_name ($id_agent);
|
||||
else
|
||||
$data[0] = '';
|
||||
$data[1] = $template['name'];
|
||||
|
@ -1440,7 +1440,7 @@ function reporting_get_monitors_down_table ($monitors_down) {
|
|||
$data = array ();
|
||||
foreach ($monitors as $monitor) {
|
||||
if (! isset ($data[0]))
|
||||
$data[0] = get_agent_name ($id_agent);
|
||||
$data[0] = agents_get_name ($id_agent);
|
||||
else
|
||||
$data[0] = '';
|
||||
if ($monitor['descripcion'] != '') {
|
||||
|
@ -1466,7 +1466,7 @@ function reporting_get_monitors_down_table ($monitors_down) {
|
|||
* @return HTML string with group report
|
||||
*/
|
||||
function reporting_print_group_reporting ($id_group, $return = false) {
|
||||
$agents = get_group_agents ($id_group, false, "none");
|
||||
$agents = agents_get_group_agents ($id_group, false, "none");
|
||||
$output = '<strong>'.__('Agents in group').': '.count ($agents).'</strong><br />';
|
||||
|
||||
if ($return === false)
|
||||
|
@ -1594,7 +1594,7 @@ function reporting_get_agent_monitors_table ($id_agent, $period = 0, $date = 0)
|
|||
function reporting_get_agent_modules_table ($id_agent, $period = 0, $date = 0) {
|
||||
$table->data = array ();
|
||||
$n_a_string = __('N/A').'(*)';
|
||||
$modules = get_agent_modules ($id_agent, array ("nombre", "descripcion"));
|
||||
$modules = agents_get_modules ($id_agent, array ("nombre", "descripcion"));
|
||||
if ($modules === false)
|
||||
$modules = array();
|
||||
$data = array ();
|
||||
|
@ -1626,7 +1626,7 @@ function reporting_get_agent_detailed ($id_agent, $period = 0, $date = 0, $retur
|
|||
|
||||
/* Show modules in agent */
|
||||
$output .= '<div class="agent_reporting">';
|
||||
$output .= '<h3 style="text-decoration: underline">'.__('Agent').' - '.get_agent_name ($id_agent).'</h3>';
|
||||
$output .= '<h3 style="text-decoration: underline">'.__('Agent').' - '.agents_get_name ($id_agent).'</h3>';
|
||||
$output .= '<h4>'.__('Modules').'</h3>';
|
||||
$table_modules = reporting_get_agent_modules_table ($id_agent, $period, $date);
|
||||
$table_modules->width = '99%';
|
||||
|
@ -1673,8 +1673,8 @@ function reporting_get_agent_detailed ($id_agent, $period = 0, $date = 0, $retur
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
function reporting_get_group_agents_detailed ($id_group, $period = 0, $date = 0, $return = false) {
|
||||
$agents = get_group_agents ($id_group, false, "none");
|
||||
function reporting_agents_get_group_agents_detailed ($id_group, $period = 0, $date = 0, $return = false) {
|
||||
$agents = agents_get_group_agents ($id_group, false, "none");
|
||||
|
||||
$output = '';
|
||||
foreach ($agents as $agent_id => $agent_name) {
|
||||
|
@ -1900,7 +1900,7 @@ function reporting_get_agent_module_info ($id_agent, $filter = false) {
|
|||
$return["alert_status"] = "notfired";
|
||||
$return["alert_value"] = STATUS_ALERT_NOT_FIRED;
|
||||
$return["alert_img"] = ui_print_status_image (STATUS_ALERT_NOT_FIRED, __('Alert not fired'), true);
|
||||
$return["agent_group"] = get_agent_group ($id_agent);
|
||||
$return["agent_group"] = agents_get_agent_group ($id_agent);
|
||||
|
||||
if (!check_acl ($config["id_user"], $return["agent_group"], "AR")) {
|
||||
return $return;
|
||||
|
@ -1912,7 +1912,7 @@ function reporting_get_agent_module_info ($id_agent, $filter = false) {
|
|||
|
||||
$filter = 'disabled = 0';
|
||||
|
||||
$modules = get_agent_modules($id_agent, false, $filter, true, false);
|
||||
$modules = agents_get_modules($id_agent, false, $filter, true, false);
|
||||
|
||||
if ($modules === false) {
|
||||
return $return;
|
||||
|
@ -2019,7 +2019,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$agent_name = modules_get_agentmodule_agent_name ($content['id_agent_module']);
|
||||
}
|
||||
else {
|
||||
$agent_name = get_agent_name($content['id_agent']);
|
||||
$agent_name = agents_get_name($content['id_agent']);
|
||||
}
|
||||
|
||||
switch ($content["type"]) {
|
||||
|
@ -2437,7 +2437,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
//RUNNING
|
||||
$data = array ();
|
||||
$data[0] = $sizh.__('Agent detailed event').$sizhfin;
|
||||
$data[1] = $sizh . ui_print_truncate_text(get_agent_name($content['id_agent']), 75, false).$sizhfin;
|
||||
$data[1] = $sizh . ui_print_truncate_text(agents_get_name($content['id_agent']), 75, false).$sizhfin;
|
||||
array_push ($table->data, $data);
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
|
@ -3505,7 +3505,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
$agents = '';
|
||||
if($id_group > 0) {
|
||||
$agents = get_group_agents($id_group);
|
||||
$agents = agents_get_group_agents($id_group);
|
||||
$agents = array_keys($agents);
|
||||
}
|
||||
|
||||
|
@ -3514,7 +3514,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$filter_module_groups['id_module_group'] = $id_module_group;
|
||||
}
|
||||
|
||||
$all_modules = get_agent_modules ($agents, false, $filter_module_groups, true, false);
|
||||
$all_modules = agents_get_modules ($agents, false, $filter_module_groups, true, false);
|
||||
|
||||
$modules_by_name = array();
|
||||
$name = '';
|
||||
|
@ -3583,7 +3583,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
foreach ($agents as $agent) {
|
||||
// Get stats for this group
|
||||
$agent_status = get_agent_status($agent['id_agente']);
|
||||
$agent_status = agents_get_status($agent['id_agente']);
|
||||
|
||||
switch($agent_status) {
|
||||
case 4: // Alert fired status
|
||||
|
@ -3614,7 +3614,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
$file_name = string2image(ui_print_truncate_text($agent['nombre'],19, false, true, false, '...'), 140, 15, 3, 0, $rowcolor, $textcolor, 4, 0);
|
||||
$table_data .= "<td style='background-color: ".$rowcolor.";'>".html_print_image($file_name, true, array('title' => $agent['nombre']))."</td>";
|
||||
$agent_modules = get_agent_modules($agent['id_agente']);
|
||||
$agent_modules = agents_get_modules($agent['id_agente']);
|
||||
|
||||
$nmodules = 0;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ function reports_get_reports ($filter = false, $fields = false, $returnAllGroup
|
|||
$fields[] = 'id_user';
|
||||
}
|
||||
|
||||
$groups = get_user_groups ($config['id_user'], $privileges, $returnAllGroup);
|
||||
$groups = users_get_groups ($config['id_user'], $privileges, $returnAllGroup);
|
||||
|
||||
$reports = array ();
|
||||
$all_reports = @db_get_all_rows_filter ('treport', $filter, $fields);
|
||||
|
|
|
@ -393,7 +393,7 @@ function ui_print_os_icon ($id_os, $name = true, $return = false) {
|
|||
* @return string HTML with agent name and link
|
||||
*/
|
||||
function ui_print_agent_name ($id_agent, $return = false, $cutoff = 0, $style = '', $cutname = false) {
|
||||
$agent_name = (string) get_agent_name ($id_agent);
|
||||
$agent_name = (string) agents_get_name ($id_agent);
|
||||
$agent_name_full = $agent_name;
|
||||
if ($cutname) {
|
||||
$agent_name = ui_print_truncate_text($agent_name, $cutoff);
|
||||
|
@ -481,7 +481,7 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
|
|||
$data = array ();
|
||||
|
||||
if (($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) && (!$compound)) {
|
||||
$policyInfo = isAlertInPolicy2($alert['id'], false);
|
||||
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
||||
if ($policyInfo === false)
|
||||
$data[$index['policy']] = '';
|
||||
else {
|
||||
|
@ -873,9 +873,9 @@ function ui_process_page_head ($string, $bitfield) {
|
|||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
//Checks if user's skin is available
|
||||
$exists_skin = enterprise_hook('is_skin_path_set');
|
||||
$exists_skin = enterprise_hook('skins_is_path_set');
|
||||
if ($exists_skin){
|
||||
$skin_path = enterprise_hook('get_skin_path');
|
||||
$skin_path = enterprise_hook('skins_get_skin_path');
|
||||
$skin_styles = themes_get_css ($skin_path . 'include/styles/');
|
||||
$exists_css = !empty($skin_styles);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ require_once($config['homedir'] . "/include/functions_groups.php");
|
|||
*
|
||||
* @return array An array of users
|
||||
*/
|
||||
function get_users_info ($order = "fullname", $info = "fullname") {
|
||||
function users_get_info ($order = "fullname", $info = "fullname") {
|
||||
$users = get_users ($order);
|
||||
$ret = array ();
|
||||
foreach ($users as $user_id => $user_info) {
|
||||
|
@ -46,7 +46,7 @@ function get_users_info ($order = "fullname", $info = "fullname") {
|
|||
*
|
||||
* @return array A list of the groups the user has certain privileges.
|
||||
*/
|
||||
function get_all_model_groups () {
|
||||
function users_get_all_model_groups () {
|
||||
$groups = db_get_all_rows_in_table ('tmodule_group');
|
||||
|
||||
$returnGroups = array();
|
||||
|
@ -70,7 +70,7 @@ function get_all_model_groups () {
|
|||
*
|
||||
* @return array A list of the groups the user has certain privileges.
|
||||
*/
|
||||
function get_user_groups ($id_user = false, $privilege = "AR", $returnAllGroup = true, $returnAllColumns = false, $id_groups = null) {
|
||||
function users_get_groups ($id_user = false, $privilege = "AR", $returnAllGroup = true, $returnAllColumns = false, $id_groups = null) {
|
||||
if (empty ($id_user)) {
|
||||
global $config;
|
||||
$id_user = $config['id_user'];
|
||||
|
@ -141,8 +141,8 @@ function get_user_groups ($id_user = false, $privilege = "AR", $returnAllGroup =
|
|||
*
|
||||
* @return array A treefield list of the groups the user has certain privileges.
|
||||
*/
|
||||
function get_user_groups_tree($id_user = false, $privilege = "AR", $returnAllGroup = true) {
|
||||
$user_groups = get_user_groups ($id_user, $privilege, $returnAllGroup, true);
|
||||
function users_get_groups_tree($id_user = false, $privilege = "AR", $returnAllGroup = true) {
|
||||
$user_groups = users_get_groups ($id_user, $privilege, $returnAllGroup, true);
|
||||
|
||||
$user_groups_tree = groups_get_groups_tree_recursive($user_groups);
|
||||
|
||||
|
@ -159,8 +159,8 @@ function get_user_groups_tree($id_user = false, $privilege = "AR", $returnAllGro
|
|||
*
|
||||
* @return array The first group where the user has certain privileges.
|
||||
*/
|
||||
function get_user_first_group ($id_user = false, $privilege = "AR") {
|
||||
return array_shift (array_keys (get_user_groups ($id_user, $privilege)));
|
||||
function users_get_first_group ($id_user = false, $privilege = "AR") {
|
||||
return array_shift (array_keys (users_get_groups ($id_user, $privilege)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -172,7 +172,7 @@ function get_user_first_group ($id_user = false, $privilege = "AR") {
|
|||
*
|
||||
* @return bool Access to that agent (false not, true yes)
|
||||
*/
|
||||
function user_access_to_agent ($id_agent, $mode = "AR", $id_user = false) {
|
||||
function users_access_to_agent ($id_agent, $mode = "AR", $id_user = false) {
|
||||
if (empty ($id_agent))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ function visual_map_process_wizard_add ($id_agents, $image, $id_layout, $range,
|
|||
array ('id_layout' => $id_layout,
|
||||
'pos_x' => $pos_x,
|
||||
'pos_y' => $pos_y,
|
||||
'label' => get_agent_name ($id_agent),
|
||||
'label' => agents_get_name ($id_agent),
|
||||
'image' => $image,
|
||||
'id_agent' => $id_agent,
|
||||
'width' => $width,
|
||||
|
@ -373,8 +373,8 @@ function visual_map_get_status_element($layoutData) {
|
|||
//Status for a whole agent, if agente_modulo was == 0
|
||||
}
|
||||
else if ($layoutData['id_agent'] != 0) {
|
||||
$status = get_agent_status ($layoutData["id_agent"]);
|
||||
if ($status == -1) // get_agent_status return -1 for unknown!
|
||||
$status = agents_get_status ($layoutData["id_agent"]);
|
||||
if ($status == -1) // agents_get_status return -1 for unknown!
|
||||
$status = 3;
|
||||
}
|
||||
else {
|
||||
|
@ -456,7 +456,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||
// Agent
|
||||
}
|
||||
elseif ($id_agent_parent != 0) {
|
||||
$status_parent = get_agent_status ($id_agent_parent);
|
||||
$status_parent = agents_get_status ($id_agent_parent);
|
||||
}
|
||||
// Another layout/map
|
||||
elseif ($id_layout_linked != 0) {
|
||||
|
@ -490,8 +490,8 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||
|
||||
// Status for a whole agent, if agente_modulo was == 0
|
||||
} elseif ($layout_data['id_agent'] != 0) {
|
||||
$status = get_agent_status ($layout_data["id_agent"]);
|
||||
if ($status == -1) // get_agent_status return -1 for unknown!
|
||||
$status = agents_get_status ($layout_data["id_agent"]);
|
||||
if ($status == -1) // agents_get_status return -1 for unknown!
|
||||
$status = 3;
|
||||
$id_agent = $layout_data["id_agent"];
|
||||
} else {
|
||||
|
@ -885,9 +885,9 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
|
|||
$where .= ' AND ';
|
||||
}
|
||||
if ($returnAllGroup)
|
||||
$groups = get_user_groups ($id_user);
|
||||
$groups = users_get_groups ($id_user);
|
||||
else
|
||||
$groups = get_user_groups ($id_user, 'IR', false);
|
||||
$groups = users_get_groups ($id_user, 'IR', false);
|
||||
$where .= sprintf ('id_group IN (%s)', implode (",", array_keys ($groups)));
|
||||
|
||||
$layouts = db_get_all_rows_filter ('tlayout', $where);
|
||||
|
@ -947,7 +947,7 @@ function visual_map_get_layout_status ($id_layout = 0, $depth = 0) {
|
|||
$status = modules_get_agentmodule_status ($data["id_agente_modulo"]);
|
||||
// Agent
|
||||
} else {
|
||||
$status = get_agent_status ($data["id_agent"]);
|
||||
$status = agents_get_status ($data["id_agent"]);
|
||||
}
|
||||
if ($status == 1)
|
||||
return 1;
|
||||
|
@ -1035,7 +1035,7 @@ function visual_map_get_items_parents($idVisual) {
|
|||
foreach ($items as $item) {
|
||||
$agent = null;
|
||||
if ($item['id_agent'] != 0) {
|
||||
$agent = io_safe_output(get_agent_name($item['id_agent']));
|
||||
$agent = io_safe_output(agents_get_name($item['id_agent']));
|
||||
}
|
||||
|
||||
$return[$item['id']] = visual_map_create_internal_name_item($item['label'],
|
||||
|
|
|
@ -254,7 +254,7 @@ else {
|
|||
if ($page != "") {
|
||||
$page .= '.php';
|
||||
// Enterprise ACL check
|
||||
if (enterprise_hook ('acl_enterprise', array ($config['id_user'], $sec, $sec2)) == false){
|
||||
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $sec, $sec2)) == false){
|
||||
require ("general/noaccess.php");
|
||||
}
|
||||
elseif (file_exists ($page)) {
|
||||
|
|
|
@ -27,7 +27,7 @@ class GroupView {
|
|||
}
|
||||
|
||||
public function show() {
|
||||
$groups = get_user_groups ($this->system->getConfig('id_user'));
|
||||
$groups = users_get_groups ($this->system->getConfig('id_user'));
|
||||
|
||||
$table = null;
|
||||
$table->width = '100%';
|
||||
|
|
|
@ -76,7 +76,7 @@ class MonitorStatus {
|
|||
$sqlGroup = sprintf (" AND tagente.id_grupo = %d", $ag_group);
|
||||
}
|
||||
else {
|
||||
$user_groups_all = get_user_groups ($this->user->getIdUser(), "AR");
|
||||
$user_groups_all = users_get_groups ($this->user->getIdUser(), "AR");
|
||||
$user_groups = array_keys ($user_groups_all);
|
||||
$user_groupsText = implode(',', $user_groups);
|
||||
|
||||
|
|
|
@ -51,13 +51,13 @@ class ViewAgents {
|
|||
// Show only selected groups
|
||||
if ($this->filterGroup > 0) {
|
||||
$groups = $this->filterGroup;
|
||||
$agent_names = get_group_agents ($this->filterGroup, array('string' => $this->filterText), "upper");
|
||||
$agent_names = agents_get_group_agents ($this->filterGroup, array('string' => $this->filterText), "upper");
|
||||
// Not selected any specific group
|
||||
}
|
||||
else {
|
||||
$user_group = get_user_groups ($this->user->getIdUser(), "AR");
|
||||
$user_group = users_get_groups ($this->user->getIdUser(), "AR");
|
||||
$groups = array_keys ($user_group);
|
||||
$agent_names = get_group_agents (array_keys ($user_group), array('string' => $this->filterText), "upper");
|
||||
$agent_names = agents_get_group_agents (array_keys ($user_group), array('string' => $this->filterText), "upper");
|
||||
}
|
||||
|
||||
$total_agents = agents_get_agents (array('id_agente' => array_keys ($agent_names),
|
||||
|
@ -168,14 +168,14 @@ class ViewAgent {
|
|||
$this->idAgent = $this->system->getRequest('id', 0);
|
||||
$this->agent = db_get_row_filter('tagente', array('id_agente' => $this->idAgent));
|
||||
|
||||
$this->ips = get_agent_addresses($this->idAgent);
|
||||
$this->ips = agents_get_addresses($this->idAgent);
|
||||
}
|
||||
|
||||
public function show() {
|
||||
$idGroup = $this->agent['id_grupo'];
|
||||
if (! check_acl ($this->system->getConfig('id_user'), $idGroup, "AR")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access (read) to agent ".get_agent_name($this->idAgent));
|
||||
"Trying to access (read) to agent ".agents_get_name($this->idAgent));
|
||||
include ("../general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ class viewGraph {
|
|||
$idGroup = $this->agent['id_grupo'];
|
||||
if (! check_acl ($this->system->getConfig('id_user'), $idGroup, "AR")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access (read) to agent ".get_agent_name($this->idAgent));
|
||||
"Trying to access (read) to agent ".agents_get_name($this->idAgent));
|
||||
include ("../general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ class ViewAlerts {
|
|||
$table->data = array();
|
||||
$table->rowclass = array();
|
||||
|
||||
$groups = get_user_groups($this->system->getConfig('id_user'));
|
||||
$groups = users_get_groups($this->system->getConfig('id_user'));
|
||||
$idGroups = array_keys($groups);
|
||||
$agents = get_group_agents($idGroups);
|
||||
$agents = agents_get_group_agents($idGroups);
|
||||
|
||||
$alertsSimple = agents_get_alerts_simple($agents);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class EventsView {
|
|||
echo "</form>";
|
||||
|
||||
|
||||
$groups = get_user_groups ($this->system->getConfig("id_user"), "IR");
|
||||
$groups = users_get_groups ($this->system->getConfig("id_user"), "IR");
|
||||
$sqlGroups = '';
|
||||
//Group selection
|
||||
if ($ev_group > 0 && in_array ($ev_group, array_keys ($groups))) {
|
||||
|
@ -188,7 +188,7 @@ class EventsView {
|
|||
}
|
||||
elseif ($row["id_agente"] > 0) {
|
||||
// Agent name
|
||||
$data[] = '<a href="index.php?page=agent&id=' . $row["id_agente"] . '">' . ui_print_truncate_text(get_agent_name($row["id_agente"]), 20, true, true) . '</a>';
|
||||
$data[] = '<a href="index.php?page=agent&id=' . $row["id_agente"] . '">' . ui_print_truncate_text(agents_get_name($row["id_agente"]), 20, true, true) . '</a>';
|
||||
}
|
||||
else {
|
||||
$data[] = ui_print_truncate_text(__('Alert SNMP'), 20, true, true);
|
||||
|
|
|
@ -53,7 +53,7 @@ $idAgent = get_parameter_get('id_agente', 0);
|
|||
if ($idAgent != 0) {
|
||||
$url = $url.'&id_agente='.$idAgent;
|
||||
|
||||
$id_group = get_agent_group ($idAgent);
|
||||
$id_group = agents_get_agent_group ($idAgent);
|
||||
|
||||
if (check_acl ($config["id_user"], $id_group, "AR") == 0) {
|
||||
db_pandora_audit("ACL Violation","Trying to access alert view");
|
||||
|
@ -75,7 +75,7 @@ else {
|
|||
return;
|
||||
}
|
||||
|
||||
$agents = array_keys(get_group_agents(array_keys(get_user_groups($config["id_user"], 'AR', false))));
|
||||
$agents = array_keys(agents_get_group_agents(array_keys(users_get_groups($config["id_user"], 'AR', false))));
|
||||
|
||||
$idGroup = $id_group;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ require_once('include/functions_modules.php');
|
|||
|
||||
$module_id = get_parameter_get ("id", 0);
|
||||
$period = get_parameter ("period", 86400);
|
||||
$group = get_agentmodule_group ($module_id);
|
||||
$group = agents_get_agentmodule_group ($module_id);
|
||||
$agentId = get_parameter("id_agente");
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ if (is_ajax ()) {
|
|||
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
$usr_groups = array();
|
||||
$usr_groups = get_user_groups($config['id_user'], 'LW', true);
|
||||
$usr_groups = users_get_groups($config['id_user'], 'LW', true);
|
||||
|
||||
$filter_groups = '';
|
||||
$filter_groups = implode(',', array_keys($usr_groups));
|
||||
|
@ -86,7 +86,7 @@ if (is_ajax ()) {
|
|||
if ($get_agent_module_last_value) {
|
||||
$id_module = (int) get_parameter ('id_agent_module');
|
||||
|
||||
if (! check_acl ($config['id_user'], get_agentmodule_group ($id_module), "AR")) {
|
||||
if (! check_acl ($config['id_user'], agents_get_agentmodule_group ($id_module), "AR")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access agent main list view");
|
||||
echo json_encode (false);
|
||||
|
@ -123,7 +123,7 @@ else {
|
|||
echo '<table cellpadding="4" cellspacing="4" class="databox" width="95%">';
|
||||
echo '<tr><td style="white-space:nowrap;">'.__('Group').': ';
|
||||
|
||||
$groups = get_user_groups ();
|
||||
$groups = users_get_groups ();
|
||||
html_print_select_groups(false, "AR", true, 'group_id', $group_id, 'this.form.submit()', '', '');
|
||||
|
||||
echo '</td><td style="white-space:nowrap;">';
|
||||
|
@ -245,17 +245,17 @@ if ($search != ""){
|
|||
// Show only selected groups
|
||||
if ($group_id > 0) {
|
||||
$groups = $group_id;
|
||||
$agent_names = get_group_agents ($group_id, $filter, "upper");
|
||||
$agent_names = agents_get_group_agents ($group_id, $filter, "upper");
|
||||
}
|
||||
else {
|
||||
// Not selected any specific group
|
||||
if (check_acl ($config['id_user'], 0, "PM")){
|
||||
$agent_names = get_group_agents(0, $filter, "upper", true);
|
||||
$agent_names = agents_get_group_agents(0, $filter, "upper", true);
|
||||
}
|
||||
else{
|
||||
$user_group = get_user_groups($config["id_user"], "AR");
|
||||
$user_group = users_get_groups($config["id_user"], "AR");
|
||||
$groups = array_keys($user_group);
|
||||
$agent_names = get_group_agents(array_keys ($user_group), $filter, "upper");
|
||||
$agent_names = agents_get_group_agents(array_keys ($user_group), $filter, "upper");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,20 +77,20 @@ echo '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&fl
|
|||
echo '<tr><td class="datos2"><b>'.__('IP Address').'</b></td>';
|
||||
echo '<td class="datos2" colspan="2">';
|
||||
$ips = array();
|
||||
$addresses = get_agent_addresses ($id_agente);
|
||||
$address = get_agent_address($id_agente);
|
||||
$addresses = agents_get_addresses ($id_agente);
|
||||
$address = agents_get_address($id_agente);
|
||||
|
||||
if (!empty($addresses)) {
|
||||
$ips = $addresses;
|
||||
}
|
||||
|
||||
if (!empty($address)) {
|
||||
$ips = array_merge((array)get_agent_address ($id_agente), $ips);
|
||||
$ips = array_merge((array)agents_get_address ($id_agente), $ips);
|
||||
}
|
||||
|
||||
$ips = array_unique($ips);
|
||||
|
||||
html_print_select($ips, "not_used", get_agent_address ($id_agente));
|
||||
html_print_select($ips, "not_used", agents_get_address ($id_agente));
|
||||
echo '</td></tr>';
|
||||
|
||||
//OS
|
||||
|
@ -109,7 +109,7 @@ echo ' <i><span title="'.$agent["os_version"].'">'.substr($agent["os_versio
|
|||
|
||||
// Parent
|
||||
echo '<tr><td class="datos2"><b>'.__('Parent').'</b></td>';
|
||||
echo '<td class="datos2" colspan="2"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_parent"].'">'.get_agent_name ($agent["id_parent"]).'</a></td></tr>';
|
||||
echo '<td class="datos2" colspan="2"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_parent"].'">'.agents_get_name ($agent["id_parent"]).'</a></td></tr>';
|
||||
|
||||
// Agent Interval
|
||||
echo '<tr><td class="datos"><b>'.__('Interval').'</b></td>';
|
||||
|
|
|
@ -215,7 +215,7 @@ foreach ($modules as $module) {
|
|||
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||
if ($module["id_policy_module"] != 0) {
|
||||
$linked = isModuleLinked($module['id_agente_modulo']);
|
||||
$linked = policies_is_module_linked($module['id_agente_modulo']);
|
||||
$id_policy = db_get_value_sql('SELECT id_policy FROM tpolicy_modules WHERE id = '.$module["id_policy_module"]);
|
||||
|
||||
if ($id_policy != "")
|
||||
|
@ -223,10 +223,10 @@ foreach ($modules as $module) {
|
|||
else
|
||||
$name_policy = __("Unknown");
|
||||
|
||||
$policyInfo = infoModulePolicy($module["id_policy_module"]);
|
||||
$policyInfo = policies_info_module_policy($module["id_policy_module"]);
|
||||
|
||||
$adopt = false;
|
||||
if (isModuleAdopt($module['id_agente_modulo'])) {
|
||||
if (policies_is_module_adopt($module['id_agente_modulo'])) {
|
||||
$adopt = true;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue