Skip to content

Commit

Permalink
Merge 1.2.0 onto mainline (#770)
Browse files Browse the repository at this point in the history
* Set createBy on import (#737)

Co-authored-by: Miguel Abreu <miabreu@amazon.com>

* 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 <johillzm@amazon.com>
Co-authored-by: Miguel Alfonso Abreu Ortega <mabreuortega@gmail.com>
Co-authored-by: Miguel Abreu <miabreu@amazon.com>

* Fix AddChart form aria labels (#739)

* Fix AddChart form aria labels

* Fix EditChart form labels

* Update snapshots

* Style fix

Co-authored-by: Miguel Abreu <miabreu@amazon.com>

* Fix form/fieldset labels (#740)

Co-authored-by: Miguel Abreu <miabreu@amazon.com>

* 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 <mabreuortega@gmail.com>

* Miguel.abreu/gtt 1780 more aria labels (#742)

* Fix Add/Edit Image

* Fix Add/Edit Section labels

* Minor fix

Co-authored-by: Miguel Abreu <miabreu@amazon.com>

* 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 <miabreu@amazon.com>
Co-authored-by: Mazen Kharbutli <89935687+mazenkh-amazon@users.noreply.github.com>

* 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 <89935687+mazenkh-amazon@users.noreply.github.com>

* 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 <89935687+mazenkh-amazon@users.noreply.github.com>

* Miguel.abreu/gtt 1826 anchor link (#758)

* Add section share link functionality

* Add unit tests to Shareable component

Co-authored-by: Miguel Abreu <miabreu@amazon.com>

* Miguel.abreu/gtt 1693 live previes aria labels (#760)

* Add sections for content add/edit/ pages

* Update AddText.tsx

Co-authored-by: Miguel Abreu <miabreu@amazon.com>

* 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 <miabreu@amazon.com>

* 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 <miabreu@amazon.com>

* upgrade version to 1.2.0 (#766)

Co-authored-by: Miguel Alfonso Abreu Ortega <mabreuortega@gmail.com>

* Replace <h3> with <h2> in the app (#767)

Co-authored-by: Miguel Abreu <miabreu@amazon.com>
Co-authored-by: Triet <triet05@gmail.com>

* Miguel.abreu/gtt 1826 anchor link (#768)

* Add scroll delay

* Update Shareable.tsx

Co-authored-by: Miguel Abreu <miabreu@amazon.com>

* 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 <mabreuortega@gmail.com>
Co-authored-by: Miguel Abreu <miabreu@amazon.com>
Co-authored-by: Joshua Hill <52182876+JoshHill15@users.noreply.github.com>
Co-authored-by: Josh Hill <johillzm@amazon.com>
Co-authored-by: Miguel Pavon Diaz <71112226+miguelpdiaz8@users.noreply.github.com>
Co-authored-by: Mazen Kharbutli <89935687+mazenkh-amazon@users.noreply.github.com>
  • Loading branch information
7 people committed Feb 7, 2022
1 parent 9392c94 commit 9e32298
Show file tree
Hide file tree
Showing 132 changed files with 6,861 additions and 8,636 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2022-02-02

- Made improvements to meet WCAG accessibility requirements
- Provided appropriate text alternative for icons
- Made errors clearly identifiable and described to assistive technology
- Removed hidden buttons from assistive technology
- Improved the application of non-decorative content in CSS to support assistive technology
- Added section aria label to live previews
- Provided additional control over image formatting

## [1.1.7] - 2022-01-04

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

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

## [1.1.5] - 2021-11-29

- Made improvements to meet accessibility requirements
- Made improvements to meet WCAG accessibility requirements
- Improve text color contrast ratio
- Improve contrast for non-text elements
- Ensure all optional and mandatory fields are marked
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PDoA comes with pre-built code to provision an instance in your AWS account. You

| Region | Launch |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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) |
| 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) |

### Clone this repository

Expand Down
3,680 changes: 1,007 additions & 2,673 deletions backend/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "performance-dashboard-backend",
"version": "1.1.7",
"version": "1.2.0",
"description": "Performance Dashboard on AWS Backend",
"awssdkUserAgent": "AwsSolution/SO0157/v",
"scripts": {
Expand All @@ -18,17 +18,17 @@
"@types/aws-serverless-express": "^3.3.3",
"@types/cors": "^2.8.6",
"@types/express": "^4.17.6",
"@types/jest": "^26.0.19",
"@types/jest": "^27.4.0",
"@types/node": "^14.0.14",
"@types/pino": "^6.3.4",
"@types/uuid": "^8.0.0",
"jest": "^26.6.3",
"ts-jest": "^26.4.4",
"jest": "^27.4.7",
"ts-jest": "^27.1.3",
"ts-node": "^8.10.2",
"typescript": "^3.9.5"
},
"dependencies": {
"aws-sdk": "^2.714.0",
"aws-sdk": "^2.814.0",
"aws-serverless-express": "^3.3.8",
"aws-xray-sdk": "^3.1.0",
"cors": "^2.8.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@
"header": [],
"body": {
"mode": "raw",
"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}",
"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}",
"options": {
"raw": {
"language": "json"
Expand Down
2 changes: 2 additions & 0 deletions backend/src/lib/factories/__tests__/widget-factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ describe("createImageWidget", () => {
},
fileName: "example name",
imageAltText: "Image of a widget",
scalePct: "75%",
};
it("builds a image widget", () => {
const widget = WidgetFactory.createWidget({
Expand All @@ -821,6 +822,7 @@ describe("createImageWidget", () => {
});
expect(widget.content.imageAltText).toEqual("Image of a widget");
expect(widget.content.fileName).toEqual("example name");
expect(widget.content.scalePct).toEqual("75%");
});

it("throws an error if image title is undefined", () => {
Expand Down
1 change: 1 addition & 0 deletions backend/src/lib/factories/widget-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ function createImageWidget(widget: Widget): ImageWidget {
summaryBelow: widget.content.summaryBelow,
s3Key: widget.content.s3Key,
fileName: widget.content.fileName,
scalePct: widget.content.scalePct,
},
};
}
Expand Down
1 change: 1 addition & 0 deletions backend/src/lib/models/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export interface ImageWidget extends Widget {
summary?: string;
summaryBelow: boolean;
fileName: string;
scalePct?: string;
s3Key: {
raw: string;
};
Expand Down
8 changes: 7 additions & 1 deletion backend/src/lib/services/cognito.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import CognitoIdentityServiceProvider from "aws-sdk/clients/cognitoidentityserviceprovider";
import logger from "./logger";
import packagejson from "../../../package.json";

/**
* This class serves as a wrapper to the Cognito Identity Service Provider.
Expand All @@ -10,13 +11,18 @@ import logger from "./logger";
class CognitoService {
private cognitoIdentityServiceProvider: CognitoIdentityServiceProvider;
private static instance: CognitoService;
private options = {
customUserAgent: packagejson.awssdkUserAgent + packagejson.version,
};

/**
* CognitoService is a Singleton, hence private constructor
* to prevent direct constructions calls with new operator.
*/
private constructor() {
this.cognitoIdentityServiceProvider = new CognitoIdentityServiceProvider();
this.cognitoIdentityServiceProvider = new CognitoIdentityServiceProvider(
this.options
);
}

/**
Expand Down
11 changes: 10 additions & 1 deletion cdk/lib/ops-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as sns from "@aws-cdk/aws-sns";
import * as lambda from "@aws-cdk/aws-lambda";
import * as apigateway from "@aws-cdk/aws-apigateway";
import * as dynamodb from "@aws-cdk/aws-dynamodb";
import * as cloudwatch from "@aws-cdk/aws-cloudwatch";
import { SnsAction } from "@aws-cdk/aws-cloudwatch-actions";
import * as kms from "@aws-cdk/aws-kms";
import {
Expand Down Expand Up @@ -34,6 +35,7 @@ const LAMBDA_ALARMS_EVALUATION_PERIODS = 2;
const DASHBOARD_AGGREGATION_PERIOD_MINUTES = 5;
const DASHBOARD_WIDGET_HEIGHT = 9;
const DASHBOARD_DEFAULT_PERIOD = "-PT12H";
const LAMBDA_THROTTLE_THRESHOLD = 10;

export class OpsStack extends cdk.Stack {
private readonly opsNotifications: sns.Topic;
Expand Down Expand Up @@ -109,7 +111,7 @@ export class OpsStack extends cdk.Stack {
const throttlesAlarm = new Alarm(this, id.concat("ThrottleRateAlarm"), {
alarmDescription: "At least 10 Lambda invocations were throttled",
evaluationPeriods: LAMBDA_ALARMS_EVALUATION_PERIODS,
threshold: 10,
threshold: LAMBDA_THROTTLE_THRESHOLD,
actionsEnabled: ENABLE_ALARM_SNS_NOTIFICATIONS,
treatMissingData: TreatMissingData.NOT_BREACHING,
comparisonOperator: ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,
Expand Down Expand Up @@ -203,10 +205,17 @@ export class OpsStack extends cdk.Stack {
label: string,
width: number = 12
): GraphWidget {
const horizontalAnnotation: cloudwatch.HorizontalAnnotation = {
value: LAMBDA_THROTTLE_THRESHOLD,
color: Color.ORANGE,
visible: true,
label: "Throttle",
};
return new GraphWidget({
title: `Lambda Invocations - ${label}`,
width,
height: DASHBOARD_WIDGET_HEIGHT,
leftAnnotations: [horizontalAnnotation],
left: [
new Metric({
namespace: "AWS/Lambda",
Expand Down
Loading

0 comments on commit 9e32298

Please sign in to comment.