This pull request will merge a file type visualization into the /adhoc query screen. It is a treemap graph representing the different file types and their quantities, so that it is a bit easier to grasp a database's contents at a glance.
When a database is selected from the dropdown, a new REST service is called that returns the list of file types, their count, and an RGB color code. The color is stable across all databases and all installations; the same root element name or non-XML file extensions will always be the same color no matter which database they're queried against because of a color hashing algorithm, providing visual consistency.
In this version, a remote version of highcharts is referenced, although it's certainly possible to host this file locally. I went through a couple iterations attempting to integrate the highcharts-ng bower package instead, but it requires several package version updates to core libraries (angular, angular-cookies, angular-resources) which require additional code modifications to the auth service that I wasn't comfortable making in this update.
It looks like it shows up defaulted to the Data-Explorer Content DB before anything is selected. It should probably be hidden until a selection is made.
Suggest disabling the highcharts watermark.
I don't think there is a big problem calling highcharts remotely given the circumstances, but it should be handled gracefully (if it isn't already). Probably just hiding the chart and disabling the functionality if the library can't be loaded.
The only real issue I see is the screen real-estate used. I'd like to see it below the search so the user action is still front and center.
If the chart is mean to be only a listing of all documents in the database, it should probably be hidden once a search is performed (which gives more space for the results).
Alternatively, if the chart should be applied to the search result counts as well (giving a count of each type within the scope of the user search), it can be shrunk down a bit to make room for search results.
This pull request will merge a file type visualization into the /adhoc query screen. It is a treemap graph representing the different file types and their quantities, so that it is a bit easier to grasp a database's contents at a glance.
When a database is selected from the dropdown, a new REST service is called that returns the list of file types, their count, and an RGB color code. The color is stable across all databases and all installations; the same root element name or non-XML file extensions will always be the same color no matter which database they're queried against because of a color hashing algorithm, providing visual consistency.
In this version, a remote version of highcharts is referenced, although it's certainly possible to host this file locally. I went through a couple iterations attempting to integrate the highcharts-ng bower package instead, but it requires several package version updates to core libraries (angular, angular-cookies, angular-resources) which require additional code modifications to the auth service that I wasn't comfortable making in this update.