Skip to content

Commit

Permalink
fix #6072 (#6073)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmacan authored Jan 26, 2025
1 parent b17d3f3 commit 8ccb723
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
10 changes: 9 additions & 1 deletion graphs_new.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ function graphs() {
<span>" . __esc('Data Query [%s]', $snmp_query['name']) . "</span>
</div>
<div class='cactiTableButton'>
<span class='reloadquery fa fa-sync' id='reload" . $snmp_query['id'] . "' data-id='" . $snmp_query['id'] . "'></span>
<span class='reloadquery fa fa-sync' id='reload" . $snmp_query['id'] . "' title='" . __esc('Reload Query') . "' data-id='" . $snmp_query['id'] . "'></span>
</div>
</div>
</div>";
Expand Down Expand Up @@ -981,7 +981,15 @@ function graphs() {
}

if ($script != '') {
$script .= "$(function() {
$('[id^=\'reload\']').click(function(data) {
$(this).addClass('fa-spin');
loadUrl({url:'graphs_new.php?action=query_reload&id='+$(this).attr('data-id')+'&host_id='+$('#host_id').val()})
});
});";

$script .= "$('.default').click(function() { $.get('graphs_new.php?action=ajax_save&query=" . (isset($snmp_query['id']) ? $snmp_query['id']:'') . "'+'&item='+$(\".dqselect\").val()).fail(function(data) { getPresentHTTPError(data); });}); $('tr.notemplate').tooltip();</script>";

print $script;
}

Expand Down
14 changes: 7 additions & 7 deletions host.php
Original file line number Diff line number Diff line change
Expand Up @@ -992,14 +992,14 @@ function host_edit() {
<a id='dbghide' class='fa fa-times' href='#'><?php print __('Hide'); ?></a>
</span>
</div>
<table class='cactiTable' id='clipboardData<?php print $dbg_copy_uid; ?>'>
<tr class='tableRow'>
<td class='debug'>
<span><?php print debug_log_return('data_query'); ?></span>
</td>
</tr>
</table>
</div>
<table class='cactiTable' id='clipboardData<?php print $dbg_copy_uid; ?>'>
<tr class='tableRow'>
<td class='debug'>
<span><?php print debug_log_return('data_query'); ?></span>
</td>
</tr>
</table>
</div>
<?php
}
Expand Down

0 comments on commit 8ccb723

Please sign in to comment.