Mango reports no longer provides colors for individual sensors
-
It doesn't appear possible to assign a color to a sensor and see it in a report. All I get are black lines.
Produces
-
Hi mlavelle,
Is this in an email, or when viewing as HTML? The latest version of the Reports module is 2.2.2
The only change that makes sense to me to affect this is moving from the 1.0.14 JFree charts jar to the 1.0.19, but, I am using 1.0.19 and I am still able to select colors and draw them.
Are there any errors in your log when you run a report or open the page for a report instance?
-
I updated to 2.2.2 from 2.2.1 - no change - still no colors. But I also found that it isn't possible to save the colors for each point too. After selecting different colors, and saving the report, the next time the report is used the colors are all black again. Is this a licensing issue? In any case colors are not being saved with the report template so that is probably the fundamental problem.
There are no items pertaining to reports in the ma.log file.
Suggestions?
-
Can you verify your report is actually saving? You edited out the save confirmation from the first image! There are no functionality license restrictions on that module at all, and it is even open source https://github.com/infiniteautomation/ma-modules-public/tree/2.7.x/Reports
I would clear browser cache, delete Mango/work/jsp directory, and try again.
-
See the image below after saving:
After the report ran it looked like this:
I'm hesitant to erase the files is Mango/work/jsp directory. This looks like a directory with valuable files. Please advise.
I cleared browser cache before doing the chart save and running it again.
There is only one user with this system - superadmin. All files have ownership/group of pi/pi. Could this be a permissions problem?
-
The file in Mango/work/jsp are the compiled JSPs. Deleting this just forces your JSPs to be recompiled, which can slow down the first load of a page but a new compiled JSP will come into existence in the work directory.
It would surprise me greatly if permissions were to blame. Are you sure no log messages were triggered when you save or run a report? So, you can add a point to the report, and save it and that persists. But, if you change the color it does not go along with the save? All this data for a report template is serialized together in the same database table and always has been. This means either 1) that save confirmation isn't accurate, 2) the page is failing to read the values for the color inputs, or 3) there's a sneaky bug affecting only chart color. Does this happen on a completely new report, too?
The next thing to suspect would be the browser, but since the color feature is as old as the module it seems unlikely. Do any errors come into your browser's developer console during saving (typically, right click and inspect element to over developer tools)?
If you wish to test it being a permissions problem, and start Mango as root or it being a 1.0.19 jar issue, feel free.
-
I deleted mango/work/jsp and confirmed it was deleted. Logged out of Mango and logged back in. Edited a current report using different colors for each input. Did a save and saw the confirmation message. I ran the report and confirmed that all chart colors were black.
Switched to a second report then switched back to initial report. Found that all colors were black again. Ran the report graphics a second time - confirmed all colors were black.
To confirm: I can add a point to the chart and set a color. The point persists but the color does not.
Again created a new third report: added two points and changed color for each. Saved the report - saw confirmation saved message. Switched to previous report then switched back to new report: both points were there but, again, the colors were black.
Is there an editor I can use to inspect the H2 database?
-
You can use the SQL console built into Mango, or you can run up an H2 console with the relevant script in the Mango/bin directory.
But, all this data is going to be stored in one serialized field in the Reports table (as it always was, which will make a quest into the database somewhat tricky). Be sure to "select * from systemSettings where settingname='databaseSchemaVersion.reports';" expecting a value of 3. You can find definitions of the tables in Mango/web/modules/Reports/web/db