2013-02-13 Miguel de Dios <miguel.dedios@artica.es>

* extensions/module_groups.php,
	godmode/massive/massive_add_alerts.php,
	godmode/massive/massive_edit_modules.php, godmode/tag/tag.php:
	cleaned source code style.
	
	* images/network.disabled.png: added image.
	* images/chart_curve.disabled.png: fixed mistake image.
	
	* godmode/agentes/module_manager.php: improved the style of table.
	
	Fixes: #3604465




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7647 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-13 17:47:43 +00:00
parent 260726fa76
commit 9fc6fd6bcd
8 changed files with 82 additions and 46 deletions

View File

@ -1,3 +1,17 @@
2013-02-13 Miguel de Dios <miguel.dedios@artica.es>
* extensions/module_groups.php,
godmode/massive/massive_add_alerts.php,
godmode/massive/massive_edit_modules.php, godmode/tag/tag.php:
cleaned source code style.
* images/network.disabled.png: added image.
* images/chart_curve.disabled.png: fixed mistake image.
* godmode/agentes/module_manager.php: improved the style of table.
Fixes: #3604465
2013-02-13 Miguel de Dios <miguel.dedios@artica.es>
* include/config_process.php: fixed the lost initial value for

View File

@ -45,10 +45,18 @@ echo '</form>';
// Check if there is at least one server of each type available to assign that
// kind of modules. If not, do not show server type in combo
$network_available = db_get_sql ("SELECT count(*) from tserver where server_type = 1"); //POSTGRESQL AND ORACLE COMPATIBLE
$wmi_available = db_get_sql ("SELECT count(*) from tserver where server_type = 6"); //POSTGRESQL AND ORACLE COMPATIBLE
$plugin_available = db_get_sql ("SELECT count(*) from tserver where server_type = 4"); //POSTGRESQL AND ORACLE COMPATIBLE
$prediction_available = db_get_sql ("SELECT count(*) from tserver where server_type = 5"); //POSTGRESQL AND ORACLE COMPATIBLE
$network_available = db_get_sql ("SELECT count(*)
FROM tserver
WHERE server_type = 1"); //POSTGRESQL AND ORACLE COMPATIBLE
$wmi_available = db_get_sql ("SELECT count(*)
FROM tserver
WHERE server_type = 6"); //POSTGRESQL AND ORACLE COMPATIBLE
$plugin_available = db_get_sql ("SELECT count(*)
FROM tserver
WHERE server_type = 4"); //POSTGRESQL AND ORACLE COMPATIBLE
$prediction_available = db_get_sql ("SELECT count(*)
FROM tserver
WHERE server_type = 5"); //POSTGRESQL AND ORACLE COMPATIBLE
// Development mode to use all servers
if ($develop_bypass) {
@ -473,6 +481,7 @@ $table->head[7] = __('Warn');
$table->head[8] = __('Action');
$table->head[9] = '<span title="' . __('Delete') . '">' . __('D.') . '</span>';
$table->rowstyle = array();
$table->style = array ();
@ -480,8 +489,9 @@ $table->style[0] = 'font-weight: bold';
$table->size = array ();
$table->size[2] = '55px';
$table->align = array ();
$table->align[2] = 'center';
$table->align[8] = 'center';
$table->align[2] = 'left';
$table->align[8] = 'left';
$table->align[9] = 'left';
$table->data = array ();
$agent_interval = agents_get_interval ($id_agente);
@ -518,9 +528,9 @@ foreach ($modules as $module) {
$table->rowstyle[$i - 1] = 'text-align: center';
$table->rowclass[$i - 1] = 'datos3';
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK)
$table->colspan[$i - 1][0] = 9;
$table->colspan[$i - 1][0] = 10;
else
$table->colspan[$i - 1][0] = 7;
$table->colspan[$i - 1][0] = 8;
$data = array ();
}
@ -632,13 +642,6 @@ foreach ($modules as $module) {
}
if (check_acl ($config['id_user'], $agent['id_grupo'], "AW")) {
// Delete module
$data[8] .= html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
$data[8] .= '&nbsp;<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'].'"
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[8] .= html_print_image ('images/cross.png', true,
array ('title' => __('Delete')));
$data[8] .= '</a> ';
$data[8] .= '&nbsp;<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[8] .= html_print_image ('images/copy.png', true,
@ -646,7 +649,6 @@ foreach ($modules as $module) {
$data[8] .= '</a> ';
// Make a data normalization
if (isset($numericModules[$type])) {
if ($numericModules[$type] === true) {
$data[8] .= '&nbsp;<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
@ -655,14 +657,34 @@ foreach ($modules as $module) {
$data[8] .= '</a>';
}
}
else {
$data[8] .= "&nbsp;" . html_print_image ('images/chart_curve.disabled.png', true,
array ('title' => __('Normalize (Disabled)')));
}
//create network component action
if (is_user_admin($config['id_user'])) {
if ((is_user_admin($config['id_user'])) &&
($module['id_modulo'] == MODULE_NETWORK)) {
$data[8] .= '&nbsp;<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&create_network_from_module=1&id_agente='.$id_agente.'&create_module_from='.$module['id_agente_modulo'].'"
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[8] .= html_print_image ('images/network.png', true,
array ('title' => __('Create network component')));
$data[8] .= '</a> ';
}
else {
$data[8] .= '&nbsp;' . html_print_image ('images/network.disabled.png', true,
array ('title' => __('Create network component (Disabled)')));
}
}
if (check_acl ($config['id_user'], $agent['id_grupo'], "AW")) {
// Delete module
$data[9] = html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
$data[9] .= '&nbsp;<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'].'"
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[9] .= html_print_image ('images/cross.png', true,
array ('title' => __('Delete')));
$data[9] .= '</a> ';
}
array_push ($table->data, $data);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B