Merge branch 'ent-13625-arreglar-como-mostramos-agente-e-ip-en-vista-de-traps' into 'develop'

Ent 13625 arreglar como mostramos agente e ip en vista de traps

See merge request artica/pandorafms!7317
This commit is contained in:
Diego Muñoz-Reja 2024-04-30 15:08:31 +00:00
commit f1d0f4acb7
4 changed files with 34 additions and 34 deletions

View File

@ -521,7 +521,7 @@ class SnmpConsole extends HTML
$legend .= '<div style=" display : flex;align-items : center;">';
$legend .= html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Delete');
$legend .= '</div>';
$legend .= '</div></div></td>';
$legend .= '</div></div></td></table>';
echo '<br>';
@ -778,11 +778,11 @@ class SnmpConsole extends HTML
// SNMP Agent.
$agent = agents_get_agent_with_ip($tmp->source);
if ($agent === false) {
$tmp->snmp_agent .= '<a class="'.$severity_class.' href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$tmp->source.'" title="'.__('Create agent').'">'.$tmp->source.'</a>';
$tmp->snmp_agent .= '<a class="'.$severity_class.'" href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$tmp->source.'" title="'.__('Create agent').'">'.$tmp->source.'</a>';
} else {
$tmp->snmp_agent .= '<div class="'.$severity_class.' snmp-div"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'" title="'.__('View agent details').'">';
$tmp->snmp_agent .= '<strong>'.$agent['alias'].ui_print_help_tip($tmp->source, true);
'</strong></a></div>';
$tmp->snmp_agent .= '<strong>'.$agent['alias'].'</strong></a>'.ui_print_help_tip($tmp->source, true);
'</div>';
}
// Enterprise string.

View File

@ -2948,14 +2948,14 @@ function ui_print_help_tip(
$text_title = (strlen($text) >= 60) ? substr($text, 0, 60).'...' : $text;
$id = random_int(1, 99999);
$output = '<div id="div_tip_'.$id.'" class="tip" style="'.$style.'" >';
$output = '<div id="div_tip_'.$id.'" class="tip" style="'.$style.'" onclick="open_tip('.$id.')">';
$output .= '<div id="tip_dialog_'.$id.'" class="invisible margin-15" data-title="'.__('Help').'"><span class="font_13px">'.io_safe_output($text).'</span></div>';
$output .= html_print_image(
$img,
true,
[
'title' => $text_title,
'class' => $blink === true ? 'blink' : '',
'title' => io_safe_output($text_title),
'class' => ($blink === true) ? 'blink' : '',
'style' => 'width: 16px; height: 16px;',
],
false,

View File

@ -2364,6 +2364,29 @@ var formatterDataVerticalBar = function(value, ctx) {
}
};
function open_tip(id) {
$("#tip_dialog_" + id).dialog({
title: $("#tip_dialog_" + id).data("title"),
modal: true,
maxWidth: 600,
minWidth: 400,
show: {
effect: "fade",
duration: 200
},
hide: {
effect: "fade",
duration: 200
},
closeOnEscape: true,
buttons: {
Close: function() {
$(this).dialog("close");
}
}
});
}
// Show about section
$(document).ready(function() {
$("[id^='icon_about']").click(function() {
@ -2457,33 +2480,6 @@ $(document).ready(function() {
});
}
}
$("[id^='div_tip_']").click(function() {
var id = $(this)
.attr("id")
.split("_")[2];
$("#tip_dialog_" + id).dialog({
title: $("#tip_dialog_" + id).data("title"),
modal: true,
maxWidth: 600,
minWidth: 400,
show: {
effect: "fade",
duration: 200
},
hide: {
effect: "fade",
duration: 200
},
closeOnEscape: true,
buttons: {
Close: function() {
$(this).dialog("close");
}
}
});
});
});
function close_info_box(id) {

View File

@ -3653,6 +3653,10 @@ div.tip > img {
margin-left: 10px;
}
div.tip > div.invisible {
display: none !important;
}
/*
* ---------------------------------------------------------------------
* - SEARCH BOX in header -