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>
|
||||
|
||||
* 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
|
||||
AND t1.id_alert_action = t2.id
|
||||
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);
|
||||
|
||||
|
@ -74,9 +74,9 @@ if (is_ajax ()) {
|
|||
|
||||
$default_action = true;
|
||||
|
||||
$actions = db_get_all_rows_sql($sql);
|
||||
$actions = db_get_all_rows_sql($sql);
|
||||
}
|
||||
|
||||
|
||||
if ($actions === false) {
|
||||
$actions = array();
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
@ -307,7 +315,7 @@ switch ($sortField) {
|
|||
case "postgresql":
|
||||
$order[] = array('field' => 'tagente_modulo.nombre', 'order' => 'DESC');
|
||||
break;
|
||||
case "oracle":
|
||||
case "oracle":
|
||||
$order[] = array('field' => 'dbms_lob.substr(tagente_modulo.nombre,4000,1)', 'order' => 'DESC');
|
||||
break;
|
||||
}
|
||||
|
@ -419,7 +427,7 @@ switch ($config["dbtype"]) {
|
|||
|
||||
$modules = db_get_all_rows_sql($sql);
|
||||
break;
|
||||
case "oracle":
|
||||
case "oracle":
|
||||
$set = array();
|
||||
$set['limit'] = $limit;
|
||||
$set['offset'] = $offset;
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
@ -631,14 +641,7 @@ foreach ($modules as $module) {
|
|||
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")) {
|
||||
// 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> ';
|
||||
if (check_acl ($config['id_user'], $agent['id_grupo'], "AW")) {
|
||||
$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;">';
|
||||
$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] .= ' <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] .= " " . 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] .= ' <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] .= ' ' . 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);
|
||||
|
|
|
@ -55,13 +55,13 @@ function process_manage_add ($id_alert_template, $id_agents, $module_names) {
|
|||
return false;
|
||||
}
|
||||
|
||||
foreach($module_names as $module){
|
||||
foreach($module_names as $module) {
|
||||
foreach($id_agents as $id_agent) {
|
||||
$module_id = modules_get_agentmodule_id($module, $id_agent);
|
||||
$modules_id[] = $module_id['id_agente_modulo'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(count($module_names) == 1 && $module_names[0] == '0'){
|
||||
$modules_id = agents_common_modules ($id_agents, false, true);
|
||||
}
|
||||
|
@ -69,9 +69,9 @@ function process_manage_add ($id_alert_template, $id_agents, $module_names) {
|
|||
|
||||
$conttotal = 0;
|
||||
$contsuccess = 0;
|
||||
foreach($modules_id as $module){
|
||||
foreach($modules_id as $module) {
|
||||
$success = alerts_create_alert_agent_module ($module, $id_alert_template);
|
||||
|
||||
|
||||
if($success)
|
||||
$contsuccess ++;
|
||||
$conttotal ++;
|
||||
|
@ -85,9 +85,9 @@ function process_manage_add ($id_alert_template, $id_agents, $module_names) {
|
|||
}
|
||||
|
||||
ui_print_result_message ($contsuccess > 0,
|
||||
__('Successfully added')."(".$contsuccess."/".$conttotal.")",
|
||||
__('Could not be added'));
|
||||
|
||||
__('Successfully added')."(".$contsuccess."/".$conttotal.")",
|
||||
__('Could not be added'));
|
||||
|
||||
}
|
||||
|
||||
$id_group = (int) get_parameter ('id_group', -1);
|
||||
|
@ -167,12 +167,12 @@ ui_require_jquery_file ('pandora.controls');
|
|||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
$(document).ready (function () {
|
||||
$("#checkbox-recursion").click(function (){
|
||||
$("#checkbox-recursion").click(function () {
|
||||
$("#id_group").trigger("change");
|
||||
});
|
||||
|
||||
|
||||
$("#id_agents").change(agent_changed_by_multiple_agents);
|
||||
|
||||
|
||||
$("#id_group").change (function () {
|
||||
var $select = $("#id_agents").enable ();
|
||||
$("#agent_loading").show ();
|
||||
|
@ -203,32 +203,32 @@ $(document).ready (function () {
|
|||
function () {
|
||||
$(this).css ("width", "auto");
|
||||
});
|
||||
|
||||
|
||||
$("#id_group").blur (function () {
|
||||
$(this).css ("width", "180px");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$("#id_agents").click (
|
||||
function () {
|
||||
$(this).css ("width", "auto");
|
||||
$(this).css ("width", "auto");
|
||||
});
|
||||
|
||||
|
||||
$("#id_agents").blur (function () {
|
||||
$(this).css ("width", "180px");
|
||||
});
|
||||
});
|
||||
|
||||
$("#module").click (
|
||||
function () {
|
||||
$(this).css ("width", "auto");
|
||||
});
|
||||
|
||||
|
||||
$("#module").blur (function () {
|
||||
$(this).css ("width", "180px");
|
||||
});
|
||||
});
|
||||
|
||||
$("#modules_selection_mode").change (function() {
|
||||
$("#id_agents").trigger('change');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
/* ]]> */
|
||||
|
|
|
@ -131,7 +131,7 @@ if ($update) {
|
|||
"(" . $success . "/" . $count . ")",
|
||||
__('Could not be updated'));
|
||||
|
||||
$info = 'Modules: ' . json_encode($modules_) . ' Agents: ' . json_encode($agents_);
|
||||
$info = 'Modules: ' . json_encode($modules_) . ' Agents: ' . json_encode($agents_);
|
||||
if ($success > 0) {
|
||||
db_pandora_audit("Masive management", "Edit module", false, false, $info);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ $buttons[$tab]['active'] = true;
|
|||
if (defined('METACONSOLE')) {
|
||||
|
||||
// Print header
|
||||
ui_meta_print_header(__('Tags'), "", $buttons);
|
||||
ui_meta_print_header(__('Tags'), "", $buttons);
|
||||
|
||||
}
|
||||
else {
|
||||
|
@ -153,8 +153,8 @@ if (!empty($result)) {
|
|||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold; text-align:center';
|
||||
$table->style[1] = 'text-align:center';
|
||||
$table->style[2] = 'text-align:center';
|
||||
$table->style[3] = 'text-align:center';
|
||||
$table->style[2] = 'text-align:center';
|
||||
$table->style[3] = 'text-align:center';
|
||||
$table->style[5] = 'text-align:center';
|
||||
$table->head[0] = __('Tag name');
|
||||
$table->head[1] = __('Description');
|
||||
|
|
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 |
Loading…
Reference in New Issue