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

Commit 1538f30

Browse files
author
Ricardo Gomez-Ulmke
authored
Merge pull request #9 from solace-iot-team/feature-various-1
Feature various 1
2 parents a222583 + 0cdd0d6 commit 1538f30

File tree

60 files changed

+1318
-339
lines changed

Some content is hidden

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

60 files changed

+1318
-339
lines changed

ReleaseNotes.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22

33
Solace Async API Management.
44

5+
## Version 0.0.29
6+
* [API-M Admin & Developer Portal](https://github.com/solace-iot-team/async-apim/tree/main/apim-portal): 0.0.29
7+
* [API-M Server OpenAPI](https://github.com/solace-iot-team/async-apim/blob/main/apim-server/server/common/api.yml): 0.0.15
8+
* [API-M Server](https://github.com/solace-iot-team/async-apim/tree/main/apim-server): 0.0.9
9+
* [API-M Connector OpenAPI](https://github.com/solace-iot-team/platform-api): 0.5.7
10+
11+
#### API-M Admin & Developer Portal
12+
**New:**
13+
- **Monitor System Health**
14+
- New component to display system health (portal app, server, connector)
15+
- **System Health Check**
16+
- added health & version monitor for portal app
17+
- reloads portal app in case of error / version mismatch
18+
19+
**Fixes:**
20+
- **Re-render Components**
21+
- better control of re-render components - only when required
22+
- **Developer Portal User App**
23+
- fixed error on deleting an App Webhook
24+
25+
#### API-M Server OpenAPI
26+
27+
**Updated:**
28+
- **GET /apsMonitor/apsStatus**
29+
- added timestamp to result body
30+
31+
#### API-M Server
32+
**No Changes.**
33+
534
## Version 0.0.28
635
* [API-M Admin & Developer Portal](https://github.com/solace-iot-team/async-apim/tree/main/apim-portal): 0.0.28
736
* [API-M Server OpenAPI](https://github.com/solace-iot-team/async-apim/blob/main/apim-server/server/common/api.yml): 0.0.14

apim-portal/dev-build.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import s from 'shelljs';
22
import fs from 'fs';
33
import path from 'path';
4-
import { TAPPortalAbout } from './src/utils/Globals';
4+
import { TAPPortalAppAbout } from './src/utils/Globals';
55
import { OpenAPI as ApimConnectorOpenApi } from '@solace-iot-team/apim-connector-openapi-browser';
66
import { Constants } from './devel/lib/Constants';
77

@@ -103,9 +103,9 @@ const buildAbouts = () => {
103103
const funcName = 'buildAbouts';
104104
const logName = `${scriptDir}/${scriptName}.${funcName}()`;
105105

106-
const buildAbout = (name: string, description: string, packageJson: any, sha1: string): TAPPortalAbout => {
106+
const buildAbout = (name: string, description: string, packageJson: any, sha1: string): TAPPortalAppAbout => {
107107
const tsDate = new Date();
108-
const about: TAPPortalAbout = {
108+
const about: TAPPortalAppAbout = {
109109
name: name,
110110
description: description,
111111
author: packageJson.author,
@@ -125,7 +125,7 @@ const buildAbouts = () => {
125125
}
126126
return about;
127127
}
128-
const copyAbout = (about: TAPPortalAbout, outputFile: string) => {
128+
const copyAbout = (about: TAPPortalAppAbout, outputFile: string) => {
129129
const funcName = 'copyAbout';
130130
const logName = `${scriptDir}/${scriptName}.${funcName}()`;
131131
console.log(`${logName}: starting ...`);
@@ -143,10 +143,10 @@ const buildAbouts = () => {
143143
const packageJsonFile = `${CONSTANTS.ApimPortalDir}/package.json`;
144144
const packageJson = require(`${packageJsonFile}`);
145145
const sha1 = s.exec('git rev-parse HEAD').stdout.slice(0, -1);
146-
const adminPortalAbout: TAPPortalAbout = buildAbout(AdminPortalName, AdminPortalDescription, packageJson, sha1);
146+
const adminPortalAbout: TAPPortalAppAbout = buildAbout(AdminPortalName, AdminPortalDescription, packageJson, sha1);
147147
console.log(`${logName}: adminPortalAbout = ${JSON.stringify(adminPortalAbout, null, 2)}`);
148148
copyAbout(adminPortalAbout, CONSTANTS.OutputAdminPortalAboutFile);
149-
const developerPortalAbout: TAPPortalAbout = buildAbout(DeveloperPortalName, DeveloperPortalDescription, packageJson, sha1);
149+
const developerPortalAbout: TAPPortalAppAbout = buildAbout(DeveloperPortalName, DeveloperPortalDescription, packageJson, sha1);
150150
console.log(`${logName}: developerPortalAbout = ${JSON.stringify(developerPortalAbout, null, 2)}`);
151151
copyAbout(developerPortalAbout, CONSTANTS.OutputDeveloperPortalAboutFile);
152152
console.log(`${logName}: success.`);

apim-portal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "async-apim-portal",
3-
"version": "0.0.28",
3+
"version": "0.0.29",
44
"description": "Solace Async API Management Portal",
55
"repository": {
66
"type": "git",

apim-portal/src/admin-portal/AdminPortalAppRoutes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { ManageUsersPage } from './pages/ManageUsersPage';
99
import { ManageOrganizationsPage } from "./pages/ManageOrganizationsPage";
1010
import { ManageConnectorsPage } from "./pages/ManageConnectorsPage";
1111
import { ManageSystemSettingsPage } from "./pages/ManageSystemSettingsPage";
12-
import { ViewSystemHealthPage } from "./pages/ViewSystemHealthPage";
12+
import { MonitorSystemHealthPage } from "./pages/MonitorSystemHealthPage";
1313
import { ManageEnvironmentsPage } from "./pages/ManageEnvironmentsPage";
1414
import { ManageApisPage } from "./pages/ManageApisPage";
1515
import { ManageApiProductsPage } from "./pages/ManageApiProductsPage";
@@ -28,7 +28,7 @@ export const AdminPortalAppRoutes = (): Array<JSX.Element> => {
2828
<ProtectedRouteWithRbac path={EUIAdminPortalResourcePaths.ManageSystemConfigSettings} component={ManageSystemSettingsPage} exact key={EUIAdminPortalResourcePaths.ManageSystemConfigSettings} />,
2929
<ProtectedRouteWithRbac path={EUIAdminPortalResourcePaths.ManageSystemUsers} component={ManageUsersPage} exact key={EUIAdminPortalResourcePaths.ManageSystemUsers} />,
3030
<ProtectedRouteWithRbac path={EUIAdminPortalResourcePaths.ManageSystemOrganizations} component={ManageOrganizationsPage} exact key={EUIAdminPortalResourcePaths.ManageSystemOrganizations} />,
31-
<ProtectedRouteWithRbac path={EUIAdminPortalResourcePaths.MonitorSystemHealth} component={ViewSystemHealthPage} exact key={EUIAdminPortalResourcePaths.MonitorSystemHealth} />,
31+
<ProtectedRouteWithRbac path={EUIAdminPortalResourcePaths.MonitorSystemHealth} component={MonitorSystemHealthPage} exact key={EUIAdminPortalResourcePaths.MonitorSystemHealth} />,
3232
/* Organization */
3333
<ProtectedRouteWithRbacAndOrgAccess path={EUIAdminPortalResourcePaths.ManageOrganizationEnvironments} component={ManageEnvironmentsPage} exact key={EUIAdminPortalResourcePaths.ManageOrganizationEnvironments} />,
3434
<ProtectedRouteWithRbacAndOrgAccess path={EUIAdminPortalResourcePaths.ManageOrganizationApis} component={ManageApisPage} exact key={EUIAdminPortalResourcePaths.ManageOrganizationApis} />,

apim-portal/src/admin-portal/components/ManageApiProducts/ListApiProducts.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ export const ListApiProducts: React.FC<IListApiProductsProps> = (props: IListApi
9999
}
100100

101101
React.useEffect(() => {
102+
// const funcName = 'useEffect([])';
103+
// const logName = `${componentName}.${funcName}()`;
104+
// console.log(`${logName}: mounting ...`);
102105
doInitialize();
103106
}, []); /* eslint-disable-line react-hooks/exhaustive-deps */
104107

apim-portal/src/admin-portal/components/ManageApiProducts/ManageApiProducts.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export const ManageApiProducts: React.FC<IManageApiProductsProps> = (props: IMan
7777
const [showEditComponent, setShowEditComponent] = React.useState<boolean>(false);
7878
const [showDeleteComponent, setShowDeleteComponent] = React.useState<boolean>(false);
7979
const [showNewComponent, setShowNewComponent] = React.useState<boolean>(false);
80+
const [refreshCounter, setRefreshCounter] = React.useState<number>(0);
8081

8182
// * useEffect Hooks *
8283
React.useEffect(() => {
@@ -192,6 +193,7 @@ export const ManageApiProducts: React.FC<IManageApiProductsProps> = (props: IMan
192193
const onDeleteManagedObjectSuccess = (apiCallState: TApiCallState) => {
193194
setApiCallStatus(apiCallState);
194195
setNewComponentState(E_COMPONENT_STATE.MANAGED_OBJECT_LIST_VIEW);
196+
setRefreshCounter(refreshCounter + 1);
195197
}
196198
const onNewManagedObjectSuccess = (apiCallState: TApiCallState, newId: TManagedObjectId, newDisplayName: string) => {
197199
setApiCallStatus(apiCallState);
@@ -290,7 +292,7 @@ export const ManageApiProducts: React.FC<IManageApiProductsProps> = (props: IMan
290292

291293
{showListComponent &&
292294
<ListApiProducts
293-
key={componentState.previousState}
295+
key={refreshCounter}
294296
organizationId={props.organizationId}
295297
onSuccess={onListManagedObjectsSuccess}
296298
onError={onSubComponentError}

apim-portal/src/admin-portal/components/ManageApis/ListApis.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ export const ListApis: React.FC<IListApisProps> = (props: IListApisProps) => {
120120
}
121121

122122
React.useEffect(() => {
123+
// const funcName = 'useEffect([])';
124+
// const logName = `${componentName}.${funcName}()`;
125+
// console.log(`${logName}: mounting ...`);
123126
doInitialize();
124127
}, []); /* eslint-disable-line react-hooks/exhaustive-deps */
125128

apim-portal/src/admin-portal/components/ManageApis/ManageApis.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ export const ManageApis: React.FC<IManageApisProps> = (props: IManageApisProps)
7979
const [showDeleteComponent, setShowDeleteComponent] = React.useState<boolean>(false);
8080
const [showNewComponent, setShowNewComponent] = React.useState<boolean>(false);
8181
const [showImportEventPortalComponent, setShowImportEventPortalComponent] = React.useState<boolean>(false);
82-
82+
const [refreshCounter, setRefreshCounter] = React.useState<number>(0);
83+
8384
// * useEffect Hooks *
8485
React.useEffect(() => {
8586
setNewComponentState(E_COMPONENT_STATE.MANAGED_OBJECT_LIST_VIEW);
@@ -206,6 +207,7 @@ export const ManageApis: React.FC<IManageApisProps> = (props: IManageApisProps)
206207
const onDeleteManagedObjectSuccess = (apiCallState: TApiCallState) => {
207208
setApiCallStatus(apiCallState);
208209
setNewComponentState(E_COMPONENT_STATE.MANAGED_OBJECT_LIST_VIEW);
210+
setRefreshCounter(refreshCounter + 1);
209211
}
210212
const onNewManagedObjectSuccess = (apiCallState: TApiCallState, newId: TManagedObjectId, newDisplayName: string) => {
211213
setApiCallStatus(apiCallState);
@@ -239,8 +241,6 @@ export const ManageApis: React.FC<IManageApisProps> = (props: IManageApisProps)
239241
}
240242

241243
const calculateShowStates = (componentState: TComponentState) => {
242-
const funcName = 'calculateShowStates';
243-
const logName = `${componentName}.${funcName}()`;
244244
if(!componentState.currentState || componentState.currentState === E_COMPONENT_STATE.UNDEFINED) {
245245
setShowListComponent(false);
246246
setShowViewComponent(false);
@@ -307,9 +307,6 @@ export const ManageApis: React.FC<IManageApisProps> = (props: IManageApisProps)
307307
setShowNewComponent(false);
308308
setShowImportEventPortalComponent(true);
309309
}
310-
else {
311-
throw new Error(`${logName}: unknown state combination, componentState=${JSON.stringify(componentState, null, 2)}`);
312-
}
313310
}
314311

315312
return (
@@ -323,7 +320,7 @@ export const ManageApis: React.FC<IManageApisProps> = (props: IManageApisProps)
323320

324321
{showListComponent &&
325322
<ListApis
326-
key={componentState.previousState}
323+
key={refreshCounter}
327324
organizationId={props.organizationId}
328325
onSuccess={onListManagedObjectsSuccess}
329326
onError={onSubComponentError}

apim-portal/src/admin-portal/components/ManageApps/EditAppAttributes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export const EditAppAttributes: React.FC<IEditAppAttributesProps> = (props: IEdi
185185
const transformFormDataToManagedObject = (formData: TManagedObjectFormData): TManagedObject => {
186186
const funcName = 'transformFormDataToManagedObject';
187187
const logName = `${componentName}.${funcName}()`;
188-
console.log(`${logName}: formData=${JSON.stringify(formData, null, 2)}`);
188+
// console.log(`${logName}: formData=${JSON.stringify(formData, null, 2)}`);
189189
if(!managedObject) throw new Error(`${logName}: managedObject is undefined`);
190190
const mo: TManagedObject = {
191191
...managedObject,

apim-portal/src/admin-portal/components/ManageApps/ListApps.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ export const ListApps: React.FC<IListAppsProps> = (props: IListAppsProps) => {
143143
}
144144

145145
React.useEffect(() => {
146+
// const funcName = 'useEffect([])';
147+
// const logName = `${componentName}.${funcName}()`;
148+
// console.log(`${logName}: mounting ...`);
146149
doInitialize();
147150
}, []); /* eslint-disable-line react-hooks/exhaustive-deps */
148151

0 commit comments

Comments
 (0)