Skip to content

Commit 44c27e5

Browse files
authored
5.3.1 release (#68)
1 parent 90f9f83 commit 44c27e5

28 files changed

Lines changed: 1173 additions & 518 deletions

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.16.3
1+
v12.20.2

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
"cypress"
2121
],
2222
"devDependencies": {
23+
"babel-eslint": "^10.1.0",
2324
"concurrently": "~5.1.0",
2425
"eslint": "~7.11.0",
2526
"eslint-config-prettier": "~6.15.0",
27+
"eslint-config-react-app": "^6.0.0",
2628
"eslint-plugin-prettier": "~3.1.4",
2729
"lint-staged": "~10.0.7",
28-
"prettier": "~1.19.1",
29-
"babel-eslint": "^10.1.0",
30-
"eslint-config-react-app": "^6.0.0"
30+
"prettier": "~1.19.1"
3131
},
3232
"resolutions": {
3333
"@babel/plugin-transform-for-of": "7.12.13",
@@ -42,7 +42,9 @@
4242
"bl": "~4.0.3",
4343
"cypress": "~5.6.0",
4444
"date-fns": "~2.9.0",
45+
"dompurify": "^2.5.6",
4546
"es-abstract": "~1.19.0",
47+
"elliptic": "~6.5.7",
4648
"get-intrinsic": "~1.1.3",
4749
"serialize-javascript": "~3.1.0",
4850
"qs": "6.9.7",
@@ -52,4 +54,4 @@
5254
"fast-json-patch": "3.1.1",
5355
"yaml": "2.0.0-1"
5456
}
55-
}
57+
}

packages/example/src/ui/Footer.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ import { makeStyles } from '@material-ui/core';
44

55
export const Footer = () => {
66
const classes = useStyles();
7-
7+
const showCopyright = localStorage.getItem('SHOW_COPYRIGHT');
88
return (
99
<div className={classes.root}>
10-
<Typography
11-
color="textSecondary"
12-
variant="body2"
13-
className={classes.copyright}
14-
>
15-
Copyright © 2024 Broadcom. All Rights Reserved
16-
</Typography>
10+
{showCopyright === 'true' && (
11+
<Typography
12+
color="textSecondary"
13+
variant="body2"
14+
className={classes.copyright}
15+
>
16+
Copyright © 2024 Broadcom. All Rights Reserved
17+
</Typography>
18+
)}
1719
</div>
1820
);
1921
};

packages/layer7-apihub/src/apis/ApiSpecs.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useCallback, useState } from 'react';
22
import { makeStyles } from '@material-ui/core/styles';
33

44
import { ApiApplications } from './Application';
@@ -7,10 +7,18 @@ import { Swagger } from './Swagger';
77
export const ApiSpecs = ({ record }) => {
88
const classes = useStyles();
99

10+
const [selectedAPIkey, setSelectedAPIKey] = useState({});
11+
const handleKeyUpdate = useCallback(keyDetails => {
12+
if (keyDetails) {
13+
setSelectedAPIKey(keyDetails);
14+
} else {
15+
setSelectedAPIKey({});
16+
}
17+
}, []);
1018
return (
1119
<div className={classes.root}>
12-
<ApiApplications id={record.id} />
13-
<Swagger id={record.id} />
20+
<ApiApplications handleKeyUpdate={handleKeyUpdate} id={record.id} />
21+
<Swagger apiKeyDetails={selectedAPIkey} id={record.id} />
1422
</div>
1523
);
1624
};

packages/layer7-apihub/src/apis/ApiSpecs.test.js

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,52 @@ import specs from './specs.json';
77

88
const defaultData = [
99
{
10-
id: "17694075-6d09-4df0-8307-90f41de2f35a",
11-
uuid: "17694075-6d09-4df0-8307-90f41de2f35a",
12-
name: "SQL National Functionality",
13-
status: "REJECTED",
10+
id: '17694075-6d09-4df0-8307-90f41de2f35a',
11+
uuid: '17694075-6d09-4df0-8307-90f41de2f35a',
12+
name: 'SQL National Functionality',
13+
status: 'REJECTED',
1414
disabledByType: null,
15-
description: "Networked non-volatile challenge",
16-
OauthCallbackUrl: "https://example.com/oauthCallback",
17-
OauthScope: "OOB",
18-
OauthType: "public",
19-
apiKey: "f2055ef4-dd20-4a71-bd91-18042cc348c9",
20-
keySecret: "3ae27eaf-c882-429f-8339-94a675088486",
15+
description: 'Networked non-volatile challenge',
16+
OauthCallbackUrl: 'https://example.com/oauthCallback',
17+
OauthScope: 'OOB',
18+
OauthType: 'public',
19+
apiKey: 'f2055ef4-dd20-4a71-bd91-18042cc348c9',
20+
keySecret: '3ae27eaf-c882-429f-8339-94a675088486',
2121
apiIds: {
22-
results: ["beb8833e-1876-4b31-ace3-5d50aa0d9007", "8a334a2f-de19-472a-bb11-5a6e38e1c2ee"]
22+
results: [
23+
'beb8833e-1876-4b31-ace3-5d50aa0d9007',
24+
'8a334a2f-de19-472a-bb11-5a6e38e1c2ee',
25+
],
2326
},
24-
_accessibleApis: ["beb8833e-1876-4b31-ace3-5d50aa0d9007"]
27+
_accessibleApis: ['beb8833e-1876-4b31-ace3-5d50aa0d9007'],
2528
},
2629
{
27-
id: "80dc52f6-1d63-4c10-bf94-cae666c03dc8",
28-
uuid: "80dc52f6-1d63-4c10-bf94-cae666c03dc8",
29-
name: "GB Future Response",
30-
status: "APPLICATION_PENDING_APPROVAL",
30+
id: '80dc52f6-1d63-4c10-bf94-cae666c03dc8',
31+
uuid: '80dc52f6-1d63-4c10-bf94-cae666c03dc8',
32+
name: 'GB Future Response',
33+
status: 'APPLICATION_PENDING_APPROVAL',
3134
disabledByType: null,
32-
description: "Distributed bifurcated customer loyalty",
33-
OauthCallbackUrl: "https://example.com/oauthCallback",
34-
OauthScope: "OOB",
35-
OauthType: "public",
36-
apiKey: "b2dcdf94-d7cf-47e1-9b03-9efb862f0a9b",
37-
keySecret: "b2e97991-9a8c-4160-a9e2-ea10be778f48",
35+
description: 'Distributed bifurcated customer loyalty',
36+
OauthCallbackUrl: 'https://example.com/oauthCallback',
37+
OauthScope: 'OOB',
38+
OauthType: 'public',
39+
apiKey: 'b2dcdf94-d7cf-47e1-9b03-9efb862f0a9b',
40+
keySecret: 'b2e97991-9a8c-4160-a9e2-ea10be778f48',
3841
apiIds: {
39-
results: ["32b97328-5800-4811-b53d-1ad107d36541", "8a334a2f-de19-472a-bb11-5a6e38e1c2ee"]
42+
results: [
43+
'32b97328-5800-4811-b53d-1ad107d36541',
44+
'8a334a2f-de19-472a-bb11-5a6e38e1c2ee',
45+
],
4046
},
41-
_accessibleApis: ["32b97328-5800-4811-b53d-1ad107d36541"]
47+
_accessibleApis: ['32b97328-5800-4811-b53d-1ad107d36541'],
4248
},
4349
];
4450

4551
const dataProvider = {
4652
getList: jest.fn().mockResolvedValue({
4753
data: defaultData,
4854
total: defaultData.length,
55+
totalPages: 1,
4956
}),
5057
getOne: jest.fn().mockResolvedValue({
5158
data: specs,
@@ -60,8 +67,8 @@ const initialState = {
6067
specs: {
6168
data: {
6269
api_1: specs,
63-
}
64-
}
70+
},
71+
},
6572
},
6673
},
6774
};
@@ -78,7 +85,9 @@ describe('ApiSpecs', () => {
7885

7986
await wait(() => {
8087
expect(
81-
getByLabelText('resources.apis.specification.actions.search_or_select_application')
88+
getByLabelText(
89+
'resources.apis.specification.actions.search_or_select_application'
90+
)
8291
).not.toBeNull();
8392
});
8493
});

0 commit comments

Comments
 (0)