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

Add report thumbnails portlet #967

Merged
merged 4 commits into from
Jul 12, 2019

Conversation

mkzia
Copy link
Contributor

@mkzia mkzia commented Jun 20, 2019

Description

This PR adds a portlet for displaying thumbnails of charts from a report in the summary tab. The following files were added/updated.

  • Update buildReportFromTemplate function in classes/ReportTemplates/GenericReportTemplate.php to optionally accept report id suffix.
  • Update classes/Rest/Controllers/SummaryControllerProvider.php to add a new REST endpoint to return report based on user role.
  • Update classes/XDReportManager.php to accept user-specified start and end date for chart thumbnails
  • Update configuration/assets.json to include ReportThumbnailsPortlet
  • Update configuration/etl/etl.d/xdmod-migration-8_1_2-8_5_0.json to read templates and associated charts into staging tables and then copy the missing templates and charts to the production tables
  • Add configuration/etl/etl_action_defs.d/xdb/report-template-charts-staging.json to define the template-charts staging table action
  • Update configuration/etl/etl_action_defs.d/xdb/report-template-charts.json to add left join between the staging and production table
  • Add configuration/etl/etl_action_defs.d/xdb/report-templates-staging.json to define the report templates staging table action
  • Update configuration/etl/etl_action_defs.d/xdb/report-templates.json to add left join between the staging and production table
  • Update configuration/etl/etl_data.d/acls/report-template-acls-staging.json to include CD and CS report templates
  • Update configuration/etl/etl_data.d/xdb/report-templates.json to include new CD and CS reports.
  • Update configuration/etl/etl_data.d/xdb/report-template-charts.json to include details of the new CD and CS reports.
  • Add configuration/etl/etl_tables.d/xdb/report-template-charts-staging.json to define the template-charts staging table
  • Add configuration/etl/etl_tables.d/xdb/report-templates-staging.json to define the template staging table
  • Update html/controllers/report_builder/send_report.php to accept user-specified start and end date for PDF reports
  • Add html/gui/css/ReportThumbnailsPortlet.css to modify ReportThumbnailsPortlet look
  • Add html/gui/js/modules/summary/ReportThumbnailsPortlet.js -- contains the portlet definition
  • Update html/highchart_template.html to change NO DATA title for empty thumbnails to No data available for the criteria specified
  • Update tests/artifacts/xdmod/report_builder/output/cd_enum_templates.json to include new report templates
  • Update tests/artifacts/xdmod/report_builder/output/cs_enum_templates.json to include new report templates
  • Update tests/artifacts/xdmod/ui/output/reportGenerator.json to include a new template for the center director. Also set center staff report_templates_available to true to pass the integration tests. Setting to true should be safe to do because the center director test path checks the rest of the functionality.
  • Add tests/integration/lib/Rest/ReportThumbnailsTest.php which has some basic integration tests.
  • Update tests/ui/test/specs/xdmod/reportGenerator.js to properly access report templates since there are now more than one templates. Also add CD template.
  • Update tests/ui/test/specs/xdmod/reportGenerator.page.js to properly access report templates since there are now more than one templates

To enable, add the following to /etc/xdmod/roles.d/summary.json

{
    "+roles": {
        "+default": {
            "summary_portlets": [
                {
                    "name": "Report Thumbnails",
                    "type": "ReportThumbnailsPortlet",
                    "region": "top",
                    "config": {
                        "cd": "5 year",
                        "cs": "Previous year"
                    }
                }
            ]
        }
    }
}

Motivation and Context

Users need an easy way to get center snapshot. A portlet showing relevant chart thumbnails provides this snapshot.

Tests performed

Manually tested the code and added some simple integration tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mkzia mkzia force-pushed the add_report_thumbnail_portlet3 branch from b526407 to a309f28 Compare June 20, 2019 18:53
@mkzia mkzia requested a review from jpwhite4 June 20, 2019 21:12
jpwhite4
jpwhite4 previously approved these changes Jun 21, 2019
@jpwhite4 jpwhite4 added the Category:User Dashboard Screen shown after user login label Jul 11, 2019
@jpwhite4
Copy link
Member

Need to fix merge conflicts

@mkzia mkzia force-pushed the add_report_thumbnail_portlet3 branch from 1d2155c to 3e85479 Compare July 12, 2019 14:05
@mkzia mkzia force-pushed the add_report_thumbnail_portlet3 branch from f7d1c94 to 526c5bb Compare July 12, 2019 18:51
@mkzia mkzia force-pushed the add_report_thumbnail_portlet3 branch from 526c5bb to 7b15ac3 Compare July 12, 2019 18:57
@jpwhite4 jpwhite4 merged commit d55d9ad into ubccr:xdmod8.5 Jul 12, 2019
@jpwhite4 jpwhite4 added this to the 8.5.0 milestone Aug 5, 2019
@plessbd plessbd added the new feature New functionality label Oct 16, 2019
jpwhite4 added a commit to jpwhite4/xdmod that referenced this pull request Dec 5, 2019
The pull request ubccr#967 added extra code to the report manager that
manipulated the start and end times of charts in a report. This broke
the report generator. These changes appear to not be necessary at all
and must have been added by mistake.
jpwhite4 added a commit that referenced this pull request Dec 6, 2019
Revert XDReportManager changes from #967
jpwhite4 added a commit to jpwhite4/xdmod that referenced this pull request Jan 15, 2020
The pull request ubccr#967 added extra code to the report manager that
manipulated the start and end times of charts in a report. This broke
the report generator. These changes appear to not be necessary at all
and must have been added by mistake.
jtpalmer pushed a commit to jtpalmer/xdmod that referenced this pull request Sep 25, 2020
The pull request ubccr#967 added extra code to the report manager that
manipulated the start and end times of charts in a report. This broke
the report generator. These changes appear to not be necessary at all
and must have been added by mistake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:User Dashboard Screen shown after user login new feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants