-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Dashboard - Summary Statistics Portlet #930
Conversation
This adds a new portlet, `SummaryStatisticsPortlet`, to OpenXDMoD. It provides the same functionality as the summary statistics bar at the top of the old Summary page ( via `summary3.php` ). - The format of the statistics have been refactored out of `summary3.php` and into a configuration file that can be modified: `configuration/roles.d/summary_statistics.json`. - The portlet is made visible to users via: `configuration/roles.d/summary.json`
Added a new integration test to exercise the `summary/statistics` REST endpoint and the associated artifacts.
Missed one.
tests/artifacts/xdmod/controllers/output/get_statistics-cs.json
Outdated
Show resolved
Hide resolved
The changes to `SummaryControllerProviderTest.php` were needed to account for validating `float` data values differently then other values. Also updated the expected error message for start_date after end_date
tests/integration/lib/Controllers/SummaryControllerProviderTest.php
Outdated
Show resolved
Hide resolved
- Removed `DeveloperPortlet.js` as it shouldn't have been committed in the first place. - Moved `SummaryControllerProviderTest` & it's related test artifacts to the `rest` sub dir as opposed to `controllers`. - Updated comment @ the end of `SummaryStatisticsPortlet.js` to be correct. - re: returning 400's vs 500's. - Made sure that `BadRequestHttpException`'s are thrown where appropriate in `SummaryControllerProvider`.
Just pretty printing the test artifacts so that it's easier to see when something changes.
Just some simple reformatting.
240cd5e
to
e409576
Compare
The code I was thinkg of is in the |
We don't have any use cases for the `filters` parameter in this request. If we do eventually have one, we can come back and snag this code.
Needed some additional information to help track down statistic irregularities.
@jpwhite4 nod I checked out |
Just added a `checkDateRange` function that will throw a 400 if either date is not in the correct format or if the start date is after the end date. Also removed the previously added date validation in the `TimeAggregationUnit` code.
Updated the `checkDateRange` function to work like the date validation code that was previously added to `Query` as the diff'ing was waaaay easier this way. Also updated the expected output to account for the new error message.
Removed the unused `duration_change` listener as we no longer base our dates on the duration toolbar. Added documentation for the `formatDate` function.
The `getDateTime` function was no long returning a `DateTime` object but was instead returning a unix timestamp. The function name / variables created from this function have been renamed accordingly.
The `$tz` argument was for a previous iteration of the code so as it's not being used it is being removed.
Description
This PR refactors the hard coded Summary Statistics from the Summary tab to be config file driven and contained within a Novice User Portlet.
Motivation and Context
We want to be able to display these statistics using the new Novice User interface.
Tests performed
Integration Tests were added that exercise the new
summary/statistics
end point. They cover:Types of changes
Checklist: