jamf / scout-public

A tool to aggregate devices across multiple MDM servers
GNU General Public License v3.0
11 stars 3 forks source link

Issues when viewing report results (Query execution) #14

Closed jacobschultz closed 4 years ago

jacobschultz commented 5 years ago

Scout allows advanced reports to be created, viewed and edited for both computer and mobile devices. While they are saved as separate reports, the UI that they use is fundamentally the same. This means that bugs found in mobile device reports are likely found in computer reports as well. The database table that holds reports is called reports which holds general information about the reports, while reports_line_items stores information about each line item, in it's parent report. This table stores thing like the order in the report, criteria information, etc. All of the reporting information is pulled from a mongo database. This means that when you run a query in scout the report line items are grabbed from the database and translated into a mongo query that is then run against that database. This generated query is also debugged by the API and client because it can be error prone.

We have identified several issues when viewing report results that need to be fixed. All of the report client side code lives in /app/js/scripts.js.

Tasks:

  1. If a field returned by the mongo results is null, a datatables error is thrown even though the result of the report is loaded. Datatables is the table library used by the client side. This could be fixed by replacing null values with empty strings.

PR Ready When:

  1. The above issue is fixed and we can handle null results returned for certain results in the reporting UI.
alex-stout commented 4 years ago

@jacobschultz I'm testing this out and I'm not able to reproduce the issue. I'm running a query grabbing mobile devices with id > 4 which returns about 1,200 documents. The documents that are returned after running the query have no null attributes. They have empty strings as the placeholder for the empty values already.

jacobschultz commented 4 years ago

Closing this out unless we can get some more reproducible issues.