-
-
Notifications
You must be signed in to change notification settings - Fork 489
Report Module
Date | Apr 4 2014 | Contacts | Jose García |
Status | In Progress | Release | 2.12 |
Resources | Ticket # | ||
Source code | coming soon | ||
Funding | Ontario Ministry of Natural Resources (OMNR) |
This feature allows administrators to create the following reports in CSV format:
- Internal metadata records (metadata not published to group ALL).
- Updated metadata records during a period of time.
- File uploads to metadata records in a period of time.
- File downloads to metadata records in a period of time.
- Users access in a period of time.
New reports can be added in the system in the future.
A new AngularJS GnReportController
handles the reports UI and invocation of Java services to create the CSV files.
To download the CSV as a file with Ajax POST is not that immediate/intuitive. When the Java service(s) that create the reports returns the responses, some "magic" is required to force the browser to download as a file. See success
event in the following snippet:
$scope.createReport = function (formId, service) {
$http({
method: 'POST',
url: service,
data: $(formId).serialize(),
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
.success(function(data) {
var element = angular.element('<a/>');
element.attr({
href: 'data:attachment/csv;charset=utf-8,' + encodeURI(data),
target: '_blank',
download: service
})[0].click();
})
};
The User
domain class has been enhanced to track the last login user date.
A new Spring ApplicationListener
has been created to handle successful users login. The listener is configured in config-security-core.xml
<!-- Listener to log the last login date in the database -->
<bean class="org.fao.geonet.kernel.security.listener.UpdateTimestampListener" id="updateTimestampListener">
Metadata file upload and download services have been extended to track this information to create the related reports:
- User requesting the upload/download.
- File uploaded/downloaded.
- Date of upload/download.
- Type: Admin-UI
- Module: web-ui,domain,services,core
- Vote Proposed: TBA
- All
If you have some comments, start a discussion, raise an issue or use one of our other communication channels to talk to us.