Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 9e32298

Browse files
trietlumabreuortegaMiguel AbreuJoshHill15Josh Hill
authored
Merge 1.2.0 onto mainline (#770)
* Set createBy on import (#737) Co-authored-by: Miguel Abreu <[email protected]> * changed button to link and added title attribute (#697) * changed button to link and added title attribute * add prettier extension * Minor fix. * Using Link component * More fixes added * Update PublishedTab.tsx Co-authored-by: Josh Hill <[email protected]> Co-authored-by: Miguel Alfonso Abreu Ortega <[email protected]> Co-authored-by: Miguel Abreu <[email protected]> * Fix AddChart form aria labels (#739) * Fix AddChart form aria labels * Fix EditChart form labels * Update snapshots * Style fix Co-authored-by: Miguel Abreu <[email protected]> * Fix form/fieldset labels (#740) Co-authored-by: Miguel Abreu <[email protected]> * Add programmatic context to grouped form elements (#741) * Add programmatic context to grouped form elements * Merge * Fix tests Co-authored-by: Miguel Alfonso Abreu Ortega <[email protected]> * Miguel.abreu/gtt 1780 more aria labels (#742) * Fix Add/Edit Image * Fix Add/Edit Section labels * Minor fix Co-authored-by: Miguel Abreu <[email protected]> * updated backend/package-lock.json due to conflicts (#713) * Correct the use of ARIA labels for progress bars (#746) * Make homepage list and search results programmatically structured (#745) * Version notes accessibility support (#749) * Adds 'copy' to new 'Actions' drop-down menus (#744) * Add copy to new Actions drop-down menus * Run prettier * Changes based on reviews * Changes based on reviews * Changes based on reviewer's requests * Adds support for scaling image sizes when images are added/edited (#751) * Adds support to scaling image sizes when added/edited * Changes based on reviewer's recommendations * Miguel.abreu/gtt 1675 labels enhancement (#752) * Add labels for sections * Update snapshots Co-authored-by: Miguel Abreu <[email protected]> Co-authored-by: Mazen Kharbutli <[email protected]> * upgraded to 1.1.8, and incorporated new translation files (#753) * Add alt text to thumbnail images (#756) * GTT-1608: Added horizontal annotation for throttle threshold in the Lambda related widgets (#755) * Added horizontal annotation for throttle threshold in the Lambda related widgets * Prettier checks completed Co-authored-by: Mazen Kharbutli <[email protected]> * GTT-1812 : Instrument calls to Cognito with user-agent string (#754) * Instrument with user-agent string * configured prettier linting to run with IDE Co-authored-by: Mazen Kharbutli <[email protected]> * Miguel.abreu/gtt 1826 anchor link (#758) * Add section share link functionality * Add unit tests to Shareable component Co-authored-by: Miguel Abreu <[email protected]> * Miguel.abreu/gtt 1693 live previes aria labels (#760) * Add sections for content add/edit/ pages * Update AddText.tsx Co-authored-by: Miguel Abreu <[email protected]> * Miguel.abreu/gtt 1747 security updates (#761) * Npm audit fix * Update node-sass, jest * Upgrade cypress * Fix dependencies * Update package-lock.json * Replace node-sass with sass package Co-authored-by: Miguel Abreu <[email protected]> * Ensure a page focus is at the top after an event or page reload (#762) * Update the preview button text to be more meaningfull (#763) * Remove the aria-hidden attribute for file selection (#764) * Miguel.abreu/gtt 1729 disabled button (#765) * Change disabled behavior for continue button * Update AddContent.test.tsx.snap * Fix disabled continue button for AddMetrics * Fix AddImage form errors * Update AddImage.tsx * Fix FileInput errors * Update ChooseData.test.tsx.snap Co-authored-by: Miguel Abreu <[email protected]> * upgrade version to 1.2.0 (#766) Co-authored-by: Miguel Alfonso Abreu Ortega <[email protected]> * Replace <h3> with <h2> in the app (#767) Co-authored-by: Miguel Abreu <[email protected]> Co-authored-by: Triet <[email protected]> * Miguel.abreu/gtt 1826 anchor link (#768) * Add scroll delay * Update Shareable.tsx Co-authored-by: Miguel Abreu <[email protected]> * GTT-1841: changes for release 1.2.0 (#769) * changes for release 1.2.0 * Add changes from Sprints 47 and 48 * undo changes Co-authored-by: Miguel Alfonso Abreu Ortega <[email protected]> Co-authored-by: Miguel Abreu <[email protected]> Co-authored-by: Joshua Hill <[email protected]> Co-authored-by: Josh Hill <[email protected]> Co-authored-by: Miguel Pavon Diaz <[email protected]> Co-authored-by: Mazen Kharbutli <[email protected]>
1 parent 9392c94 commit 9e32298

File tree

132 files changed

+6861
-8636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+6861
-8636
lines changed

CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,19 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.2.0] - 2022-02-02
9+
10+
- Made improvements to meet WCAG accessibility requirements
11+
- Provided appropriate text alternative for icons
12+
- Made errors clearly identifiable and described to assistive technology
13+
- Removed hidden buttons from assistive technology
14+
- Improved the application of non-decorative content in CSS to support assistive technology
15+
- Added section aria label to live previews
16+
- Provided additional control over image formatting
17+
818
## [1.1.7] - 2022-01-04
919

10-
- Made improvements to meet accessibility requirements
20+
- Made improvements to meet WCAG accessibility requirements
1121
- Made "Return to Top" link actionable for screen readers
1222
- Made table of contents scrollable and visible
1323
- Made Settings acknowledge statement mandatory
@@ -18,7 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1828
## [1.1.6] - 2021-12-17
1929

2030
- Copy/duplicate an individual dashboard
21-
- Made improvements to meet accessibility requirements
31+
- Made improvements to meet WCAG accessibility requirements
2232
- Added text alternative to label images
2333
- Establish unique page titles
2434
- Made global button color changes
@@ -27,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2737

2838
## [1.1.5] - 2021-11-29
2939

30-
- Made improvements to meet accessibility requirements
40+
- Made improvements to meet WCAG accessibility requirements
3141
- Improve text color contrast ratio
3242
- Improve contrast for non-text elements
3343
- Ensure all optional and mandatory fields are marked

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PDoA comes with pre-built code to provision an instance in your AWS account. You
3333

3434
| Region | Launch |
3535
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36-
| Install in us-east-1 | [![Install in us-east-1](docs/images/launch-stack.svg)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateURL=https://performance-dashboard-on-aws-solution-releases-us-west-2.s3.us-west-2.amazonaws.com/performance-dashboard-on-aws/v1.1.7/performance-dashboard-on-aws.template) |
36+
| Install in us-east-1 | [![Install in us-east-1](docs/images/launch-stack.svg)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateURL=https://performance-dashboard-on-aws-solution-releases-us-west-2.s3.us-west-2.amazonaws.com/performance-dashboard-on-aws/v1.2.0/performance-dashboard-on-aws.template) |
3737

3838
### Clone this repository
3939

backend/package-lock.json

Lines changed: 1007 additions & 2673 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "performance-dashboard-backend",
3-
"version": "1.1.7",
3+
"version": "1.2.0",
44
"description": "Performance Dashboard on AWS Backend",
55
"awssdkUserAgent": "AwsSolution/SO0157/v",
66
"scripts": {
@@ -18,17 +18,17 @@
1818
"@types/aws-serverless-express": "^3.3.3",
1919
"@types/cors": "^2.8.6",
2020
"@types/express": "^4.17.6",
21-
"@types/jest": "^26.0.19",
21+
"@types/jest": "^27.4.0",
2222
"@types/node": "^14.0.14",
2323
"@types/pino": "^6.3.4",
2424
"@types/uuid": "^8.0.0",
25-
"jest": "^26.6.3",
26-
"ts-jest": "^26.4.4",
25+
"jest": "^27.4.7",
26+
"ts-jest": "^27.1.3",
2727
"ts-node": "^8.10.2",
2828
"typescript": "^3.9.5"
2929
},
3030
"dependencies": {
31-
"aws-sdk": "^2.714.0",
31+
"aws-sdk": "^2.814.0",
3232
"aws-serverless-express": "^3.3.8",
3333
"aws-xray-sdk": "^3.1.0",
3434
"cors": "^2.8.5",

backend/postman/Performance Dashboard API.postman_collection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@
801801
"header": [],
802802
"body": {
803803
"mode": "raw",
804-
"raw": "{\n \"name\": \"{{$randomProductName}}\",\n \"widgetType\": \"Image\",\n \"content\": {\n \"title\": \"{{$randomProductName}}\",\n \"summary\": \"{{$randomLoremParagraph}}\",\n \"summaryBelow\": false,\n \"imageAltText\": \"{{$randomWord}}\",\n \"fileName\": \"123.png\",\n \"s3Key\": {\n \"raw\": \"123.png\"\n }\n }\n}",
804+
"raw": "{\n \"name\": \"{{$randomProductName}}\",\n \"widgetType\": \"Image\",\n \"content\": {\n \"title\": \"{{$randomProductName}}\",\n \"summary\": \"{{$randomLoremParagraph}}\",\n \"summaryBelow\": false,\n \"imageAltText\": \"{{$randomWord}}\",\n \"fileName\": \"123.png\",\n \"scalePct\": \"75%\",\n \"s3Key\": {\n \"raw\": \"123.png\"\n }\n }\n}",
805805
"options": {
806806
"raw": {
807807
"language": "json"

backend/src/lib/factories/__tests__/widget-factory.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ describe("createImageWidget", () => {
799799
},
800800
fileName: "example name",
801801
imageAltText: "Image of a widget",
802+
scalePct: "75%",
802803
};
803804
it("builds a image widget", () => {
804805
const widget = WidgetFactory.createWidget({
@@ -821,6 +822,7 @@ describe("createImageWidget", () => {
821822
});
822823
expect(widget.content.imageAltText).toEqual("Image of a widget");
823824
expect(widget.content.fileName).toEqual("example name");
825+
expect(widget.content.scalePct).toEqual("75%");
824826
});
825827

826828
it("throws an error if image title is undefined", () => {

backend/src/lib/factories/widget-factory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ function createImageWidget(widget: Widget): ImageWidget {
372372
summaryBelow: widget.content.summaryBelow,
373373
s3Key: widget.content.s3Key,
374374
fileName: widget.content.fileName,
375+
scalePct: widget.content.scalePct,
375376
},
376377
};
377378
}

backend/src/lib/models/widget.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export interface ImageWidget extends Widget {
125125
summary?: string;
126126
summaryBelow: boolean;
127127
fileName: string;
128+
scalePct?: string;
128129
s3Key: {
129130
raw: string;
130131
};

backend/src/lib/services/cognito.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import CognitoIdentityServiceProvider from "aws-sdk/clients/cognitoidentityserviceprovider";
22
import logger from "./logger";
3+
import packagejson from "../../../package.json";
34

45
/**
56
* This class serves as a wrapper to the Cognito Identity Service Provider.
@@ -10,13 +11,18 @@ import logger from "./logger";
1011
class CognitoService {
1112
private cognitoIdentityServiceProvider: CognitoIdentityServiceProvider;
1213
private static instance: CognitoService;
14+
private options = {
15+
customUserAgent: packagejson.awssdkUserAgent + packagejson.version,
16+
};
1317

1418
/**
1519
* CognitoService is a Singleton, hence private constructor
1620
* to prevent direct constructions calls with new operator.
1721
*/
1822
private constructor() {
19-
this.cognitoIdentityServiceProvider = new CognitoIdentityServiceProvider();
23+
this.cognitoIdentityServiceProvider = new CognitoIdentityServiceProvider(
24+
this.options
25+
);
2026
}
2127

2228
/**

cdk/lib/ops-stack.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as sns from "@aws-cdk/aws-sns";
33
import * as lambda from "@aws-cdk/aws-lambda";
44
import * as apigateway from "@aws-cdk/aws-apigateway";
55
import * as dynamodb from "@aws-cdk/aws-dynamodb";
6+
import * as cloudwatch from "@aws-cdk/aws-cloudwatch";
67
import { SnsAction } from "@aws-cdk/aws-cloudwatch-actions";
78
import * as kms from "@aws-cdk/aws-kms";
89
import {
@@ -34,6 +35,7 @@ const LAMBDA_ALARMS_EVALUATION_PERIODS = 2;
3435
const DASHBOARD_AGGREGATION_PERIOD_MINUTES = 5;
3536
const DASHBOARD_WIDGET_HEIGHT = 9;
3637
const DASHBOARD_DEFAULT_PERIOD = "-PT12H";
38+
const LAMBDA_THROTTLE_THRESHOLD = 10;
3739

3840
export class OpsStack extends cdk.Stack {
3941
private readonly opsNotifications: sns.Topic;
@@ -109,7 +111,7 @@ export class OpsStack extends cdk.Stack {
109111
const throttlesAlarm = new Alarm(this, id.concat("ThrottleRateAlarm"), {
110112
alarmDescription: "At least 10 Lambda invocations were throttled",
111113
evaluationPeriods: LAMBDA_ALARMS_EVALUATION_PERIODS,
112-
threshold: 10,
114+
threshold: LAMBDA_THROTTLE_THRESHOLD,
113115
actionsEnabled: ENABLE_ALARM_SNS_NOTIFICATIONS,
114116
treatMissingData: TreatMissingData.NOT_BREACHING,
115117
comparisonOperator: ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,
@@ -203,10 +205,17 @@ export class OpsStack extends cdk.Stack {
203205
label: string,
204206
width: number = 12
205207
): GraphWidget {
208+
const horizontalAnnotation: cloudwatch.HorizontalAnnotation = {
209+
value: LAMBDA_THROTTLE_THRESHOLD,
210+
color: Color.ORANGE,
211+
visible: true,
212+
label: "Throttle",
213+
};
206214
return new GraphWidget({
207215
title: `Lambda Invocations - ${label}`,
208216
width,
209217
height: DASHBOARD_WIDGET_HEIGHT,
218+
leftAnnotations: [horizontalAnnotation],
210219
left: [
211220
new Metric({
212221
namespace: "AWS/Lambda",

0 commit comments

Comments
 (0)