Skip to content
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

feat: ILS usage graphs #91

Merged
merged 21 commits into from
Jul 23, 2024

Conversation

Chloe070196
Copy link

@Chloe070196 Chloe070196 commented Jul 23, 2024

Description

An Aspen admin can now view a usage graph and a raw data table for each of the variables included in the ILS Integration dashboard. This feature used to be limited to the System Reports dashboard, and it is now being extended.

Note: the implementation is based on the the System Reports existing usage graphs, and intends to mirror it where possible

Features:

  • The dashboard now includes links next to the title of each of its sections
  • Those links lead to the relevant Usage Graph page
  • The Usage Graph page contains both a graph and a raw data table
  • While the user is on a given ILS Integration Usage Graph page, the ILS Integration section on the left hand-side options menu remains open (active)

Test plan:

  • apply the patch
  • log in as an admin
  • navigate to Administration Settings > ILS Integration > Dashboard
  • click on the link displayed next to a section's header (title) and access the relevant Usage Graph page
  • notice that the data displayed matches the summary found on the dashboard

Adds a new UsageGraphs.php file in the services/ILS folder, and creates
the ILS_UsageGraphs class within it.
Adds a launch method to the ILSUsageGraph class
Determines which title is to be assigned to and displayed above the
graph based on which link was clicked, and therefor which stat valued
was passed as a query parameter.
Based on the stat value, determines whether the request will need to
target the ils_records_usage_table or the user_ils_usage table
Creates a new UserILSUsage instance which will be used to generate and
execute the qeuries allowing to fetch from the database the data to be
displayed in the graph. Also starts building the query (adding group by
month and year)
Based on the value of stat, adds the appropriate string to the query in
order to finish building the select statement which will allow for the
relevant data to be fetched from the database.
Fetches the data, and then assigns the result to the relevant property
of dataSeries, so that it can then be displayed to the user, both as a
graph and as a raw data table.
Creates a new ILSRecordUsage instance which will be used to generate and
execute the qeuries allowing to fetch from the database the data to be
displayed in the graph. Also starts building the query (adding group by
month and year)
Based on the value of stat, adds the appropriate string to the query in
order to finish building the select statement which will allow for the
relevant data to be fetched from the database.
Fetches the data, and then assigns the result to the relevant property
of dataSeries, so that it can then be displayed to the user, both as a
graph and as a raw data table.
Adds a getbreadcrumbs method to the ILS_UsageGraphs class, mirroring the
Admin_UsageGraph class.
Once the user has clicked a link, and navigated to the matching user
graph page, this allows the ILS Integration section in the search option
to remain open.
Check that the user has permission to view dashboards and system
reports. No specific ILS report permission is checked as of now. Mirrors
the permission checks for the ILS Integration Dashboard.
@AlexanderBlanchardAC
Copy link

Code looks really good and appears to be working as expected. One small thing, the graph icons in the Usage Dashboard are all evenly spaced after the header, however in the ILD dashboard, some of the headers have spaces between them and the icons and some don't.

Copy link

@AlexanderBlanchardAC AlexanderBlanchardAC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All evenly spaced now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants