├── .nvmrc ├── cdk ├── .nvmrc ├── .estlintignore ├── .npmignore ├── cdk.json ├── jest.config.js ├── .gitignore ├── README.md ├── bin │ └── pipeline.ts └── tsconfig.json ├── backend ├── .nvmrc ├── .estlintignore ├── .gitignore ├── src │ ├── lib │ │ ├── jsonschema │ │ │ ├── datasets │ │ │ │ ├── none.json │ │ │ │ └── metrics.json │ │ │ └── api │ │ │ │ └── RemoveUsers.json │ │ ├── errors │ │ │ └── index.ts │ │ ├── types │ │ │ └── express │ │ │ │ └── index.d.ts │ │ ├── api │ │ │ ├── middleware │ │ │ │ ├── cors-handler.ts │ │ │ │ ├── uri-error-handler.ts │ │ │ │ ├── parser-error-handler.ts │ │ │ │ ├── csp.ts │ │ │ │ ├── auth.ts │ │ │ │ └── __tests__ │ │ │ │ │ ├── parser-error-handler.test.ts │ │ │ │ │ ├── csp.test.ts │ │ │ │ │ └── auth.test.ts │ │ │ ├── ingest-api.ts │ │ │ ├── dataset-api.ts │ │ │ ├── user-api.ts │ │ │ ├── settings-api.ts │ │ │ ├── topicarea-api.ts │ │ │ └── public-api.ts │ │ ├── services │ │ │ └── logger.ts │ │ ├── models │ │ │ ├── homepage.ts │ │ │ ├── topicarea.ts │ │ │ ├── user.ts │ │ │ ├── dataset.ts │ │ │ └── auditlog.ts │ │ ├── repositories │ │ │ └── base.ts │ │ ├── controllers │ │ │ ├── auditlog-ctrl.ts │ │ │ └── __tests__ │ │ │ │ └── auditlog-ctrl.test.ts │ │ └── factories │ │ │ └── homepage-factory.ts │ ├── local │ │ └── server.ts │ └── lambda │ │ └── streams.ts ├── jest.config.js ├── tsconfig.json ├── postman │ └── Auth API Tests Environment.postman_environment.json └── .eslintrc.js ├── e2e-tests ├── .nvmrc ├── .gitignore ├── cypress │ ├── fixtures │ │ ├── sample_piechart.csv │ │ ├── samplebar.csv │ │ ├── table.csv │ │ ├── chart.csv │ │ └── chart_missing_header.csv │ ├── utils │ │ └── selectors.ts │ ├── pages │ │ ├── AdminHomepage.ts │ │ ├── PublicHomepage.ts │ │ ├── AddUsers.ts │ │ ├── ChangeUsersRole.ts │ │ ├── CreateTopicArea.ts │ │ ├── EditTopicArea.ts │ │ ├── EditTopicAreaLabel.ts │ │ └── PublishingGuidance.ts │ ├── plugins │ │ └── index.js │ └── support │ │ └── index.ts ├── tsconfig.json └── package.json ├── examples ├── .nvmrc ├── .estlintignore ├── .gitignore ├── dynamodboption.png ├── viewasoptions.png ├── resources │ ├── english │ │ └── files │ │ │ ├── 8765a857-9d1a-4a61-8633-e342181bff60.csv │ │ │ ├── a2b0c70e-951a-40a9-8a24-ba05abc05ff1.csv │ │ │ ├── 8765a857-9d1a-4a61-8633-e342181bff60.json │ │ │ ├── a2b0c70e-951a-40a9-8a24-ba05abc05ff1.json │ │ │ ├── 88dafb4e-9d08-4daf-b8bf-b9ee82bad75c.csv │ │ │ ├── 3a57b8ac-f108-494d-bcc0-fb948b79b3b0.csv │ │ │ ├── b629b374-9ffe-49fe-85a4-2363e2c21532.csv │ │ │ ├── 83c62f00-2eb8-411a-ace5-a6692a9dafaf.csv │ │ │ ├── 88dafb4e-9d08-4daf-b8bf-b9ee82bad75c.json │ │ │ ├── b629b374-9ffe-49fe-85a4-2363e2c21532.json │ │ │ ├── 83c62f00-2eb8-411a-ace5-a6692a9dafaf.json │ │ │ └── 5824d4b0-a64b-4e0d-be3e-126476e9ca7f.json │ ├── spanish │ │ └── files │ │ │ ├── 24428a15-c6ee-4e00-9609-efac5603e596.csv │ │ │ ├── 43ab1b2c-87b0-49d7-b4f0-3713e5c28f0b.csv │ │ │ ├── 688ec0bc-acf1-4ac2-9e86-7367f55e8fd7.csv │ │ │ ├── 94939686-5b80-4cbc-b0cf-b1717193a3c5.csv │ │ │ ├── 9d565e3e-ff59-4ab1-b33c-8ed0191b0c66.csv │ │ │ ├── cce3ef0b-074d-41d0-8782-00205aa41134.csv │ │ │ ├── 688ec0bc-acf1-4ac2-9e86-7367f55e8fd7.json │ │ │ ├── cce3ef0b-074d-41d0-8782-00205aa41134.json │ │ │ ├── 24428a15-c6ee-4e00-9609-efac5603e596.json │ │ │ ├── 94939686-5b80-4cbc-b0cf-b1717193a3c5.json │ │ │ ├── 9d565e3e-ff59-4ab1-b33c-8ed0191b0c66.json │ │ │ └── 86fc71c6-2b0a-4eaa-a8b5-8a7472289094.json │ └── portuguese │ │ └── files │ │ ├── 02885f77-6ad9-4d76-9a1e-294b6cbdca04.csv │ │ ├── 5bd53e58-571b-4b2b-b737-730f8435f7cc.csv │ │ ├── 980b249c-e8aa-4eb6-8049-bfc8b140e44b.csv │ │ ├── 9c2c525d-4f9c-4517-9b8a-11a368811874.csv │ │ ├── 9c2c525d-4f9c-4517-9b8a-11a368811874.json │ │ ├── d086ea04-b507-4386-aaf8-ca1ce344732a.csv │ │ ├── f09cf4af-61dc-4a92-a5f1-f6904f1f5258.csv │ │ ├── 5bd53e58-571b-4b2b-b737-730f8435f7cc.json │ │ ├── 02885f77-6ad9-4d76-9a1e-294b6cbdca04.json │ │ ├── f09cf4af-61dc-4a92-a5f1-f6904f1f5258.json │ │ ├── d086ea04-b507-4386-aaf8-ca1ce344732a.json │ │ └── 7db7112c-927c-45aa-8665-0b9b158d89ea.json ├── jest.config.js ├── src │ ├── common.ts │ ├── env.ts │ └── export.ts ├── tsconfig.json └── .eslintrc.js ├── frontend ├── .nvmrc ├── .env ├── src │ ├── layouts │ │ ├── Admin.scss │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── SAMLAuthenticator.test.tsx.snap │ │ │ │ └── Footer.test.tsx.snap │ │ │ ├── Footer.test.tsx │ │ │ ├── Settings.test.tsx │ │ │ ├── Public.test.tsx │ │ │ ├── Admin.test.tsx │ │ │ └── SAMLAuthenticator.test.tsx │ │ └── Settings.css │ ├── containers │ │ ├── AddMetric.css │ │ ├── EditMetric.scss │ │ ├── Home.scss │ │ ├── EditChart.css │ │ ├── EditTable.css │ │ ├── PublishedSiteSettings.css │ │ ├── PublishingGuidanceSettings.css │ │ ├── ViewDashboardAdmin.css │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── AlertContainer.test.tsx.snap │ │ │ │ ├── FourZeroFour.test.tsx.snap │ │ │ │ └── ContactUs.test.tsx.snap │ │ │ ├── ContactUs.test.tsx │ │ │ ├── APIHelpPage.test.tsx │ │ │ ├── FourZeroFour.test.tsx │ │ │ ├── ColorsHelpPage.test.tsx │ │ │ ├── AccessDenied.test.tsx │ │ │ ├── HomeWithSearch.test.tsx │ │ │ ├── Home.test.tsx │ │ │ ├── ViewDashboard.test.tsx │ │ │ ├── AlertContainer.test.tsx │ │ │ └── DashboardHistory.test.tsx │ │ └── FourZeroFour.tsx │ ├── components │ │ ├── ChooseData.module.scss │ │ ├── Link.scss │ │ ├── FileInput.css │ │ ├── DataTable.scss │ │ ├── WidgetTreeItem.module.scss │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── Page.test.tsx.snap │ │ │ │ ├── Logo.test.tsx.snap │ │ │ │ ├── PrimaryActionBar.test.tsx.snap │ │ │ │ ├── Header.test.tsx.snap │ │ │ │ ├── Legend.test.tsx.snap │ │ │ │ ├── SecondaryActionBar.test.tsx.snap │ │ │ │ ├── WidgetTreeSectionDivider.test.tsx.snap │ │ │ │ ├── Tab.test.tsx.snap │ │ │ │ └── Search.test.tsx.snap │ │ │ ├── Legend.test.tsx │ │ │ ├── Header.test.tsx │ │ │ ├── PrimaryActionBar.test.tsx │ │ │ ├── SecondaryActionBar.test.tsx │ │ │ ├── Logo.test.tsx │ │ │ ├── ShareButton.test.tsx │ │ │ ├── DatePicker.test.tsx │ │ │ ├── FriendlyURLInput.test.tsx │ │ │ ├── WidgetTreeSectionDivider.test.tsx │ │ │ ├── FileInput.test.tsx │ │ │ ├── Search.test.tsx │ │ │ ├── Accordion.test.tsx │ │ │ ├── Tooltip.test.tsx │ │ │ ├── Page.test.tsx │ │ │ ├── Combobox.test.tsx │ │ │ ├── MetricsWidget.test.tsx │ │ │ └── Tab.test.tsx │ │ ├── DatePicker.scss │ │ ├── Search.module.scss │ │ ├── RadioButtonsTile.module.scss │ │ ├── ShareButton.module.scss │ │ ├── MetricsList.css │ │ ├── TabVertical.module.scss │ │ ├── Tab.module.scss │ │ ├── WidgetRender.module.scss │ │ ├── Markdown.css │ │ ├── BarChartWidget.module.scss │ │ ├── LineChartWidget.module.scss │ │ ├── MarkdownRender.scss │ │ ├── Pagination.scss │ │ ├── Modal.css │ │ ├── Legend.tsx │ │ ├── StepIndicator.css │ │ ├── Spinner.tsx │ │ ├── Header.tsx │ │ ├── MarkdownRender.tsx │ │ ├── Page.tsx │ │ ├── DropdownMenu.css │ │ ├── PrimaryActionBar.tsx │ │ ├── WidgetTreeSectionDivider.tsx │ │ ├── Button.scss │ │ ├── SecondaryActionBar.tsx │ │ ├── Tooltip.tsx │ │ ├── TextWidget.tsx │ │ ├── Alert.tsx │ │ ├── Accordion.tsx │ │ └── Favicon.tsx │ ├── react-app-env.d.ts │ ├── types │ │ └── react-excel-renderer.d.ts │ ├── amplify-locales │ │ └── en │ │ │ └── translation.json │ ├── hooks │ │ ├── scrollup-hooks.ts │ │ ├── datetime-hooks.ts │ │ ├── background-hooks.ts │ │ ├── __tests__ │ │ │ ├── background-hooks.test.tsx │ │ │ ├── table-hooks.test.tsx │ │ │ ├── image-hooks.test.tsx │ │ │ ├── logo-hooks.test.tsx │ │ │ ├── dashboard-preview-hooks.test.tsx │ │ │ └── favicon-hooks.test.tsx │ │ ├── image-hooks.ts │ │ └── table-hooks.ts │ ├── styles │ │ ├── base.scss │ │ └── _settings.scss │ ├── services │ │ ├── FriendlyURLGenerator.ts │ │ └── __tests__ │ │ │ ├── RulerService.test.ts │ │ │ └── EnvConfig.test.ts │ ├── __tests__ │ │ └── App.test.tsx │ └── setupTests.ts ├── .viperlightrc ├── .estlintignore ├── public │ ├── robots.txt │ ├── samplecsv │ │ ├── EditColors-CSV-Column.csv │ │ ├── EditColors-CSV-Bar.csv │ │ ├── Example-CSV-Pie.csv │ │ ├── Example-CSV-Donut.csv │ │ ├── Example-CSV-Part-to-whole.csv │ │ ├── Example-CSV-Line.csv │ │ ├── Example-CSV-Bar.csv │ │ ├── Example-CSV-Table.csv │ │ └── Example-CSV-Column.csv │ ├── manifest.json │ └── images │ │ ├── publish-success.svg │ │ ├── image-content-item.svg │ │ ├── section-content-item.svg │ │ ├── image-scale-25.svg │ │ └── table-content-item.svg ├── .gitignore └── tsconfig.json ├── .prettierignore ├── .viperlightrc ├── CODEOWNERS ├── deployment ├── cdk-solution-helper │ ├── .gitignore │ ├── package.json │ └── package-lock.json └── run-unit-tests.sh ├── .husky ├── commit-msg ├── pre-commit └── post-merge ├── docs ├── user-guide.pdf ├── images │ ├── postman │ │ ├── import.png │ │ ├── jwt-token.png │ │ ├── apigateway-url.png │ │ ├── import-success.png │ │ ├── edit-collection.png │ │ ├── postman-request.png │ │ ├── apigateway-api-key.png │ │ └── collection-variables.png │ ├── Dashboard_Images.jpg │ ├── custom-homepage.png │ ├── protect-login-page.png │ └── installation │ │ ├── searchbar.png │ │ ├── create-user.png │ │ ├── launch-cft.png │ │ ├── stacks-created.png │ │ ├── topicarea-item.png │ │ ├── homepage-dynamodb.png │ │ ├── topicarea-dynamodb.png │ │ ├── uninstall-stack-error.png │ │ ├── append-topicarea-attribute.png │ │ ├── insert-topicarea-attribute.png │ │ ├── remove-topicarea-attribute.png │ │ ├── homepage-dynamodb-save-item.png │ │ └── homepage-dynamodb-text-view.png └── README.md ├── scripts ├── copyright-file-header.txt ├── parse-dependency.js └── copyright-notice-header.txt ├── .gitignore ├── CODE_OF_CONDUCT.md ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── documentation-improvements.md │ └── feature_request.md └── workflows │ ├── mainline-dev-unit-tests.yml │ ├── newpr-unit-tests.yml │ ├── pipeline-workflow.yml │ ├── mainline-unit-tests.yml │ ├── demo-workflow.yml │ ├── gamma-workflow.yml │ ├── pull-request-workflow.yml │ ├── newpr-code-style.yml │ └── mainline-dev-e2e-tests.yml ├── .hintrc ├── .prettierrc.js ├── check-license.sh ├── test.sh ├── install.sh ├── add-license.sh ├── solution-manifest.yaml ├── Config ├── SECURITY.md ├── generate-attributions.sh ├── package.json ├── release.sh ├── .viperlightignore └── sonar-project.properties /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/hydrogen -------------------------------------------------------------------------------- /cdk/.nvmrc: -------------------------------------------------------------------------------- 1 | lts/gallium -------------------------------------------------------------------------------- /backend/.nvmrc: -------------------------------------------------------------------------------- 1 | lts/hydrogen -------------------------------------------------------------------------------- /e2e-tests/.nvmrc: -------------------------------------------------------------------------------- 1 | lts/hydrogen -------------------------------------------------------------------------------- /examples/.nvmrc: -------------------------------------------------------------------------------- 1 | lts/hydrogen -------------------------------------------------------------------------------- /frontend/.nvmrc: -------------------------------------------------------------------------------- 1 | lts/hydrogen -------------------------------------------------------------------------------- /frontend/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=false -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | build 2 | cdk.out 3 | coverage 4 | node_modules -------------------------------------------------------------------------------- /backend/.estlintignore: -------------------------------------------------------------------------------- 1 | build 2 | coverage 3 | node_modules 4 | -------------------------------------------------------------------------------- /examples/.estlintignore: -------------------------------------------------------------------------------- 1 | build 2 | coverage 3 | node_modules 4 | -------------------------------------------------------------------------------- /.viperlightrc: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "failOn": "high" 4 | } 5 | -------------------------------------------------------------------------------- /cdk/.estlintignore: -------------------------------------------------------------------------------- 1 | build 2 | coverage 3 | node_modules 4 | cdk.out -------------------------------------------------------------------------------- /frontend/src/layouts/Admin.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base.scss"; 2 | -------------------------------------------------------------------------------- /backend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | .vscode/ 4 | coverage/ -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | .vscode/ 4 | coverage/ 5 | backend -------------------------------------------------------------------------------- /frontend/.viperlightrc: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "failOn": "critical" 4 | } 5 | -------------------------------------------------------------------------------- /frontend/src/containers/AddMetric.css: -------------------------------------------------------------------------------- 1 | .width-50 { 2 | width: 50% !important; 3 | } 4 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | 2 | * @drew-pecka @amuthana @DanielAWood @DanielleJOAMZN @chasechow7 @denisquesada -------------------------------------------------------------------------------- /deployment/cdk-solution-helper/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | .vscode/ 4 | coverage/ -------------------------------------------------------------------------------- /cdk/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /deployment/run-unit-tests.sh: -------------------------------------------------------------------------------- 1 | echo "chmod +x ../test.sh && ../test.sh" 2 | chmod +x ../test.sh && ../test.sh -------------------------------------------------------------------------------- /frontend/.estlintignore: -------------------------------------------------------------------------------- 1 | build 2 | cdk.out 3 | coverage 4 | node_modules 5 | .github 6 | .husky 7 | .vscode -------------------------------------------------------------------------------- /frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /frontend/public/samplecsv/EditColors-CSV-Column.csv: -------------------------------------------------------------------------------- 1 | XAxis,a,b,c,d,e,f,g,h 2 | Figure 1,55,90,60,110,140,70,80,57 -------------------------------------------------------------------------------- /e2e-tests/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | cypress.json 3 | cypress/screenshots 4 | cypress/downloads 5 | cypress/videos -------------------------------------------------------------------------------- /e2e-tests/cypress/fixtures/sample_piechart.csv: -------------------------------------------------------------------------------- 1 | Drink,Spent Per Year 2 | Coffee,4300 3 | Tea,5000 4 | Water,1020 5 | -------------------------------------------------------------------------------- /frontend/src/containers/EditMetric.scss: -------------------------------------------------------------------------------- 1 | .usa-checkbox { 2 | background-color: transparent !important; 3 | } 4 | -------------------------------------------------------------------------------- /frontend/src/containers/Home.scss: -------------------------------------------------------------------------------- 1 | .usa-search__submit-text { 2 | vertical-align: text-top !important; 3 | } 4 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit ${1} 5 | -------------------------------------------------------------------------------- /docs/user-guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/user-guide.pdf -------------------------------------------------------------------------------- /e2e-tests/cypress/fixtures/samplebar.csv: -------------------------------------------------------------------------------- 1 | Year,Target,Achieved 2 | "2,017",80,95 3 | "2,018",80,95 4 | "2,019",85,94 5 | -------------------------------------------------------------------------------- /e2e-tests/cypress/fixtures/table.csv: -------------------------------------------------------------------------------- 1 | Column 1,Column 2,Column 3,Column 4,Column 5 2 | Yes,33,12,15,18 3 | No,43,54,3,22 -------------------------------------------------------------------------------- /frontend/src/components/ChooseData.module.scss: -------------------------------------------------------------------------------- 1 | .vertCenter { 2 | margin-left: 24px; 3 | margin-top: 45%; 4 | } 5 | -------------------------------------------------------------------------------- /examples/dynamodboption.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/dynamodboption.png -------------------------------------------------------------------------------- /examples/viewasoptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/viewasoptions.png -------------------------------------------------------------------------------- /docs/images/postman/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/postman/import.png -------------------------------------------------------------------------------- /examples/resources/english/files/8765a857-9d1a-4a61-8633-e342181bff60.csv: -------------------------------------------------------------------------------- 1 | "Device","Usage" 2 | "Mobile","54" 3 | "Tablet","2" 4 | "Desktop","44" -------------------------------------------------------------------------------- /frontend/public/samplecsv/EditColors-CSV-Bar.csv: -------------------------------------------------------------------------------- 1 | Value,Figure 2 2 | 0-10,0.5 3 | 11-18,1.5 4 | 19-30,3 5 | 31-45,4 6 | 46-65,6 7 | 66+,9 -------------------------------------------------------------------------------- /cdk/cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "npx ts-node bin/main.ts", 3 | "context": { 4 | "aws-cdk:enableDiffNoFail": "true" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /docs/images/Dashboard_Images.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/Dashboard_Images.jpg -------------------------------------------------------------------------------- /docs/images/custom-homepage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/custom-homepage.png -------------------------------------------------------------------------------- /docs/images/postman/jwt-token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/postman/jwt-token.png -------------------------------------------------------------------------------- /frontend/src/containers/EditChart.css: -------------------------------------------------------------------------------- 1 | .margin-0-important { 2 | margin: 0 !important; 3 | } 4 | 5 | .tabSelector { 6 | height: 50px; 7 | } 8 | -------------------------------------------------------------------------------- /frontend/src/containers/EditTable.css: -------------------------------------------------------------------------------- 1 | .margin-0-important { 2 | margin: 0 !important; 3 | } 4 | 5 | .tabSelector { 6 | height: 50px; 7 | } 8 | -------------------------------------------------------------------------------- /docs/images/protect-login-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/protect-login-page.png -------------------------------------------------------------------------------- /frontend/src/components/Link.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | .action-link:visited { 4 | @include u-text("base-dark", "!important"); 5 | } 6 | -------------------------------------------------------------------------------- /docs/images/installation/searchbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/searchbar.png -------------------------------------------------------------------------------- /docs/images/postman/apigateway-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/postman/apigateway-url.png -------------------------------------------------------------------------------- /docs/images/postman/import-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/postman/import-success.png -------------------------------------------------------------------------------- /docs/images/installation/create-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/create-user.png -------------------------------------------------------------------------------- /docs/images/installation/launch-cft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/launch-cft.png -------------------------------------------------------------------------------- /docs/images/postman/edit-collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/postman/edit-collection.png -------------------------------------------------------------------------------- /docs/images/postman/postman-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/postman/postman-request.png -------------------------------------------------------------------------------- /frontend/src/components/FileInput.css: -------------------------------------------------------------------------------- 1 | .fileIcon { 2 | display: inline-block; 3 | height: 0%; 4 | vertical-align: middle; 5 | padding-left: 30%; 6 | } 7 | -------------------------------------------------------------------------------- /docs/images/installation/stacks-created.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/stacks-created.png -------------------------------------------------------------------------------- /docs/images/installation/topicarea-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/topicarea-item.png -------------------------------------------------------------------------------- /docs/images/postman/apigateway-api-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/postman/apigateway-api-key.png -------------------------------------------------------------------------------- /frontend/public/samplecsv/Example-CSV-Pie.csv: -------------------------------------------------------------------------------- 1 | Category,Amount 2 | Category A,28 3 | Category B,3 4 | Category C,10 5 | Category D,20 6 | Category E,16 7 | Category F,23 -------------------------------------------------------------------------------- /frontend/src/components/DataTable.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | [data-reach-menu-item][data-selected] a { 4 | color: color("white") !important; 5 | } 6 | -------------------------------------------------------------------------------- /docs/images/postman/collection-variables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/postman/collection-variables.png -------------------------------------------------------------------------------- /frontend/public/samplecsv/Example-CSV-Donut.csv: -------------------------------------------------------------------------------- 1 | Category,Amount 2 | Category A,28 3 | Category B,3 4 | Category C,10 5 | Category D,20 6 | Category E,16 7 | Category F,23 -------------------------------------------------------------------------------- /frontend/src/containers/PublishedSiteSettings.css: -------------------------------------------------------------------------------- 1 | .margin-top-2-important { 2 | margin-top: 16px !important; 3 | } 4 | 5 | .published-site p { 6 | margin: 0; 7 | } 8 | -------------------------------------------------------------------------------- /scripts/copyright-file-header.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /docs/images/installation/homepage-dynamodb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/homepage-dynamodb.png -------------------------------------------------------------------------------- /docs/images/installation/topicarea-dynamodb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/topicarea-dynamodb.png -------------------------------------------------------------------------------- /docs/images/installation/uninstall-stack-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/uninstall-stack-error.png -------------------------------------------------------------------------------- /frontend/public/samplecsv/Example-CSV-Part-to-whole.csv: -------------------------------------------------------------------------------- 1 | Category,Amount 2 | Category A,28 3 | Category B,3 4 | Category C,10 5 | Category D,20 6 | Category E,16 7 | Category F,23 -------------------------------------------------------------------------------- /frontend/src/containers/PublishingGuidanceSettings.css: -------------------------------------------------------------------------------- 1 | .margin-top-0-important { 2 | margin-top: 0 !important; 3 | } 4 | 5 | .publishing-guidance p { 6 | margin: 0; 7 | } 8 | -------------------------------------------------------------------------------- /cdk/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | roots: ["/test"], 3 | testMatch: ["**/*.test.ts"], 4 | transform: { 5 | "^.+\\.tsx?$": "ts-jest", 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /docs/images/installation/append-topicarea-attribute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/append-topicarea-attribute.png -------------------------------------------------------------------------------- /docs/images/installation/insert-topicarea-attribute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/insert-topicarea-attribute.png -------------------------------------------------------------------------------- /docs/images/installation/remove-topicarea-attribute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/remove-topicarea-attribute.png -------------------------------------------------------------------------------- /e2e-tests/cypress/fixtures/chart.csv: -------------------------------------------------------------------------------- 1 | Time,Series 1,Series 2,Series 3,Series 4,Series 5 2 | 1,2,1,30,6,12 3 | 2,4,2,10,4,10 4 | 3,6,3,15,5,8 5 | 4,8,4,5,6,6 6 | 5,10,5,20,4,4 7 | 6,12,6,5,5,2 -------------------------------------------------------------------------------- /frontend/src/components/WidgetTreeItem.module.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | .hide { 4 | opacity: 0; 5 | } 6 | 7 | .dropDisable { 8 | cursor: not-allowed; 9 | } 10 | -------------------------------------------------------------------------------- /docs/images/installation/homepage-dynamodb-save-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/homepage-dynamodb-save-item.png -------------------------------------------------------------------------------- /docs/images/installation/homepage-dynamodb-text-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/docs/images/installation/homepage-dynamodb-text-view.png -------------------------------------------------------------------------------- /examples/resources/english/files/a2b0c70e-951a-40a9-8a24-ba05abc05ff1.csv: -------------------------------------------------------------------------------- 1 | Energy Type,Percentage 2 | Actual Energy from Renewable Sources,32 3 | Actual Energy from Non-renewable Sources,68 4 | -------------------------------------------------------------------------------- /e2e-tests/cypress/fixtures/chart_missing_header.csv: -------------------------------------------------------------------------------- 1 | Time,,Series 2,Series 3,Series 4,Series 5 2 | 1,2,1,30,6,12 3 | 2,4,2,10,4,10 4 | 3,6,3,15,5,8 5 | 4,8,4,5,6,6 6 | 5,10,5,20,4,4 7 | 6,12,6,5,5,2 -------------------------------------------------------------------------------- /frontend/src/components/__tests__/__snapshots__/Page.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Page renders a page 1`] = ` 4 | 5 |
6 | 7 | `; 8 | -------------------------------------------------------------------------------- /frontend/public/samplecsv/Example-CSV-Line.csv: -------------------------------------------------------------------------------- 1 | Time,Series 1,Series 2,Series 3,Series 4,Series 5 2 | 1,2,1,30,6,12 3 | 2,4,2,10,4,10 4 | 3,6,3,15,5,8 5 | 4,8,4,5,6,6 6 | 5,10,5,20,4,4 7 | 6,12,6,5,5,2 -------------------------------------------------------------------------------- /frontend/src/containers/ViewDashboardAdmin.css: -------------------------------------------------------------------------------- 1 | .gradient { 2 | background: linear-gradient(rgba(239, 239, 239, 0.5), rgba(239, 239, 239, 0)); 3 | } 4 | 5 | .z-index-on-top { 6 | z-index: 99999; 7 | } 8 | -------------------------------------------------------------------------------- /frontend/src/containers/__tests__/__snapshots__/AlertContainer.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`displays nothing when no alert in location.state 1`] = `
`; 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | .DS_Store 3 | node_modules 4 | 5 | deployment/regional-s3-assets 6 | deployment/global-s3-assets 7 | deployment/staging 8 | deployment/open-source 9 | 10 | oss-attribution 11 | -------------------------------------------------------------------------------- /frontend/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | /// 7 | -------------------------------------------------------------------------------- /examples/resources/english/files/8765a857-9d1a-4a61-8633-e342181bff60.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "Device": "Mobile", "Usage": 54 }, 3 | { "Device": "Tablet", "Usage": 2 }, 4 | { "Device": "Desktop", "Usage": 44 } 5 | ] 6 | -------------------------------------------------------------------------------- /frontend/src/components/DatePicker.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | .react-datepicker__day--keyboard-selected, 4 | .react-datepicker__day--selected { 5 | @include u-bg("primary-dark", "!important"); 6 | } 7 | -------------------------------------------------------------------------------- /examples/resources/spanish/files/24428a15-c6ee-4e00-9609-efac5603e596.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/spanish/files/24428a15-c6ee-4e00-9609-efac5603e596.csv -------------------------------------------------------------------------------- /examples/resources/spanish/files/43ab1b2c-87b0-49d7-b4f0-3713e5c28f0b.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/spanish/files/43ab1b2c-87b0-49d7-b4f0-3713e5c28f0b.csv -------------------------------------------------------------------------------- /examples/resources/spanish/files/688ec0bc-acf1-4ac2-9e86-7367f55e8fd7.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/spanish/files/688ec0bc-acf1-4ac2-9e86-7367f55e8fd7.csv -------------------------------------------------------------------------------- /examples/resources/spanish/files/94939686-5b80-4cbc-b0cf-b1717193a3c5.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/spanish/files/94939686-5b80-4cbc-b0cf-b1717193a3c5.csv -------------------------------------------------------------------------------- /examples/resources/spanish/files/9d565e3e-ff59-4ab1-b33c-8ed0191b0c66.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/spanish/files/9d565e3e-ff59-4ab1-b33c-8ed0191b0c66.csv -------------------------------------------------------------------------------- /examples/resources/spanish/files/cce3ef0b-074d-41d0-8782-00205aa41134.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/spanish/files/cce3ef0b-074d-41d0-8782-00205aa41134.csv -------------------------------------------------------------------------------- /frontend/public/samplecsv/Example-CSV-Bar.csv: -------------------------------------------------------------------------------- 1 | Year,Series 1,Series 2 2 | 2010,2,1 3 | 2011,4,2 4 | 2012,6,3 5 | 2013,8,4 6 | 2014,10,5 7 | 2015,12,6 8 | 2016,10,7 9 | 2017,8,8 10 | 2018,6,9 11 | 2019,4,10 12 | 2020,2,11 -------------------------------------------------------------------------------- /frontend/src/types/react-excel-renderer.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | declare module "react-excel-renderer"; 7 | -------------------------------------------------------------------------------- /examples/resources/portuguese/files/02885f77-6ad9-4d76-9a1e-294b6cbdca04.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/portuguese/files/02885f77-6ad9-4d76-9a1e-294b6cbdca04.csv -------------------------------------------------------------------------------- /examples/resources/portuguese/files/5bd53e58-571b-4b2b-b737-730f8435f7cc.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/portuguese/files/5bd53e58-571b-4b2b-b737-730f8435f7cc.csv -------------------------------------------------------------------------------- /examples/resources/portuguese/files/980b249c-e8aa-4eb6-8049-bfc8b140e44b.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/portuguese/files/980b249c-e8aa-4eb6-8049-bfc8b140e44b.csv -------------------------------------------------------------------------------- /examples/resources/portuguese/files/9c2c525d-4f9c-4517-9b8a-11a368811874.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/portuguese/files/9c2c525d-4f9c-4517-9b8a-11a368811874.csv -------------------------------------------------------------------------------- /examples/resources/portuguese/files/9c2c525d-4f9c-4517-9b8a-11a368811874.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "Dispositivo": "Móvel", " Uso": 54 }, 3 | { "Dispositivo": "Tablet", " Uso": 2 }, 4 | { "Dispositivo": "Desktop", " Uso": 44 } 5 | ] 6 | -------------------------------------------------------------------------------- /examples/resources/portuguese/files/d086ea04-b507-4386-aaf8-ca1ce344732a.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/portuguese/files/d086ea04-b507-4386-aaf8-ca1ce344732a.csv -------------------------------------------------------------------------------- /examples/resources/portuguese/files/f09cf4af-61dc-4a92-a5f1-f6904f1f5258.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions/performance-dashboard-on-aws/mainline/examples/resources/portuguese/files/f09cf4af-61dc-4a92-a5f1-f6904f1f5258.csv -------------------------------------------------------------------------------- /frontend/public/samplecsv/Example-CSV-Table.csv: -------------------------------------------------------------------------------- 1 | Variable,Column 1,Column 2,Column 3,Column 4,Column 5 2 | Row 1,2,1,30,6,12 3 | Row 2,4,2,10,4,10 4 | Row 3,6,3,15,5,8 5 | Row 4,8,4,5,6,6 6 | Row 5,10,5,20,4,4 7 | Row 6,12,6,5,5,2 -------------------------------------------------------------------------------- /frontend/public/samplecsv/Example-CSV-Column.csv: -------------------------------------------------------------------------------- 1 | Year,Series 1,Series 2 2 | 2010,2,1 3 | 2011,4,2 4 | 2012,6,3 5 | 2013,8,4 6 | 2014,10,5 7 | 2015,12,6 8 | 2016,10,7 9 | 2017,8,8 10 | 2018,6,9 11 | 2019,4,10 12 | 2020,2,11 -------------------------------------------------------------------------------- /examples/resources/spanish/files/688ec0bc-acf1-4ac2-9e86-7367f55e8fd7.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "Dispositivo": "Móvil", "Uso": 54 }, 3 | { "Dispositivo": "Tableta", "Uso": 2 }, 4 | { "Dispositivo": "Computadora de escritorio", "Uso": 44 } 5 | ] 6 | -------------------------------------------------------------------------------- /backend/src/lib/jsonschema/datasets/none.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema#", 3 | "$comment": "For Datasets that do not have a defined schema", 4 | "type": "array", 5 | "items": { 6 | "type": "object" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "PerformanceDash", 3 | "name": "Performance Dashboard on AWS", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "theme_color": "#000000", 7 | "background_color": "#ffffff" 8 | } 9 | -------------------------------------------------------------------------------- /frontend/src/components/Search.module.scss: -------------------------------------------------------------------------------- 1 | @import "../index.scss"; 2 | 3 | .small { 4 | height: 37px !important; 5 | } 6 | 7 | .smallwide { 8 | width: 260px !important; 9 | } 10 | 11 | .bigwide { 12 | width: 100% !important; 13 | } 14 | -------------------------------------------------------------------------------- /frontend/src/amplify-locales/en/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "INVALID_USERNAME_PASSWORD": "Invalid username or password", 3 | "PASSWORD_REQUIREMENTS": "Password cannot start or end with whitespace and must contains at least 2 non-whitespace characters" 4 | } 5 | -------------------------------------------------------------------------------- /cdk/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !scripts/*.js 3 | !jest.config.js 4 | *.d.ts 5 | node_modules 6 | .DS_Store 7 | # CDK asset staging directory 8 | .cdk.staging 9 | cdk.out 10 | outputs-*.json 11 | 12 | # Parcel build directories 13 | .cache 14 | .build 15 | build/ 16 | -------------------------------------------------------------------------------- /examples/resources/english/files/a2b0c70e-951a-40a9-8a24-ba05abc05ff1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "Energy Type": "Actual Energy from Renewable Sources", "Percentage": 32 }, 3 | { 4 | "Energy Type": "Actual Energy from Non-renewable Sources", 5 | "Percentage": 68 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /frontend/src/components/RadioButtonsTile.module.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | .radio { 4 | &:hover, 5 | &:active, 6 | &:checked { 7 | & + [class*="__label"] { 8 | @include u-bg("blue-5v", "!important"); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /frontend/src/components/ShareButton.module.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | .anchor { 4 | display: block; 5 | position: relative; 6 | top: -125px; 7 | visibility: hidden; 8 | } 9 | 10 | .shareButton { 11 | @include u-text("base", "!important"); 12 | } 13 | -------------------------------------------------------------------------------- /e2e-tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress", "@testing-library/cypress", "cypress-file-upload"], 6 | "baseUrl": "cypress" 7 | }, 8 | "include": ["**/*.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /examples/resources/english/files/88dafb4e-9d08-4daf-b8bf-b9ee82bad75c.csv: -------------------------------------------------------------------------------- 1 | "Programming","Registrants","Attendees" 2 | "Health and Wellness","5600","5380" 3 | "Technology","6525","6450" 4 | "Literacy and Learning","6820","6600" 5 | "Games","4900","3500" 6 | "Discussion and Lecture","5300","4750" -------------------------------------------------------------------------------- /frontend/src/components/MetricsList.css: -------------------------------------------------------------------------------- 1 | .text-overflow-ellipsis { 2 | text-overflow: ellipsis; 3 | } 4 | 5 | .font-important { 6 | font-size: 100% !important; 7 | line-height: 1.15 !important; 8 | } 9 | 10 | .margin-top-0-important { 11 | margin-top: 0 !important; 12 | } 13 | -------------------------------------------------------------------------------- /frontend/src/components/__tests__/__snapshots__/Logo.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders a logo 1`] = ` 4 |
5 | Organization logo 10 |
11 | `; 12 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | ./add-license.sh 5 | ./generate-attributions.sh 6 | ./check-license.sh 7 | 8 | pushd backend && npm run lint-src && popd 9 | pushd frontend && npm run lint-src && popd 10 | pushd cdk && npm run lint-src && popd 11 | -------------------------------------------------------------------------------- /examples/resources/english/files/3a57b8ac-f108-494d-bcc0-fb948b79b3b0.csv: -------------------------------------------------------------------------------- 1 | Month,User Satisfaction (Online),User Satisfaction (In Person) 2 | 1-Mar,73,64 3 | 1-Apr,70,66 4 | 1-May,72,62 5 | 1-Jun,80,67 6 | 1-Jul,81,68 7 | 1-Aug,78,68 8 | 1-Sep,86,72 9 | 1-Oct,82,70 10 | 1-Nov,93,61 11 | 1-Dec,94,61 -------------------------------------------------------------------------------- /cdk/README.md: -------------------------------------------------------------------------------- 1 | # CDK Deployment Package 2 | 3 | This is the CDK source code for deploying Performance Dashboard on AWS. It defines the infrastructure for the Frontend, Backend and Authentication components of the project. Please refer to the deployment instructions in the README file to properly deploy the project. 4 | -------------------------------------------------------------------------------- /examples/resources/english/files/b629b374-9ffe-49fe-85a4-2363e2c21532.csv: -------------------------------------------------------------------------------- 1 | Incident Type,Incident Total 2 | Overdose,157 3 | Breathing Problem,301 4 | Injury Accident,380 5 | Unknown Injury/Accident,380 6 | Fainting,412 7 | Fire Assist,618 8 | Fire Alarm,796 9 | Sick,947 10 | Fall,1016 11 | Medical,2331 -------------------------------------------------------------------------------- /frontend/src/components/TabVertical.module.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base.scss"; 2 | 3 | .tab { 4 | @include u-text("base", "!important"); 5 | cursor: pointer; 6 | background-color: transparent !important; 7 | 8 | &:hover { 9 | @include u-text("base-dark", "!important"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/resources/portuguese/files/5bd53e58-571b-4b2b-b737-730f8435f7cc.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Tipo de energia": "Energia real de fontes não renováveis", 4 | " Percentual": 32 5 | }, 6 | { 7 | "Tipo de energia": "Energia real de fontes renováveis", 8 | " Percentual": 68 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /examples/resources/spanish/files/cce3ef0b-074d-41d0-8782-00205aa41134.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Tipo de energía": "Energía real de fuentes no renovables", 4 | " Porcentaje": 32 5 | }, 6 | { 7 | "Tipo de energía": "Energía real de fuentes renovables ", 8 | " Porcentaje": 68 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | 3 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 4 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 5 | opensource-codeofconduct@amazon.com with any additional questions or comments. 6 | -------------------------------------------------------------------------------- /frontend/src/components/Tab.module.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | .tab { 4 | @include u-text("base", "!important"); 5 | cursor: pointer; 6 | background-color: transparent !important; 7 | white-space: nowrap; 8 | 9 | &:hover { 10 | @include u-text("base-dark", "!important"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /frontend/src/components/WidgetRender.module.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | .widgetContainer { 4 | position: relative; 5 | margin: -2px -20px -20px -20px; 6 | padding: 2px 20px 20px 20px; 7 | 8 | &:hover { 9 | box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.14); 10 | border-radius: 8px; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /backend/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "ts-jest", 3 | testEnvironment: "node", 4 | roots: ["/src"], 5 | coverageThreshold: { 6 | global: { 7 | branches: 80, 8 | functions: 80, 9 | lines: 80, 10 | statements: 80, 11 | }, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /backend/src/local/server.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import api from "../lib/api"; 7 | 8 | /** 9 | * Start local server 10 | */ 11 | const port = 8080; 12 | api.listen(port); 13 | 14 | console.log(`Listening on port ${port}`); 15 | -------------------------------------------------------------------------------- /examples/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "ts-jest", 3 | testEnvironment: "node", 4 | roots: ["/src"], 5 | coverageThreshold: { 6 | global: { 7 | branches: 70, 8 | functions: 80, 9 | lines: 80, 10 | statements: 80, 11 | }, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /frontend/src/components/Markdown.css: -------------------------------------------------------------------------------- 1 | textarea { 2 | resize: none !important; 3 | margin-top: 1rem !important; 4 | } 5 | 6 | .markdown-box { 7 | border: 5px solid rgb(50, 140, 252); 8 | border-radius: 2px; 9 | margin-top: 1rem; 10 | font-weight: 400; 11 | overflow: auto; 12 | } 13 | 14 | .markdown-box p { 15 | margin: 5px; 16 | } 17 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | Describe your changes. 4 | 5 | ## Testing 6 | 7 | Describe how you tested your changes and/or give instructions to the reviewers on how they can verify them. 8 | 9 | --- 10 | 11 | By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. 12 | -------------------------------------------------------------------------------- /.hintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "development" 4 | ], 5 | "hints": { 6 | "compat-api/css": [ 7 | "default", 8 | { 9 | "ignore": [ 10 | "color: color(\"base-dark\", \"!important\")", 11 | "color: color(\"gray-cool-70\")", 12 | "color: color(\"white\")" 13 | ] 14 | } 15 | ] 16 | } 17 | } -------------------------------------------------------------------------------- /backend/src/lib/errors/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | export class ItemNotFound extends Error {} 7 | export class InvalidState extends Error {} 8 | export class InvalidDatasetContent extends Error {} 9 | export class InvalidFriendlyURL extends Error {} 10 | -------------------------------------------------------------------------------- /backend/src/lib/types/express/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import { User } from "../../models/user"; 7 | 8 | declare global { 9 | namespace Express { 10 | interface Request { 11 | user: User; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/resources/english/files/83c62f00-2eb8-411a-ace5-a6692a9dafaf.csv: -------------------------------------------------------------------------------- 1 | "Year","District","State Average" 2 | "2009","21.4","20.8" 3 | "2010","20.2","21" 4 | "2011","20.4","21.1" 5 | "2012","20.9","21" 6 | "2013","21.4","21.2" 7 | "2014","21.5","21.4" 8 | "2015","22.2","21.2" 9 | "2016","24.1","21.1" 10 | "2017","23.1","20.2" 11 | "2018","20","20" 12 | "2019","19.4","21.9" -------------------------------------------------------------------------------- /e2e-tests/cypress/utils/selectors.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | /** 7 | * This contains common selectors that are used 8 | * across pages. For example for the NavBar menu. 9 | */ 10 | 11 | export default { 12 | navBar: "nav[aria-label='Primary navigation']", 13 | }; 14 | -------------------------------------------------------------------------------- /backend/src/lib/api/middleware/cors-handler.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import cors from "cors"; 7 | 8 | const corsOrigin = process.env.CORS_ORIGIN ?? "*"; 9 | 10 | export const corsProtection = cors({ 11 | origin: corsOrigin.split(","), 12 | credentials: true, 13 | }); 14 | -------------------------------------------------------------------------------- /backend/src/lib/services/logger.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import pino from "pino"; 7 | 8 | const logLevel = process.env.LOG_LEVEL || "info"; 9 | const logger = pino({ 10 | level: logLevel.toLocaleLowerCase(), 11 | base: null, 12 | }); 13 | 14 | export default logger; 15 | -------------------------------------------------------------------------------- /frontend/src/components/__tests__/__snapshots__/PrimaryActionBar.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders a primary action bar 1`] = ` 4 |
5 |
8 |

9 | Test 10 |

11 |
12 |
13 | `; 14 | -------------------------------------------------------------------------------- /frontend/src/components/BarChartWidget.module.scss: -------------------------------------------------------------------------------- 1 | .barChart { 2 | & > div:first-child { 3 | & > div:nth-child(2) { 4 | & > div:nth-child(2) { 5 | & > div:first-child { 6 | & > div:first-child { 7 | max-height: 300px; 8 | } 9 | } 10 | } 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 100, 3 | tabWidth: 2, 4 | singleQuote: false, 5 | semi: true, 6 | trailingComma: "all", 7 | arrowParens: "always", 8 | overrides: [ 9 | { 10 | files: "*.{js,jsx,tsx,ts,scss,json,html}", 11 | options: { 12 | tabWidth: 4, 13 | }, 14 | }, 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /e2e-tests/cypress/pages/AdminHomepage.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | class AdminHomepage { 7 | constructor() { 8 | cy.contains("Dashboards"); 9 | cy.contains("Manage users"); 10 | cy.contains("Settings"); 11 | } 12 | } 13 | 14 | export default AdminHomepage; 15 | -------------------------------------------------------------------------------- /frontend/src/layouts/__tests__/__snapshots__/SAMLAuthenticator.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`SAMLAuthenticatorLayout renders the component 1`] = ` 4 |
5 | 6 | 7 | 10 | 11 | 12 |
13 | `; 14 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | # Env variables 23 | public/env.js 24 | public/env*.js -------------------------------------------------------------------------------- /frontend/src/components/__tests__/__snapshots__/Header.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders a header 1`] = ` 4 |
5 | 14 |
15 | `; 16 | -------------------------------------------------------------------------------- /backend/src/lib/jsonschema/api/RemoveUsers.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema#", 3 | "$comment": "Request object for the RemoveUsers endpoint", 4 | "type": "object", 5 | "properties": { 6 | "usernames": { 7 | "type": "array", 8 | "items": { 9 | "type": "string" 10 | } 11 | } 12 | }, 13 | "required": ["usernames"] 14 | } 15 | -------------------------------------------------------------------------------- /frontend/src/components/LineChartWidget.module.scss: -------------------------------------------------------------------------------- 1 | svg[role="application"] { 2 | > g[role="group"]{ 3 | > g[role="group"]{ 4 | @for $i from 1 through 10 { 5 | & > g[role="group"]:nth-child(#{$i}) { 6 | > path { 7 | stroke-dasharray:#{($i - 1)*5} #{($i - 1)*5}; 8 | } 9 | } 10 | } 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /frontend/src/components/__tests__/__snapshots__/Legend.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders the legend 1`] = ` 4 |
5 | 8 | 14 | 15 |
16 | `; 17 | -------------------------------------------------------------------------------- /frontend/src/components/__tests__/Legend.test.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import { render } from "@testing-library/react"; 7 | import RenderLegendText from "../Legend"; 8 | 9 | test("renders the legend", async () => { 10 | const wrapper = render(RenderLegendText("Legend", { color: "red" })); 11 | expect(wrapper.container).toMatchSnapshot(); 12 | }); 13 | -------------------------------------------------------------------------------- /backend/src/lib/models/homepage.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | export interface Homepage { 7 | title: string; 8 | description: string; 9 | updatedAt: Date; 10 | } 11 | 12 | export interface HomepageItem { 13 | pk: string; 14 | sk: string; 15 | type: string; 16 | updatedAt?: string; 17 | title: string; 18 | description: string; 19 | } 20 | -------------------------------------------------------------------------------- /cdk/bin/pipeline.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import "source-map-support/register"; 3 | import * as cdk from "aws-cdk-lib"; 4 | import { PipelineStack } from "../lib/pipeline-stack"; 5 | 6 | const app = new cdk.App(); 7 | 8 | new PipelineStack(app, "Pipeline", { 9 | stackName: "PerformanceDash-Pipeline", 10 | githubOrg: "aws-solutions", 11 | repoName: "performance-dashboard-on-aws", 12 | branch: "mainline", 13 | environment: "uat", 14 | secure: true, 15 | }); 16 | -------------------------------------------------------------------------------- /check-license.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | license="MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,CC0-1.0,CC-BY-4.0 AND MIT,CC-BY-4.0,MPL-2.0,Unlicense,EPL-1.0,UNLICENSED,(MIT AND Zlib),Zlib,WTFPL,Python-2.0" 3 | dirs="backend cdk e2e-tests examples frontend" 4 | for d in $dirs; do 5 | echo "$d" 6 | pushd $d 7 | if [ -f ./package.json ]; then 8 | echo "checking licenses in $d" 9 | license-checker --production --exclude "$license" 10 | fi 11 | popd 12 | done 13 | -------------------------------------------------------------------------------- /frontend/src/components/__tests__/__snapshots__/SecondaryActionBar.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders a secondary action bar 1`] = ` 4 |
5 |
9 |

10 | Test 11 |

12 |
13 |
14 | `; 15 | -------------------------------------------------------------------------------- /frontend/src/components/MarkdownRender.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base"; 2 | 3 | .Markdown a { 4 | @include u-text("base", "!important"); 5 | } 6 | 7 | .Markdown a:hover { 8 | @include u-text("base-dark", "!important"); 9 | } 10 | 11 | .Markdown a:active { 12 | @include u-text("base-darker", "!important"); 13 | } 14 | 15 | .Markdown a:visited { 16 | @include u-text("base-light", "!important"); 17 | } 18 | 19 | .textOrSummary p { 20 | max-width: 100ex !important; 21 | } 22 | -------------------------------------------------------------------------------- /deployment/cdk-solution-helper/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-solution-helper", 3 | "license": "Apache-2.0", 4 | "version": "0.1.0", 5 | "description": "A lightweight helper function that cleans-up synthesized templates from the AWS Cloud Development Kit (CDK) and prepares them for use with the AWS Solutions publishing pipeline.", 6 | "devDependencies": { 7 | "fs": "0.0.1-security" 8 | }, 9 | "dependencies": { 10 | "fs": "0.0.1-security" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /backend/src/lib/models/topicarea.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | export interface TopicArea { 7 | id: string; 8 | name: string; 9 | createdBy: string; 10 | dashboardCount?: number; 11 | } 12 | 13 | export type TopicAreaList = Array; 14 | 15 | export interface TopicAreaItem { 16 | pk: string; 17 | sk: string; 18 | type: string; 19 | name: string; 20 | createdBy: string; 21 | } 22 | -------------------------------------------------------------------------------- /test.sh: -------------------------------------------------------------------------------- 1 | # Runs unit tests for all 3 packages. 2 | 3 | # 4 | # Backend 5 | # 6 | cd backend 7 | echo "Running backend unit tests" 8 | npm run test:ci # Avoid interactive mode on tests 9 | if [ $? -eq 1 ] 10 | then 11 | echo "Backend tests failed" 12 | exit 1 13 | fi 14 | cd .. 15 | 16 | # 17 | # Frontend 18 | # 19 | cd frontend 20 | echo "Running frontend unit tests" 21 | CI=true npm run test:ci # Avoid interactive mode on tests 22 | if [ $? -eq 1 ] 23 | then 24 | echo "Frontend tests failed" 25 | exit 1 26 | fi 27 | cd .. 28 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | npm i 2 | 3 | # 4 | # Backend 5 | # 6 | cd backend 7 | echo "npm install on backend" 8 | npm i $@ 9 | cd .. 10 | 11 | # 12 | # Frontend 13 | # 14 | cd frontend 15 | echo "npm install on frontend" 16 | npm i $@ 17 | cd .. 18 | 19 | # 20 | # E2ETests 21 | # 22 | echo "npm install on e2e-tests" 23 | cd e2e-tests 24 | npm i $@ 25 | cd .. 26 | 27 | # 28 | # Examples 29 | # 30 | echo "npm install on examples" 31 | cd examples 32 | npm i $@ 33 | cd .. 34 | 35 | # 36 | # CDK 37 | # 38 | echo "npm install on cdk" 39 | cd cdk 40 | npm i 41 | cd .. -------------------------------------------------------------------------------- /frontend/src/components/__tests__/Header.test.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import React from "react"; 7 | import { render } from "@testing-library/react"; 8 | import Header from "../Header"; 9 | 10 | test("renders a header", async () => { 11 | const wrapper = render( 12 |
13 |

Test

14 |
, 15 | ); 16 | expect(wrapper.container).toMatchSnapshot(); 17 | }); 18 | -------------------------------------------------------------------------------- /frontend/src/containers/__tests__/ContactUs.test.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import React from "react"; 7 | import { render } from "@testing-library/react"; 8 | import { MemoryRouter } from "react-router-dom"; 9 | import ContactUs from "../ContactUs"; 10 | 11 | test("renders the component", async () => { 12 | const wrapper = render(, { wrapper: MemoryRouter }); 13 | expect(wrapper.container).toMatchSnapshot(); 14 | }); 15 | -------------------------------------------------------------------------------- /frontend/src/components/Pagination.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/base.scss"; 2 | 3 | .paginationNav { 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | margin-top: 10px; 8 | width: 100%; 9 | } 10 | 11 | .paginationList { 12 | list-style-type: none; 13 | } 14 | 15 | .paginationItem { 16 | display: inline-block; 17 | } 18 | 19 | .moveDirection { 20 | text-decoration: none; 21 | cursor: pointer; 22 | } 23 | 24 | .moveDirection:hover { 25 | text-decoration: underline; 26 | cursor: pointer; 27 | } 28 | -------------------------------------------------------------------------------- /frontend/src/containers/__tests__/APIHelpPage.test.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import React from "react"; 7 | import { render } from "@testing-library/react"; 8 | import APIHelpPage from "../APIHelpPage"; 9 | import { MemoryRouter } from "react-router-dom"; 10 | 11 | test("renders the API Help Page component", async () => { 12 | const wrapper = render(, { wrapper: MemoryRouter }); 13 | expect(wrapper.container).toMatchSnapshot(); 14 | }); 15 | -------------------------------------------------------------------------------- /frontend/src/containers/__tests__/FourZeroFour.test.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import React from "react"; 7 | import { render } from "@testing-library/react"; 8 | import { MemoryRouter } from "react-router-dom"; 9 | import FourZeroFour from "../FourZeroFour"; 10 | 11 | test("renders a FourZeroFour component", async () => { 12 | const wrapper = render(, { wrapper: MemoryRouter }); 13 | expect(wrapper.container).toMatchSnapshot(); 14 | }); 15 | -------------------------------------------------------------------------------- /frontend/src/hooks/scrollup-hooks.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import { useEffect } from "react"; 7 | 8 | export function useScrollUp( 9 | oldStep: number, 10 | step: number, 11 | setOldStep: React.Dispatch>, 12 | ): any { 13 | useEffect(() => { 14 | if (oldStep !== step) { 15 | window.scrollTo(0, 0); 16 | setOldStep(step); 17 | } 18 | }, [oldStep, setOldStep, step]); 19 | } 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-improvements.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation improvements 3 | about: Suggest a documentation update 4 | title: "" 5 | labels: documentation 6 | assignees: "" 7 | --- 8 | 9 | **What were you initially searching for in the docs?** 10 | 11 | 12 | 13 | **Is this related to an existing part of the documentation? Please share a link** 14 | 15 | **Describe how we could make it clearer** 16 | 17 | **If you have a proposed update, please share it here** 18 | -------------------------------------------------------------------------------- /backend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "strict": true, 6 | "baseUrl": "./", 7 | "outDir": "build", 8 | "moduleResolution": "node", 9 | "esModuleInterop": true, 10 | "inlineSourceMap": true, 11 | "resolveJsonModule": true, 12 | "types": ["node", "jest"], 13 | "typeRoots": ["./src/lib/types", "node_modules/@types"] 14 | }, 15 | "include": ["./src/**/*.ts", ".eslintrc.js", "jest.config.js"], 16 | "exclude": ["node_modules"] 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/containers/__tests__/ColorsHelpPage.test.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import React from "react"; 7 | import { render } from "@testing-library/react"; 8 | import ColorsHelpPage from "../ColorsHelpPage"; 9 | import { MemoryRouter } from "react-router-dom"; 10 | 11 | test("renders the Colors Help Page component", async () => { 12 | const wrapper = render(, { wrapper: MemoryRouter }); 13 | expect(wrapper.container).toMatchSnapshot(); 14 | }); 15 | -------------------------------------------------------------------------------- /frontend/src/layouts/Settings.css: -------------------------------------------------------------------------------- 1 | .usa-prose > h1, 2 | .usa-prose > h2, 3 | .usa-prose > h3, 4 | .usa-prose > h4, 5 | .usa-prose > h5, 6 | .usa-prose > h6 { 7 | font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif !important; 8 | } 9 | 10 | .usa-sidenav .usa-current { 11 | color: #1b1b1b !important; 12 | } 13 | 14 | .usa-sidenav .usa-current::after { 15 | background-color: #1b1b1b !important; 16 | } 17 | 18 | @media all and (min-width: 40em) { 19 | .usa-sidenav .usa-current::after { 20 | background-color: #1b1b1b !important; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/layouts/__tests__/Footer.test.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | import React from "react"; 7 | import { render } from "@testing-library/react"; 8 | import { MemoryRouter } from "react-router-dom"; 9 | import Footer from "../Footer"; 10 | 11 | describe("FooterLayout", () => { 12 | test("renders the component", async () => { 13 | const wrapper = render(