8000 5.3.1 release by ps0002 · Pull Request #68 · CAAPIM/APIHub · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.16.3
v12.20.2
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"cypress"
],
"devDependencies": {
"babel-eslint": "^10.1.0",
"concurrently": "~5.1.0",
"eslint": "~7.11.0",
"eslint-config-prettier": "~6.15.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-prettier": "~3.1.4",
"lint-staged": "~10.0.7",
"prettier": "~1.19.1",
"babel-eslint": "^10.1.0",
"eslint-config-react-app": "^6.0.0"
"prettier": "~1.19.1"
},
"resolutions": {
"@babel/plugin-transform-for-of": "7.12.13",
Expand All @@ -42,7 +42,9 @@
"bl": "~4.0.3",
"cypress": "~5.6.0",
"date-fns": "~2.9.0",
"dompurify": "^2.5.6",
"es-abstract": "~1.19.0",
"elliptic": "~6.5.7",
"get-intrinsic": "~1.1.3",
"serialize-javascript": "~3.1.0",
"qs": "6.9.7",
Expand All @@ -52,4 +54,4 @@
"fast-json-patch": "3.1.1",
"yaml": "2.0.0-1"
}
}
}
18 changes: 10 additions & 8 deletions packages/example/src/ui/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ import { makeStyles } from '@material-ui/core';

export const Footer = () => {
const classes = useStyles();

const showCopyright = localStorage.getItem('SHOW_COPYRIGHT');
return (
<div className={classes.root}>
<Typography
color="textSecondary"
variant="body2"
className={classes.copyright}
>
Copyright © 2024 Broadcom. All Rights Reserved
</Typography>
{showCopyright === 'true' && (
<Typography
color="textSecondary"
variant="body2"
className={classes.copyright}
>
Copyright © 2024 Broadcom. All Rights Reserved
</Typography>
)}
</div>
);
};
Expand Down
14 changes: 11 additions & 3 deletions packages/layer7-apihub/src/apis/ApiSpecs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useCallback, useState } from 'react';
import { makeStyles } from '@material-ui/core/styles';

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

const [selectedAPIkey, setSelectedAPIKey] = useState({});
const handleKeyUpdate = useCallback(keyDetails => {
if (keyDetails) {
setSelectedAPIKey(keyDetails);
} else {
setSelectedAPIKey({});
}
}, []);
return (
<div className={classes.root}>
<ApiApplications id={record.id} />
<Swagger id={record.id} />
<ApiApplications handleKeyUpdate={handleKeyUpdate} id={record.id} />
<Swagger apiKeyDetails={selectedAPIkey} id={record.id} />
</div>
);
};
Expand Down
63 changes: 36 additions & 27 deletions packages/layer7-apihub/src/apis/ApiSpecs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,52 @@ import specs from './specs.json';

const defaultData = [
{
id: "17694075-6d09-4df0-8307-90f41de2f35a",
uuid: "17694075-6d09-4df0-8307-90f41de2f35a",
name: "SQL National Functionality",
status: "REJECTED",
id: '17694075-6d09-4df0-8307-90f41de2f35a',
uuid: '17694075-6d09-4df0-8307-90f41de2f35a',
name: 'SQL National Functionality',
status: 'REJECTED',
disabledByType: null,
description: "Networked non-volatile challenge",
OauthCallbackUrl: "https://example.com/oauthCallback",
OauthScope: "OOB",
OauthType: "public",
apiKey: "f2055ef4-dd20-4a71-bd91-18042cc348c9",
keySecret: "3ae27eaf-c882-429f-8339-94a675088486",
description: 'Networked non-volatile challenge',
OauthCallbackUrl: 'https://example.com/oauthCallback',
OauthScope: 'OOB',
OauthType: 'public',
apiKey: 'f2055ef4-dd20-4a71-bd91-18042cc348c9',
keySecret: '3ae27eaf-c882-429f-8339-94a675088486',
apiIds: {
results: ["beb8833e-1876-4b31-ace3-5d50aa0d9007", "8a334a2f-de19-472a-bb11-5a6e38e1c2ee"]
results: [
'beb8833e-1876-4b31-ace3-5d50aa0d9007',
'8a334a2f-de19-472a-bb11-5a6e38e1c2ee',
],
},
_accessibleApis: ["beb8833e-1876-4b31-ace3-5d50aa0d9007"]
_accessibleApis: ['beb8833e-1876-4b31-ace3-5d50aa0d9007'],
},
{
id: "80dc52f6-1d63-4c10-bf94-cae666c03dc8",
uuid: "80dc52f6-1d63-4c10-bf94-cae666c03dc8",
name: "GB Future Response",
status: "APPLICATION_PENDING_APPROVAL",
id: '80dc52f6-1d63-4c10-bf94-cae666c03dc8',
uuid: '80dc52f6-1d63-4c10-bf94-cae666c03dc8',
name: 'GB Future Response',
status: 'APPLICATION_PENDING_APPROVAL',
disabledByType: null,
description: "Distributed bifurcated customer loyalty",
OauthCallbackUrl: "https://example.com/oauthCallback",
OauthScope: "OOB",
OauthType: "public",
apiKey: "b2dcdf94-d7cf-47e1-9b03-9efb862f0a9b",
keySecret: "b2e97991-9a8c-4160-a9e2-ea10be778f48",
description: 'Distributed bifurcated customer loyalty',
OauthCallbackUrl: 'https://example.com/oauthCallback',
OauthScope: 'OOB',
OauthType: 'public',
apiKey: 'b2dcdf94-d7cf-47e1-9b03-9efb862f0a9b',
keySecret: 'b2e97991-9a8c-4160-a9e2-ea10be778f48',
apiIds: {
results: ["32b97328-5800-4811-b53d-1ad107d36541", "8a334a2f-de19-472a-bb11-5a6e38e1c2ee"]
results: [
'32b97328-5800-4811-b53d-1ad107d36541',
'8a334a2f-de19-472a-bb11-5a6e38e1c2ee',
],
},
_accessibleApis: ["32b97328-5800-4811-b53d-1ad107d36541"]
_accessibleApis: ['32b97328-5800-4811-b53d-1ad107d36541'],
},
];

const dataProvider = {
getList: jest.fn().mockResolvedValue({
data: defaultData,
total: defaultData.length,
totalPages: 1,
}),
getOne: jest.fn().mockResolvedValue({
data: specs,
Expand All @@ -60,8 +67,8 @@ const initialState = {
specs: {
data: {
api_1: specs,
}
}
},
},
},
},
};
Expand All @@ -78,7 +85,9 @@ describe('ApiSpecs', () => {

await wait(() => {
expect(
getByLabelText('resources.apis.specification.actions.search_or_select_application')
getByLabelText(
'resources.apis.specification.actions.search_or_select_application'
)
).not.toBeNull();
});
});
Expand Down
Loading
0