Skip to content

Commit f40bb26

Browse files
authored
Merge pull request #130 from kamyarz-aws/release/v3.2.2
update to version v3.2.2
2 parents d777a42 + e98dcc2 commit f40bb26

File tree

28 files changed

+774
-728
lines changed

28 files changed

+774
-728
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ open-source/
88
console_new/
99
**/aws_config.js
1010
deployment/ecr/*.jar
11+
test/
1112

1213
.pnp
1314
.pnp.js

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ 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+
## [3.2.2] - 2023-06-29
9+
10+
### Fixed
11+
12+
- Bug fix to resolve issue with Start button on Details page
13+
- Bug fix to resolve issue with Sign Out button not working
14+
- Updated to react-scripts "5.0.1"
15+
- Removed @aws-amplify/ui-componenet as it was deprecated
16+
817
## [3.2.1] - 2023-04-17
918

1019
### Fixed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export BUCKET_PREFIX=my-bucket-name # prefix of the bucket name without the regi
9090
export BUCKET_NAME=$BUCKET_PREFIX-$REGION # full bucket name where the code will reside
9191
export SOLUTION_NAME=my-solution-name
9292
export VERSION=my-version # version number for the customized code
93-
export PUBLIC_ECR_REGISTRY=public.ecr.aws/awssolutions/distributed-load-testing-on-aws-load-tester # replace with the container registry and image if you want to use a different container image
93+
export PUBLIC_ECR_REGISTRY=public.ecr.aws/aws-solutions # replace with the container registry and image if you want to use a different container image
9494
export PUBLIC_ECR_TAG=v3.2.1 # replace with the container image tag if you want to use a different container image
9595
```
9696

source/api-services/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "api-services",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "REST API micro services",
55
"repository": {
66
"type": "git",
@@ -27,4 +27,4 @@
2727
"node": "^16.x"
2828
},
2929
"readme": "./README.md"
30-
}
30+
}

source/console/package.json

Lines changed: 64 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,64 @@
1-
{
2-
"name": "distributed-load-testing-on-aws-ui",
3-
"version": "3.2.1",
4-
"private": true,
5-
"license": "Apache-2.0",
6-
"author": "aws-solution-builders",
7-
"scripts": {
8-
"build": "GENERATE_SOURCEMAP=false INLINE_RUNTIME_CHUNK=false react-scripts build",
9-
"clean": "rm -rf node_modules package-lock.json",
10-
"eject": "react-scripts eject",
11-
"start": "react-scripts start",
12-
"test": "react-scripts test"
13-
},
14-
"browserslist": {
15-
"production": [
16-
">0.2%",
17-
"not dead",
18-
"not op_mini all"
19-
],
20-
"development": [
21-
"last 1 chrome version",
22-
"last 1 firefox version",
23-
"last 1 safari version"
24-
]
25-
},
26-
"eslintConfig": {
27-
"extends": "react-app"
28-
},
29-
"dependencies": {
30-
"@aws-amplify/pubsub": "4.4.10",
31-
"@aws-amplify/ui-components": "^1.9.6",
32-
"@aws-amplify/ui-react": "^1.0.2",
33-
"aws-amplify": "4.3.31",
34-
"aws-sdk": "^2.1082.0",
35-
"bootstrap": "^5.1.0",
36-
"bootstrap-icons": "^1.8.1",
37-
"brace": "^0.11.1",
38-
"chart.js": "^3.7.1",
39-
"chartjs-adapter-moment": "^1.0.0",
40-
"moment": "^2.29.1",
41-
"react": "^17.0.1",
42-
"react-ace": "^9.3.0",
43-
"react-dom": "^17.0.1",
44-
"react-router-dom": "^5.2.0",
45-
"react-scripts": "^4.0.3",
46-
"reactstrap": "^9.0.0",
47-
"solution-utils": "file:../solution-utils"
48-
},
49-
"readme": "./README.md"
50-
}
1+
{
2+
"name": "distributed-load-testing-on-aws-ui",
3+
"version": "3.2.2",
4+
"private": true,
5+
"license": "Apache-2.0",
6+
"author": "aws-solution-builders",
7+
"scripts": {
8+
"build": "GENERATE_SOURCEMAP=false INLINE_RUNTIME_CHUNK=false react-scripts build",
9+
"clean": "rm -rf node_modules package-lock.json",
10+
"eject": "react-scripts eject",
11+
"start": "react-scripts start",
12+
"test": "react-scripts test"
13+
},
14+
"browserslist": {
15+
"production": [
16+
">0.2%",
17+
"not dead",
18+
"not op_mini all"
19+
],
20+
"development": [
21+
"last 1 chrome version",
22+
"last 1 firefox version",
23+
"last 1 safari version"
24+
]
25+
},
26+
"eslintConfig": {
27+
"extends": "react-app"
28+
},
29+
"dependencies": {
30+
"@aws-amplify/pubsub": "4.4.10",
31+
"@aws-amplify/ui-react": "^1.0.2",
32+
"aws-amplify": "4.3.31",
33+
"aws-sdk": "^2.1392.0",
34+
"bootstrap": "^5.1.0",
35+
"bootstrap-icons": "^1.8.1",
36+
"brace": "^0.11.1",
37+
"chart.js": "^3.7.1",
38+
"chartjs-adapter-moment": "^1.0.0",
39+
"moment": "^2.29.1",
40+
"react": "^17.0.1",
41+
"react-ace": "^10.1.0",
42+
"react-dom": "^17.0.1",
43+
"react-router-dom": "^5.2.0",
44+
"react-scripts": "^5.0.1",
45+
"reactstrap": "^9.0.0",
46+
"solution-utils": "file:../solution-utils"
47+
},
48+
"overrides": {
49+
"fast-xml-parser": "4.2.5",
50+
"nth-check": "2.0.1",
51+
"semver": "7.5.2",
52+
"optionator": "0.9.3"
53+
},
54+
"resolutions": {
55+
"fast-xml-parser": "4.2.5",
56+
"nth-check": "2.0.1",
57+
"semver": "7.5.2",
58+
"optionator": "0.9.3"
59+
},
60+
"readme": "./README.md",
61+
"devDependencies": {
62+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
63+
}
64+
}

source/console/public/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@
3535
To create a production bundle, use `npm run build` or `yarn build`.
3636
-->
3737
</body>
38-
3938
</html>

source/console/src/App.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ import { BrowserRouter as Router, Route, Switch, Link } from "react-router-dom";
66
import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem } from "reactstrap";
77

88
//Amplify
9-
import Amplify, { Auth } from "aws-amplify";
9+
import { Amplify, Auth } from "aws-amplify";
1010
import { withAuthenticator } from "@aws-amplify/ui-react";
11-
import { AuthState, onAuthUIStateChange } from "@aws-amplify/ui-components";
1211
import { PubSub, AWSIoTProvider } from "@aws-amplify/pubsub";
1312
import AWS from "aws-sdk";
1413

@@ -28,43 +27,44 @@ Amplify.addPluggable(
2827
PubSub.configure(awsConfig);
2928
Amplify.configure(awsConfig);
3029

31-
/**
32-
* Need to attach IoT Policy to Identity in order to subscribe.
33-
*/
34-
onAuthUIStateChange(async (nextAuthState) => {
35-
if (nextAuthState === AuthState.SignedIn) {
30+
class App extends React.Component {
31+
constructor(props) {
32+
super(props);
33+
this.noMatch = this.noMatch.bind(this);
34+
this.signOut = this.signOut.bind(this);
35+
this.toggleNavbar = this.toggleNavbar.bind(this);
36+
this.toggleRegionalModal = this.toggleRegionalModal.bind(this);
37+
this.state = {
38+
collapsed: true,
39+
regionalModal: false,
40+
};
41+
}
42+
43+
/**
44+
* Need to attach IoT Policy to Identity in order to subscribe.
45+
*/
46+
async componentDidMount() {
47+
try {
48+
await Auth.currentAuthenticatedUser();
49+
} catch (error) {
50+
console.log("User is not signed in");
51+
}
3652
const credentials = await Auth.currentCredentials();
3753
const identityId = credentials.identityId;
3854
AWS.config.update({
3955
region: awsConfig.aws_project_region,
4056
credentials: Auth.essentialCredentials(credentials),
4157
});
42-
4358
const params = {
4459
policyName: awsConfig.aws_iot_policy_name,
4560
principal: identityId,
4661
};
47-
4862
try {
4963
await new AWS.Iot().attachPrincipalPolicy(params).promise();
5064
} catch (error) {
5165
console.error("Error occurred while attaching principal policy", error);
5266
}
5367
}
54-
});
55-
56-
class App extends React.Component {
57-
constructor(props) {
58-
super(props);
59-
this.noMatch = this.noMatch.bind(this);
60-
this.signOut = this.signOut.bind(this);
61-
this.toggleNavbar = this.toggleNavbar.bind(this);
62-
this.toggleRegionalModal = this.toggleRegionalModal.bind(this);
63-
this.state = {
64-
collapsed: true,
65-
regionalModal: false,
66-
};
67-
}
6868

6969
noMatch({ location }) {
7070
return (
@@ -88,8 +88,8 @@ class App extends React.Component {
8888
});
8989
}
9090

91-
signOut() {
92-
Auth.signOut();
91+
async signOut() {
92+
await Auth.signOut();
9393
window.location.reload();
9494
}
9595

source/console/src/Components/Create/Create.js

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class Create extends React.Component {
4848
fileType = "script";
4949
}
5050
}
51-
5251
this.state = {
5352
isLoading: false,
5453
runningTasks: false,
@@ -440,7 +439,12 @@ class Create extends React.Component {
440439
const heading = (
441440
<PageHeader
442441
title={`${this.state.testId === null ? "Create" : "Update"} Load Test`}
443-
refreshButton={<RefreshButtons refreshFunction={this.getvCPUDetails} />}
442+
refreshButton={
443+
<RefreshButtons
444+
refreshFunction={this.getvCPUDetails}
445+
key={`${this.state.testId === null ? "Create" : "Update"} Load Test`}
446+
/>
447+
}
444448
/>
445449
);
446450
const currentDate = new Date().toISOString().split("T")[0];
@@ -699,7 +703,7 @@ class Create extends React.Component {
699703
<FormText color="muted">Time to hold target concurrency.</FormText>
700704
</FormGroup>
701705
<FormGroup>
702-
<Row inline>
706+
<Row>
703707
<Col xs="auto">
704708
<Input
705709
type="radio"
@@ -760,7 +764,6 @@ class Create extends React.Component {
760764
Date:
761765
</Label>
762766
<Input
763-
inline="true"
764767
type="date"
765768
name="scheduleDate"
766769
id="scheduleDate"
@@ -774,7 +777,6 @@ class Create extends React.Component {
774777
Time:
775778
</Label>
776779
<Input
777-
inline="true"
778780
type="time"
779781
name="scheduleTime"
780782
id="scheduleTime"
@@ -789,12 +791,11 @@ class Create extends React.Component {
789791
</TabPane>
790792
<TabPane tabId="2">
791793
<FormGroup>
792-
<InputGroup className="schedule-date-time" inline="true">
794+
<InputGroup className="schedule-date-time">
793795
<Label className="inline-label-left" for="scheduleDate">
794796
Date:
795797
</Label>
796798
<Input
797-
inline="true"
798799
type="date"
799800
name="scheduleDate"
800801
id="scheduleDate"
@@ -808,7 +809,6 @@ class Create extends React.Component {
808809
Time:
809810
</Label>
810811
<Input
811-
inline="true"
812812
type="time"
813813
name="scheduleTime"
814814
id="time"
@@ -826,7 +826,6 @@ class Create extends React.Component {
826826
<Label className="mb-0">Recurrence:&nbsp;</Label>
827827
&nbsp;
828828
<Input
829-
inline
830829
type="radio"
831830
name="recurrence"
832831
id="daily"
@@ -841,7 +840,6 @@ class Create extends React.Component {
841840
</Col>
842841
<Col xs="auto">
843842
<Input
844-
inline
845843
type="radio"
846844
name="recurrence"
847845
id="weekly"
@@ -856,7 +854,6 @@ class Create extends React.Component {
856854
</Col>
857855
<Col xs="auto">
858856
<Input
859-
inline
860857
type="radio"
861858
name="recurrence"
862859
id="biweekly"
@@ -871,7 +868,6 @@ class Create extends React.Component {
871868
</Col>
872869
<Col xs="auto">
873870
<Input
874-
inline
875871
type="radio"
876872
name="recurrence"
877873
id="monthly"
@@ -967,10 +963,9 @@ class Create extends React.Component {
967963
<Label for="testDescription">HTTP Headers (Optional)</Label>
968964
<AceEditor
969965
id="headers"
970-
mode="json"
966+
mode="text"
971967
theme="github"
972968
value={this.state.formValues.headers}
973-
highlightActiveLine={true}
974969
onChange={this.handleHeadersChange}
975970
name="headers"
976971
width="100%"
@@ -989,9 +984,8 @@ class Create extends React.Component {
989984
<Label>Body Payload (Optional)</Label>
990985
<AceEditor
991986
id="bodyPayload"
992-
mode="json"
987+
mode="text"
993988
theme="github"
994-
highlightActiveLine={true}
995989
onChange={this.handleBodyPayloadChange}
996990
name="bodyPayload"
997991
value={this.state.formValues.body}

source/console/src/Components/Details/Details.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class Details extends React.Component {
5151
scheduleDate: null,
5252
scheduleTime: null,
5353
recurrence: null,
54+
regionalTaskDetails: {},
5455
},
5556
};
5657
this.handleDownload = this.handleDownload.bind(this);
@@ -103,6 +104,7 @@ class Details extends React.Component {
103104
data.recurrence = data.scheduleRecurrence;
104105
delete data.nextRun;
105106
}
107+
data.regionalTaskDetails = await API.get("dlts", "/vCPUDetails");
106108
this.setTestData(data);
107109
} catch (err) {
108110
console.error(err);

0 commit comments

Comments
 (0)