2013-01-29 Miguel de Dios <miguel.dedios@artica.es>

* general/shortcut_bar.php, godmode/alerts/alert_actions.php,
	godmode/category/edit_category.php, include/functions_reports.php,
	include/db/postgresql.php, include/functions_gis.php,
	include/functions_treeview.php,
	include/functions_network_components.php: improved the code style.
	
	* include/javascript/pandora.js: in function
	"agent_changed_by_multiple_agents" added hook for to call any
	function when loaded the module list. (now used in the wizzard
	of reports in enterprise).




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7540 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-01-29 12:31:32 +00:00
parent fb065bb5be
commit c30473da10
10 changed files with 63 additions and 33 deletions

View File

@ -1,3 +1,16 @@
2013-01-29 Miguel de Dios <miguel.dedios@artica.es>
* general/shortcut_bar.php, godmode/alerts/alert_actions.php,
godmode/category/edit_category.php, include/functions_reports.php,
include/db/postgresql.php, include/functions_gis.php,
include/functions_treeview.php,
include/functions_network_components.php: improved the code style.
* include/javascript/pandora.js: in function
"agent_changed_by_multiple_agents" added hook for to call any
function when loaded the module list. (now used in the wizzard
of reports in enterprise).
2013-01-29 Sergio Martin <sergio.martin@artica.es>
* include/functions_treeview.php

View File

@ -202,7 +202,8 @@ if ($update_action) {
}
}
}
} else {
}
else {
// Header
if (defined('METACONSOLE')) {
alerts_meta_print_header ();

View File

@ -42,7 +42,7 @@ $buttons = array(
$buttons[$tab]['active'] = false;
// Header
if(defined('METACONSOLE')) {
if (defined('METACONSOLE')) {
ui_meta_print_header(__('Categories configuration'), __('Editor'), $buttons);
}
else {

View File

@ -108,6 +108,7 @@ function network_components_get_group_name ($id_network_component_group) {
function network_components_get_group ($id_network_component_group, $filter = false, $fields = false) {
if (empty ($id_network_component_group))
return false;
if (! is_array ($filter))
$filter = array ();
$filter['id_sg'] = (int) $id_network_component_group;
@ -218,6 +219,7 @@ function network_components_get_groups ($id_module_components = 0, $localCompone
function network_components_get_network_component ($id_network_component, $filter = false, $fields = false) {
if (empty ($id_network_component))
return false;
if (! is_array ($filter))
$filter = array ();
$filter['id_nc'] = (int) $id_network_component;
@ -254,10 +256,13 @@ function network_components_create_network_component ($name, $type, $id_group, $
if (empty ($name))
return false;
if (empty ($type))
return false;
if (! is_array ($values))
$values = array ();
$values['name'] = $name;
$values['type'] = (int) $type;
$values['id_group'] = (int) $id_group;
@ -277,9 +282,11 @@ function network_components_create_network_component ($name, $type, $id_group, $
function network_components_update_network_component ($id_network_component, $values = false) {
if (empty ($id_network_component))
return false;
$component = network_components_get_network_component ($id_network_component);
if (empty ($component))
return false;
if (! is_array ($values))
return false;
@ -299,6 +306,7 @@ function network_components_update_network_component ($id_network_component, $va
function network_components_delete_network_component ($id_network_component) {
if (empty ($id_network_component))
return false;
$filter = array ();
$filter['id_nc'] = $id_network_component;
@ -319,6 +327,7 @@ function network_components_delete_network_component ($id_network_component) {
function network_components_create_module_from_network_component ($id_network_component, $id_agent) {
if (! users_access_to_agent ($id_agent, 'AW'))
return false;
$component = network_components_get_network_component ($id_network_component,
false,
array ('name',
@ -375,6 +384,7 @@ function network_components_create_module_from_network_component ($id_network_co
function network_components_get_name ($id_network_component) {
if (empty ($id_network_component))
return false;
return @db_get_value ('name', 'tnetwork_component', 'id', $id_network_component);
}

View File

@ -442,7 +442,8 @@ function treeview_printTree($type) {
if (defined ('METACONSOLE')) {
$id = unpack ('H*', $item['_id_']);
$id = $id[1];
} else {
}
else {
$id = $item['_id_'];
}
echo "<a onfocus='JavaScript: this.blur()' href='javascript: loadSubTree(\"" . $type . "\",\"" . $id . "\", " . $lessBranchs . ", \"\", \"\")'>";

View File

@ -179,6 +179,7 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
$('#module').empty ();
$('#module').append ($('<option></option>').html ("Loading...").attr ("value", 0));
// Check if homedir was received like a JSON
homedir = '';
id_server = 0;
@ -251,6 +252,10 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
$('#module').removeAttr('disabled');
if (typeof(function_hook_loaded_module_list) == 'function') {
function_hook_loaded_module_list();
}
},
"json"
);