Merge branch 'develop' into '1407-No-se-puede-quitar-icono-de-objeto-Visual-consoles-2'

# Conflicts:
#   pandora_console/godmode/reporting/visual_console_builder.editor.js
This commit is contained in:
nramon 2017-10-30 15:32:32 +01:00
commit 70763ada3b
4 changed files with 58 additions and 44 deletions

View File

@ -546,9 +546,11 @@ ui_require_jquery_file('pandora');
}); });
$('#group_id').change(function(){ $('#group_id').change(function(){
if(location.href.indexOf("extensions/agents_modules") == -1){
var regx = /&group_id=\d*/g; var regx = /&group_id=\d*/g;
var url = location.href.replace(regx, ""); var url = location.href.replace(regx, "");
location.href = url+"&group_id="+$("#group_id").val(); location.href = url+"&group_id="+$("#group_id").val();
}
}); });
}); });

View File

@ -503,6 +503,10 @@ $table->data['edit3'][2] = __('SMNP community');
$table->data['edit3'][3] = html_print_input_text ('snmp_community', '', $table->data['edit3'][3] = html_print_input_text ('snmp_community', '',
'', 10, 100, true); '', 10, 100, true);
$table->data['edit15'][2] = __('SNMP OID');
$table->data['edit15'][3] = html_print_input_text ('snmp_oid', '',
'', 80, 80, true);
$target_ip_values = array(); $target_ip_values = array();
$target_ip_values['auto'] = __('Auto'); $target_ip_values['auto'] = __('Auto');
$target_ip_values['force_pri'] = __('Force primary key'); $target_ip_values['force_pri'] = __('Force primary key');
@ -736,7 +740,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " + "tr#delete_table-edit11, " +
"tr#delete_table-edit12, " + "tr#delete_table-edit12, " +
"tr#delete_table-edit13, " + "tr#delete_table-edit13, " +
"tr#delete_table-edit14").hide (); "tr#delete_table-edit14, " +
"tr#delete_table-edit15").hide ();
var params = { var params = {
"page" : "operation/agentes/ver_agente", "page" : "operation/agentes/ver_agente",
@ -800,7 +805,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " + "tr#delete_table-edit11, " +
"tr#delete_table-edit12, " + "tr#delete_table-edit12, " +
"tr#delete_table-edit13, " + "tr#delete_table-edit13, " +
"tr#delete_table-edit14").show (); "tr#delete_table-edit14, " +
"tr#delete_table-edit15").show ();
} }
function clean_lists() { function clean_lists() {
@ -829,7 +835,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " + "tr#delete_table-edit11, " +
"tr#delete_table-edit12, " + "tr#delete_table-edit12, " +
"tr#delete_table-edit13, " + "tr#delete_table-edit13, " +
"tr#delete_table-edit14").hide (); "tr#delete_table-edit14, " +
"tr#delete_table-edit15").hide ();
$('input[type=checkbox]').attr('checked', false); $('input[type=checkbox]').attr('checked', false);
$('input[type=checkbox]').attr('disabled', true); $('input[type=checkbox]').attr('disabled', true);
@ -877,7 +884,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " + "tr#delete_table-edit11, " +
"tr#delete_table-edit12, " + "tr#delete_table-edit12, " +
"tr#delete_table-edit13, " + "tr#delete_table-edit13, " +
"tr#delete_table-edit14").hide (); "tr#delete_table-edit14, " +
"tr#delete_table-edit15").hide ();
} }
} }
} }
@ -919,7 +927,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " + "tr#delete_table-edit11, " +
"tr#delete_table-edit12, " + "tr#delete_table-edit12, " +
"tr#delete_table-edit13, " + "tr#delete_table-edit13, " +
"tr#delete_table-edit14").show (); "tr#delete_table-edit14, " +
"tr#delete_table-edit15").show ();
} }
else { else {
$(".select_agents_row_2").css('display', ''); $(".select_agents_row_2").css('display', '');
@ -942,7 +951,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " + "tr#delete_table-edit11, " +
"tr#delete_table-edit12, " + "tr#delete_table-edit12, " +
"tr#delete_table-edit13, " + "tr#delete_table-edit13, " +
"tr#delete_table-edit14").hide (); "tr#delete_table-edit14, " +
"tr#delete_table-edit15").hide ();
} }
} }
} }
@ -1026,7 +1036,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " + "tr#delete_table-edit11, " +
"tr#delete_table-edit12, " + "tr#delete_table-edit12, " +
"tr#delete_table-edit13, " + "tr#delete_table-edit13, " +
"tr#delete_table-edit14").hide (); "tr#delete_table-edit14, " +
"tr#delete_table-edit15").hide ();
jQuery.post ("ajax.php", jQuery.post ("ajax.php",
{"page" : "operation/agentes/ver_agente", {"page" : "operation/agentes/ver_agente",
@ -1158,8 +1169,8 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
/* List of fields which can be updated */ /* List of fields which can be updated */
$fields = array ('dynamic_interval', 'dynamic_max', 'dynamic_min', 'dynamic_two_tailed', 'min_warning', 'max_warning', 'str_warning', $fields = array ('dynamic_interval', 'dynamic_max', 'dynamic_min', 'dynamic_two_tailed', 'min_warning', 'max_warning', 'str_warning',
'min_critical', 'max_critical', 'str_critical', 'min_ff_event', 'min_critical', 'max_critical', 'str_critical', 'min_ff_event',
'module_interval', 'disabled', 'post_process', 'unit_select', 'module_interval', 'disabled', 'post_process', 'unit',
'snmp_community', 'tcp_send', 'custom_string_1', 'snmp_community','snmp_oid','tcp_send', 'custom_string_1',
'plugin_parameter', 'custom_string_2', 'custom_string_3', 'min', 'plugin_parameter', 'custom_string_2', 'custom_string_3', 'min',
'max', 'id_module_group', 'plugin_user', 'plugin_pass', 'max', 'id_module_group', 'plugin_user', 'plugin_pass',
'id_export', 'history_data', 'critical_inverse', 'id_export', 'history_data', 'critical_inverse',

View File

@ -208,51 +208,52 @@ $ignored_params['refr'] = '';
$(".overlay").removeClass("overlay").addClass("overlaydisabled"); $(".overlay").removeClass("overlay").addClass("overlaydisabled");
$('.item:not(.icon) img').each(function(){ $('.item:not(.icon) img:not(.b64img)').each( function() {
if ($(this).css('float')=='left' || $(this).css('float')=='right') { if ($(this).css('float')=='left' || $(this).css('float')=='right') {
if( $(this).parent()[0].tagName == 'DIV'){
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
}
else if ( $(this).parent()[0].tagName == 'A') {
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px'); $(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
}
$(this).css('margin-left',''); $(this).css('margin-left','');
} }
else { else {
if(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2 < 0){
$(this).css('margin-left','');
$(this).css('margin-top','');
} else {
if( $(this).parent()[0].tagName == 'DIV'){
$(this).css('margin-left',(parseInt($(this).parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
}
else if ( $(this).parent()[0].tagName == 'A') {
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px'); $(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
}
$(this).css('margin-top',''); $(this).css('margin-top','');
} }
}
}); });
$('.item > div').each( function() { $('.item > div').each( function() {
if ($(this).css('float')=='left' || $(this).css('float')=='right') { if ($(this).css('float')=='left' || $(this).css('float')=='right') {
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2-15)+'px'); $(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2-15)+'px');
$(this).css('margin-left',''); $(this).css('margin-left','');
} }
else { else {
$(this).css('margin-left',(parseInt($(this).parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px'); $(this).css('margin-left',(parseInt($(this).parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top',''); $(this).css('margin-top','');
} }
}); });
$('.item > a > div').each( function() { $('.item > a > div').each( function() {
if ($(this).css('float')=='left' || $(this).css('float')=='right') { if ($(this).css('float')=='left' || $(this).css('float')=='right') {
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2-5)+'px'); $(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2-5)+'px');
$(this).css('margin-left',''); $(this).css('margin-left','');
} }
else { else {
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px'); $(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top',''); $(this).css('margin-top','');
} }
}); });
$(".graph:not([class~='noresizevc'])").each(function(){ $(".graph:not([class~='noresizevc'])").each(function(){