Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Take snmp_query_id into account when previewing Report Data Items
Browse files Browse the repository at this point in the history
  • Loading branch information
Hipska committed Oct 24, 2013
1 parent 5664891 commit f54c56f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions autom8_utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ function display_ds_list($rule) {
LEFT JOIN reportit_data_items AS rdi
ON( dtd.local_data_id = rdi.id AND rdi.report_id = %d )
JOIN data_local AS dl
ON( dl.id = dtd.local_data_id )
ON( dl.id = dtd.local_data_id AND dl.snmp_query_id = %d )
JOIN ' . $database_idquote . 'host' . $database_idquote .'
ON( host.id = dl.host_id )
JOIN host_template
ON ( host.host_template_id = host_template.id )
', $report['id'] );
', $report['id'], $rule['snmp_query_id'] );

// build SQL query SELECT part
$sql_select = '
Expand Down
8 changes: 4 additions & 4 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ function autom8reportit_data_source_action($selected_items){
LEFT JOIN reportit_data_items AS rdi
ON( dtd.local_data_id = rdi.id AND rdi.report_id = %d )
JOIN data_local AS dl
ON( dl.id = dtd.local_data_id )
ON( dl.id = dtd.local_data_id AND dl.snmp_query_id = %d )
JOIN ' . $database_idquote . 'host' . $database_idquote .'
ON( host.id = dl.host_id )
JOIN host_template
ON ( host.host_template_id = host_template.id )
', $report_rule['report_id'] );
', $report_rule['report_id'], $report_rule['snmp_query_id'] );

// build SQL query SELECT part
$sql_select = '
Expand Down Expand Up @@ -433,12 +433,12 @@ function autom8reportit_autorrdlist($report_settings){
LEFT JOIN reportit_data_items AS rdi
ON( dtd.local_data_id = rdi.id AND rdi.report_id = %d )
JOIN data_local AS dl
ON( dl.id = dtd.local_data_id )
ON( dl.id = dtd.local_data_id AND dl.snmp_query_id = %d )
JOIN ' . $database_idquote . 'host' . $database_idquote .'
ON( host.id = dl.host_id )
JOIN host_template
ON ( host.host_template_id = host_template.id )
', $report_rule['report_id'] );
', $report_rule['report_id'], $report_rule['snmp_query_id'] );

// build SQL query SELECT part
$sql_select = '
Expand Down

0 comments on commit f54c56f

Please sign in to comment.