mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-12 16:35:05 +02:00
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:
parent
260726fa76
commit
9fc6fd6bcd
@ -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>
|
2013-02-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/config_process.php: fixed the lost initial value for
|
* include/config_process.php: fixed the lost initial value for
|
||||||
|
@ -62,7 +62,7 @@ if (is_ajax ()) {
|
|||||||
ON t3.id = t1.id_alert_template_module
|
ON t3.id = t1.id_alert_template_module
|
||||||
AND t1.id_alert_action = t2.id
|
AND t1.id_alert_action = t2.id
|
||||||
WHERE (t3.id_alert_template = ' . $template['id'] . ' AND
|
WHERE (t3.id_alert_template = ' . $template['id'] . ' AND
|
||||||
t3.id_agent_module = ' . $module['id_agente_modulo'] . ');';
|
t3.id_agent_module = ' . $module['id_agente_modulo'] . ');';
|
||||||
|
|
||||||
$actions = db_get_all_rows_sql($sql);
|
$actions = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
|
@ -45,10 +45,18 @@ echo '</form>';
|
|||||||
// Check if there is at least one server of each type available to assign that
|
// 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
|
// 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
|
$network_available = db_get_sql ("SELECT count(*)
|
||||||
$wmi_available = db_get_sql ("SELECT count(*) from tserver where server_type = 6"); //POSTGRESQL AND ORACLE COMPATIBLE
|
FROM tserver
|
||||||
$plugin_available = db_get_sql ("SELECT count(*) from tserver where server_type = 4"); //POSTGRESQL AND ORACLE COMPATIBLE
|
WHERE server_type = 1"); //POSTGRESQL AND ORACLE COMPATIBLE
|
||||||
$prediction_available = db_get_sql ("SELECT count(*) from tserver where server_type = 5"); //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
|
// Development mode to use all servers
|
||||||
if ($develop_bypass) {
|
if ($develop_bypass) {
|
||||||
@ -473,6 +481,7 @@ $table->head[7] = __('Warn');
|
|||||||
|
|
||||||
|
|
||||||
$table->head[8] = __('Action');
|
$table->head[8] = __('Action');
|
||||||
|
$table->head[9] = '<span title="' . __('Delete') . '">' . __('D.') . '</span>';
|
||||||
|
|
||||||
$table->rowstyle = array();
|
$table->rowstyle = array();
|
||||||
$table->style = array ();
|
$table->style = array ();
|
||||||
@ -480,8 +489,9 @@ $table->style[0] = 'font-weight: bold';
|
|||||||
$table->size = array ();
|
$table->size = array ();
|
||||||
$table->size[2] = '55px';
|
$table->size[2] = '55px';
|
||||||
$table->align = array ();
|
$table->align = array ();
|
||||||
$table->align[2] = 'center';
|
$table->align[2] = 'left';
|
||||||
$table->align[8] = 'center';
|
$table->align[8] = 'left';
|
||||||
|
$table->align[9] = 'left';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
|
|
||||||
$agent_interval = agents_get_interval ($id_agente);
|
$agent_interval = agents_get_interval ($id_agente);
|
||||||
@ -518,9 +528,9 @@ foreach ($modules as $module) {
|
|||||||
$table->rowstyle[$i - 1] = 'text-align: center';
|
$table->rowstyle[$i - 1] = 'text-align: center';
|
||||||
$table->rowclass[$i - 1] = 'datos3';
|
$table->rowclass[$i - 1] = 'datos3';
|
||||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK)
|
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK)
|
||||||
$table->colspan[$i - 1][0] = 9;
|
$table->colspan[$i - 1][0] = 10;
|
||||||
else
|
else
|
||||||
$table->colspan[$i - 1][0] = 7;
|
$table->colspan[$i - 1][0] = 8;
|
||||||
|
|
||||||
$data = array ();
|
$data = array ();
|
||||||
}
|
}
|
||||||
@ -631,14 +641,7 @@ foreach ($modules as $module) {
|
|||||||
html_print_image('images/lightbulb.png', true, array('alt' => __('Disable module'), 'title' => __('Disable module'))) ."</a>";
|
html_print_image('images/lightbulb.png', true, array('alt' => __('Disable module'), 'title' => __('Disable module'))) ."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(check_acl ($config['id_user'], $agent['id_grupo'], "AW")) {
|
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] .= ' <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] .= ' <a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
|
$data[8] .= ' <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;">';
|
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||||
$data[8] .= html_print_image ('images/copy.png', true,
|
$data[8] .= html_print_image ('images/copy.png', true,
|
||||||
@ -646,7 +649,6 @@ foreach ($modules as $module) {
|
|||||||
$data[8] .= '</a> ';
|
$data[8] .= '</a> ';
|
||||||
|
|
||||||
// Make a data normalization
|
// Make a data normalization
|
||||||
|
|
||||||
if (isset($numericModules[$type])) {
|
if (isset($numericModules[$type])) {
|
||||||
if ($numericModules[$type] === true) {
|
if ($numericModules[$type] === true) {
|
||||||
$data[8] .= ' <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;">';
|
$data[8] .= ' <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>';
|
$data[8] .= '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$data[8] .= " " . html_print_image ('images/chart_curve.disabled.png', true,
|
||||||
|
array ('title' => __('Normalize (Disabled)')));
|
||||||
|
}
|
||||||
|
|
||||||
//create network component action
|
//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] .= ' <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'].'"
|
$data[8] .= ' <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;">';
|
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||||
$data[8] .= html_print_image ('images/network.png', true,
|
$data[8] .= html_print_image ('images/network.png', true,
|
||||||
array ('title' => __('Create network component')));
|
array ('title' => __('Create network component')));
|
||||||
$data[8] .= '</a> ';
|
$data[8] .= '</a> ';
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$data[8] .= ' ' . 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] .= ' <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);
|
array_push ($table->data, $data);
|
||||||
|
@ -55,7 +55,7 @@ function process_manage_add ($id_alert_template, $id_agents, $module_names) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($module_names as $module){
|
foreach($module_names as $module) {
|
||||||
foreach($id_agents as $id_agent) {
|
foreach($id_agents as $id_agent) {
|
||||||
$module_id = modules_get_agentmodule_id($module, $id_agent);
|
$module_id = modules_get_agentmodule_id($module, $id_agent);
|
||||||
$modules_id[] = $module_id['id_agente_modulo'];
|
$modules_id[] = $module_id['id_agente_modulo'];
|
||||||
@ -69,7 +69,7 @@ function process_manage_add ($id_alert_template, $id_agents, $module_names) {
|
|||||||
|
|
||||||
$conttotal = 0;
|
$conttotal = 0;
|
||||||
$contsuccess = 0;
|
$contsuccess = 0;
|
||||||
foreach($modules_id as $module){
|
foreach($modules_id as $module) {
|
||||||
$success = alerts_create_alert_agent_module ($module, $id_alert_template);
|
$success = alerts_create_alert_agent_module ($module, $id_alert_template);
|
||||||
|
|
||||||
if($success)
|
if($success)
|
||||||
@ -85,8 +85,8 @@ function process_manage_add ($id_alert_template, $id_agents, $module_names) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui_print_result_message ($contsuccess > 0,
|
ui_print_result_message ($contsuccess > 0,
|
||||||
__('Successfully added')."(".$contsuccess."/".$conttotal.")",
|
__('Successfully added')."(".$contsuccess."/".$conttotal.")",
|
||||||
__('Could not be added'));
|
__('Could not be added'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ ui_require_jquery_file ('pandora.controls');
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/* <![CDATA[ */
|
/* <![CDATA[ */
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
$("#checkbox-recursion").click(function (){
|
$("#checkbox-recursion").click(function () {
|
||||||
$("#id_group").trigger("change");
|
$("#id_group").trigger("change");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 399 B |
BIN
pandora_console/images/network.disabled.png
Normal file
BIN
pandora_console/images/network.disabled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 377 B |
Loading…
x
Reference in New Issue
Block a user