Skip to content

Commit

Permalink
Fixing #5792: Fixing Reporting from List View
Browse files Browse the repository at this point in the history
* Unable to add Graphs to a Report from Cacti List View
* QA: Show date correctly on schedule
  • Loading branch information
TheWitness committed Aug 8, 2024
1 parent 7e19256 commit 541cebc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Cacti CHANGELOG
-issue#5785: auth_changepassword.php triggers NS_ERROR_REDIRECT_LOOP if server's default IP address is not public
-issue#5790: Cactid - Cron out of sync with poller Message
-issue#5791: Unable to filter users by user group, or the last time they logged into Cacti
-issue#5792: Unable to add Graphs to a Report from Cacti List View
-feature#5784: Provide a means by which a user can track Cacti connections and disconnects from the php error_log
-feature#5796: Due to Conflicting Interpretations of TCP Ping, Introduce new Ping Method
-feature: Update jQueryUI to 1.14.0
Expand Down
11 changes: 6 additions & 5 deletions graph_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -1017,13 +1017,14 @@ function addReport() {

$(this).dialog('close');

strURL = 'graph_view.php?action=ajax_reports';
'&report_id=' + $('#report_id').val() +
'&timespan=' + $('#timespan').val() +
'&align=' + $('#align').val() +
strURL = 'graph_view.php?action=ajax_reports' +
'&header=false' +
'&report_id=' + $('#report_id').val() +
'&timespan=' + $('#timespan').val() +
'&align=' + $('#align').val() +
'&graph_list=' + $('#graph_list').val();

loadUrl({url:strURL})
loadUrl({url:strURL});
}
}
],
Expand Down
9 changes: 5 additions & 4 deletions lib/html_reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -1460,11 +1460,11 @@ function reports_edit() {
reports_tabs(get_request_var('id'));

if (isset($report['id'])) {
$report['mailtime'] = date(reports_date_time_format(), $report['mailtime']);
$header_label = __('[edit: %s]', $report['name']);
$report['mailtime'] = date('Y-m-d H:i', strtotime(date('Y-m-d H:i:00', $report['mailtime'])));
$header_label = __('[edit: %s]', $report['name']);
} else {
$report['mailtime'] = date(reports_date_time_format(), floor(time() / read_config_option('poller_interval')) * read_config_option('poller_interval'));
$header_label = __('[new]');
$report['mailtime'] = date('Y-m-d H:i', strtotime(date('Y-m-d H:i:00', floor(time() / read_config_option('poller_interval')) * read_config_option('poller_interval'))));
$header_label = __('[new]');
}

/* if there was an error on the form, display the date in the correct format */
Expand Down Expand Up @@ -1502,6 +1502,7 @@ function changeFormat() {
$('#mailtime').datetimepicker({
minuteGrid: 10,
stepMinute: 1,
showSecond: false,
showAnim: 'slideDown',
numberOfMonths: 1,
timeFormat: 'HH:mm',
Expand Down

0 comments on commit 541cebc

Please sign in to comment.