Cacti / plugin_reportit

ReportIt Plugin for Cacti
GNU General Public License v2.0
7 stars 9 forks source link

selecting data items, duplicates #17

Closed SergejLT closed 6 years ago

SergejLT commented 6 years ago

Created Report template added Additional Pre-filter to it and when creating new report from that template and selecting Data Items for the second time I see same data items wich i selected. And cant remove them there is no button to it. Only can delete report and create again.

geting lots of errors

2018/03/01 08:37:39 - CMDPHP ERROR: A DB Exec Failed!, Error: Duplicate entry '101084-3' for key 'primary_key'
2018/03/01 08:37:39 - DBCALL ERROR: A DB Exec Failed!, Error:1062, SQL:'INSERT INTO plugin_reportit_data_items (id, report_id) 
VALUES (101084 , '3'),(101085 , '3'),(101086 , '3'),(101087 , '3'),(101088 , '3'),(101089 , '3'),(101090 , '3'),(101091 , '3'),
(101092 , '3'),(101093 , '3'),(101094 , '3'),(101095 , '3'),(101097 , '3'),(101098 , '3'),(101099 , '3'),(101100 , '3'),(101101 , '3'),
(101103 , '3'),(101104 , '3'),(101105 , '3'),(101106 , '3'),(101107 , '3'),(101108 , '3'),(101109 , '3'),(101110 , '3'),(101111 , '3'),
(101112 , '3'),(101113 , '3'),(101114 , '3'),(101116 , '3'),(101117 , '3'),(101119 , '3'),(101120 , '3'),(101121 , '3'),(101122 , '3'),
(101123 , '3'),(101124 , '3'),(101125 , '3'),(101126 , '3'),(101127 , '3'),(101128 , '3'),(101129 , '3'),(101130 , '3'),(101131 , '3'),
(101132 , '3'),(101133 , '3'),(101134 , '3'),(101135 , '3'),(101136 , '3'),(101137 , '3'),(101138 , '3'),(101139 , '3'),(101140 , '3'),
(101143 , '3'),(101144 , '3'),(101145 , '3'),(101146 , '3'),(101147 , '3'),(101148 , '3'),(101149 , '3'),(101150 , '3'),(101151 , '3'),
(101152 , '3'),(101155 , '3'),(101156 , '3'),(101158 , '3'),(101159 , '3'),(101160 , '3'),(101161 , '3'),(101162 , '3'),(101164 , '3'),
(101165 , '3'),(101167 , '3'),(101169 , '3'),(101170 , '3'),(101172 , '3'),(101173 , '3'),(101174 , '3'),(101175 , '3'),(101177 , '3'),
(101178 , '3'),(101179 , '3'),(101180 , '3'),(101181 , '3'),(101182 , '3'),(101183 , '3'),(101184 , '3'),(101185 , '3'),(101188 , '3'),
(101189 , '3'),(101190 , '3'),(101191 , '3'),(101192 , '3'),(101193 , '3'),(101194 , '3'),(101195 , '3'),(101196 , '3'),(101197 , '3'),
(101199 , '3'),(101200 , '3')'
2018/03/01 08:37:39 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/items.php: 33 include_once)(/plugins/reportit/lib/const_items.php: 28 define)(CactiErrorHandler)(/lib/functions.php: 4482 cacti_debug_backtrace)
2018/03/01 08:37:39 - ERROR PHP NOTICE in Plugin 'reportit': Constant MAX_DISPLAY_PAGES already defined in file: /var/www/cacti/plugins/reportit/lib/const_items.php on line: 28
Carlimeunier commented 6 years ago

Hi, it looks like there is a badly positioned HTML tag. I'm working on it. I will provide a patch to fix that soon

netniV commented 6 years ago

Was a patch produced for this?

browniebraun commented 6 years ago

This has been fixed.