Skip to content

Commit

Permalink
release(1.6.0-RC4): merge release into main (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil91 authored Aug 1, 2023
1 parent ee1e0d0 commit 4f07c6b
Show file tree
Hide file tree
Showing 15 changed files with 299 additions and 29 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 1.6.0-RC4

### Change

- Connector Technical Integration page - connector configuration details added

### Bugfix

- App Management page access permission changed to add_apps
- Certificate Management page - approval/decline button only available for "pending" credential requests
- Permission validation 'Credential Mgmt' page activated

## 1.6.0-RC3

### Change
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@catena-x/portal-frontend",
"version": "v1.6.0-RC3",
"version": "v1.6.0-RC4",
"description": "Catena-X Portal Frontend",
"author": "Catena-X Contributors",
"license": "Apache-2.0",
Expand All @@ -26,7 +26,7 @@
]
},
"dependencies": {
"@catena-x/portal-shared-components": "^2.0.11",
"@catena-x/portal-shared-components": "^2.0.13",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@hookform/error-message": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div id="app"></div>
<!-- Do NOT change 'ENV' without changing 'custom_env_vars_anchor' in scripts/inject-dynamic-env.sh as well -->
<script>
const ENV = {PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.dev.demo.catena-x.net",CENTRALIDP_URL:"https://centralidp.dev.demo.catena-x.net/auth",BPDM_API_URL:"https://partners-pool.dev.demo.catena-x.net/api",SEMANTICS_URL:"https://semantics.dev.demo.catena-x.net"}
const ENV = {PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.dev.demo.catena-x.net",CENTRALIDP_URL:"https://centralidp.dev.demo.catena-x.net/auth",BPDM_API_URL:"https://partners-pool.dev.demo.catena-x.net/api",SEMANTICS_URL:"https://semantics.dev.demo.catena-x.net",MANAGED_IDENTITY_WALLETS_NEW_URL:"https://managed-identity-wallets-new.dev.demo.catena-x.net"}
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions scripts/inject-dynamic-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

custom_env_vars='{PORTAL_ASSETS_URL:"'$PORTAL_ASSETS_URL'",PORTAL_BACKEND_URL:"'$PORTAL_BACKEND_URL'",CENTRALIDP_URL:"'$CENTRALIDP_URL'",BPDM_API_URL:"'$BPDM_API_URL'",SEMANTICS_URL:"'$SEMANTICS_URL'"}'
custom_env_vars_anchor='{PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.dev.demo.catena-x.net",CENTRALIDP_URL:"https://centralidp.dev.demo.catena-x.net/auth",BPDM_API_URL:"https://partners-pool.dev.demo.catena-x.net/api",SEMANTICS_URL:"https://semantics.dev.demo.catena-x.net"}'
custom_env_vars='{PORTAL_ASSETS_URL:"'$PORTAL_ASSETS_URL'",PORTAL_BACKEND_URL:"'$PORTAL_BACKEND_URL'",CENTRALIDP_URL:"'$CENTRALIDP_URL'",BPDM_API_URL:"'$BPDM_API_URL'",SEMANTICS_URL:"'$SEMANTICS_URL'",MANAGED_IDENTITY_WALLETS_NEW_URL:"'$MANAGED_IDENTITY_WALLETS_NEW_URL'"}'
custom_env_vars_anchor='{PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.dev.demo.catena-x.net",CENTRALIDP_URL:"https://centralidp.dev.demo.catena-x.net/auth",BPDM_API_URL:"https://partners-pool.dev.demo.catena-x.net/api",SEMANTICS_URL:"https://semantics.dev.demo.catena-x.net",MANAGED_IDENTITY_WALLETS_NEW_URL:"https://managed-identity-wallets-new.dev.demo.catena-x.net"}'
index_html_reference=`cat /usr/share/nginx/html/index.html.reference`
index_html=${index_html_reference//$custom_env_vars_anchor/$custom_env_vars}
echo "$index_html" > /usr/share/nginx/html/index.html
16 changes: 16 additions & 0 deletions src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,23 @@
"owned": "Owned",
"managed": "Managed"
},
"configurationDetails": {
"title": "Connector Configuration for authentication flow",
"description": "Your edc instance need to get connected to the catena-x identity provider for the technical user authentication flow to fetch the user token and authenticate against the MIW. Additionally the MIW endpoint, authority BPN and your technical user need to get configured/set to ensure that the connection works correctly.",
"orderList": {
"title": "Below you can find the relevant details regarding all those values",
"centralAuth": "* central auth url: https:{{env}}/realms/CX-Central/protocol/openid-connect/token",
"clientId": "* client id: client id of your existing or newly created tech user - details how to: ",
"clientIdLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md",
"clientSecret": "* client secret: client id of your existing or newly created tech user - details how to: ",
"clientSecretLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md",
"authorityBpn": "* authority bpn: {{bpn}}",
"miwUrl": "* miw url: https:{{managedIdentityWalletApiBase}}",
"clickhere": "click here"
}
},
"helpText": "Get some help",
"helpTextNew": "Details Connector Configuration",
"headertitle": "Connector Registration",
"subheadertitle": "Connector",
"tabletitle": "Onboarded Connectors",
Expand Down
16 changes: 16 additions & 0 deletions src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,23 @@
"owned": "Owned",
"managed": "Managed"
},
"configurationDetails": {
"title": "Connector Configuration for authentication flow",
"description": "Your edc instance need to get connected to the catena-x identity provider for the technical user authentication flow to fetch the user token and authenticate against the MIW. Additionally the MIW endpoint, authority BPN and your technical user need to get configured/set to ensure that the connection works correctly.",
"orderList": {
"title": "Below you can find the relevant details regarding all those values",
"centralAuth": "* central auth url: https:{{env}}/realms/CX-Central/protocol/openid-connect/token",
"clientId": "* client id: client id of your existing or newly created tech user - details how to: ",
"clientIdLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md",
"clientSecret": "* client secret: client id of your existing or newly created tech user - details how to: ",
"clientSecretLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md",
"authorityBpn": "* authority bpn: {{bpn}}",
"miwUrl": "* miw url: https:{{managedIdentityWalletApiBase}}",
"clickhere": "click here"
}
},
"helpText": "Get some help",
"helpTextNew": "Details Connector Configuration",
"headertitle": "Connector Registration",
"subheadertitle": "Connector",
"tabletitle": "Onboarded Connectors",
Expand Down
56 changes: 34 additions & 22 deletions src/components/pages/AdminCredential/AdminCredentialElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { download } from 'utils/downloadUtils'
import { useFetchNewDocumentByIdMutation } from 'features/appManagement/apiSlice'
import { error, success } from 'services/NotifyService'
import { uniqueId } from 'lodash'
import { SubscriptionStatus } from 'features/apps/apiSlice'

export interface DummyData {
date: string
Expand Down Expand Up @@ -95,6 +96,7 @@ export default function AdminCredentialElements() {
status === StatusType.APPROVE
? success(t('content.adminCertificate.approvedMessage'))
: error(t('content.adminCertificate.declinedMessage'))
setRefresh(Date.now())
})
.catch(() => {
error(t('content.adminCertificate.errorMessage'))
Expand Down Expand Up @@ -165,28 +167,38 @@ export default function AdminCredentialElements() {
flex: 2.5,
renderCell: ({ row }: { row: CredentialData }) => (
<>
<Button
size="small"
color="error"
variant="contained"
className="statusBtn"
onClick={() =>
handleApproveDecline(row.credentialDetailId, StatusType.DECLINE)
}
>
{t('global.actions.decline')}
</Button>
<Button
size="small"
color="success"
variant="contained"
className="statusBtn ml-10"
onClick={() =>
handleApproveDecline(row.credentialDetailId, StatusType.APPROVE)
}
>
{t('global.actions.confirm')}
</Button>
{row.participantStatus === SubscriptionStatus.PENDING && (
<>
<Button
size="small"
color="error"
variant="contained"
className="statusBtn"
onClick={() =>
handleApproveDecline(
row.credentialDetailId,
StatusType.DECLINE
)
}
>
{t('global.actions.decline')}
</Button>
<Button
size="small"
color="success"
variant="contained"
className="statusBtn ml-10"
onClick={() =>
handleApproveDecline(
row.credentialDetailId,
StatusType.APPROVE
)
}
>
{t('global.actions.confirm')}
</Button>
</>
)}
</>
),
},
Expand Down
1 change: 1 addition & 0 deletions src/components/pages/AppOverview/AppOverview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
flex-wrap: wrap;
gap: 20px;
width: 1140px;
max-width: 100%;
margin: 0px auto;
padding-bottom: 40px;

Expand Down
156 changes: 156 additions & 0 deletions src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
/********************************************************************************
* Copyright (c) 2021, 2023 BMW Group AG
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { Trans, useTranslation } from 'react-i18next'
import {
Dialog,
DialogContent,
DialogHeader,
Typography,
} from '@catena-x/portal-shared-components'
import { useFetchOperatorBpnQuery } from 'features/connector/connectorApiSlice'
import {
getCentralIdp,
getManagedIdentityWalletsNewBase,
} from 'services/EnvironmentService'
import './EdcConnector.scss'

interface ConfigurationDetailsOverlayProps {
openDialog: boolean
handleOverlayClose: () => void
}

const ConfigurationDetailsOverlay = ({
openDialog = false,
handleOverlayClose,
}: ConfigurationDetailsOverlayProps) => {
const { t } = useTranslation()
const { data } = useFetchOperatorBpnQuery()

return (
<div className="detailsOverlay">
<Dialog
open={openDialog}
additionalModalRootStyles={{
width: '45%',
}}
>
<DialogHeader
title={t('content.edcconnector.configurationDetails.title')}
intro={t('content.edcconnector.configurationDetails.description')}
closeWithIcon={true}
onCloseWithIcon={() => {
handleOverlayClose()
}}
/>
<DialogContent
sx={{
padding: '0px 120px 40px 120px',
}}
>
<Typography
variant="body1"
sx={{
marginBottom: '10px',
}}
>
{t('content.edcconnector.configurationDetails.orderList.title')}
</Typography>
<Trans
values={{
env: t(getCentralIdp()),
}}
>
<Typography variant="body2" className="detailsBodyText">
{t(
'content.edcconnector.configurationDetails.orderList.centralAuth'
)}
</Typography>
</Trans>

<Typography variant="body2" className="detailsBodyText">
{t('content.edcconnector.configurationDetails.orderList.clientId')}{' '}
<span
className="detailsBodyLink"
onClick={() =>
window.open(
t(
'content.edcconnector.configurationDetails.orderList.clientSecretLink'
),
'_blank'
)
}
>
{t(
'content.edcconnector.configurationDetails.orderList.clickhere'
)}
</span>
</Typography>
<Typography variant="body2" className="detailsBodyText">
{t(
'content.edcconnector.configurationDetails.orderList.clientSecret'
)}{' '}
<span
className="detailsBodyLink"
onClick={() =>
window.open(
t(
'content.edcconnector.configurationDetails.orderList.clientSecretLink'
),
'_blank'
)
}
>
{t(
'content.edcconnector.configurationDetails.orderList.clickhere'
)}
</span>
</Typography>
{data && (
<Trans
values={{
bpn: data[0]?.bpn,
}}
>
<Typography variant="body2" className="detailsBodyText">
{t(
'content.edcconnector.configurationDetails.orderList.authorityBpn'
)}
</Typography>
</Trans>
)}
<Trans
values={{
managedIdentityWalletApiBase: t(
getManagedIdentityWalletsNewBase()
),
}}
>
<Typography variant="body2" className="detailsBodyText">
{t('content.edcconnector.configurationDetails.orderList.miwUrl')}
</Typography>
</Trans>
</DialogContent>
</Dialog>
</div>
)
}

export default ConfigurationDetailsOverlay
10 changes: 10 additions & 0 deletions src/components/pages/EdcConnector/EdcConnector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@
margin-bottom: 0px;
}
}

.detailsBodyText {
margin-bottom: 10px !important;
margin-left: 20px !important;
}

.detailsBodyLink {
cursor: pointer;
color: #0f71cb;
}
12 changes: 12 additions & 0 deletions src/components/pages/EdcConnector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import CreateDapsRegistration from './AddConnectorOverlay/components/CreateDapsR
import { SuccessErrorType } from 'features/admin/appuserApiSlice'
import { ManagedConnectorTableColumns } from './edcManagedConnectorTableColumns'
import { OwnConnectorTableColumns } from './edcOwnConnectorTableColumns'
import ConfigurationDetailsOverlay from './ConfigurationDetailsOverlay'

const EdcConnector = () => {
const { t } = useTranslation()
Expand Down Expand Up @@ -88,6 +89,10 @@ const EdcConnector = () => {
const [createDapsModalOpen, setCreateDapsModalOpen] = useState<boolean>(false)
useState<boolean>(false)
const [triggerDaps] = useTriggerDapsMutation()
const [
viewConfigurationDetailsOverlayOpen,
setViewConfigurationDetailsOverlayOpen,
] = useState<boolean>(false)

const onStepChange = () => {
setAddConnectorOverlayCurrentStep(0)
Expand Down Expand Up @@ -287,6 +292,10 @@ const EdcConnector = () => {
loading={loading}
onStepChange={onStepChange}
/>
<ConfigurationDetailsOverlay
openDialog={viewConfigurationDetailsOverlayOpen}
handleOverlayClose={() => setViewConfigurationDetailsOverlayOpen(false)}
/>
<PageHeader
title={t('content.edcconnector.headertitle')}
topPage={false}
Expand All @@ -297,6 +306,9 @@ const EdcConnector = () => {
text={'content.edcconnector.imagetext'}
onHelpButtonClicked={() => onHelpButtonClicked()}
onButtonClicked={() => setAddConnectorOverlayOpen(true)}
onNewHelpButtonClicked={() =>
setViewConfigurationDetailsOverlayOpen(true)
}
/>
</section>
<div className="connector-table-container">
Expand Down
Loading

0 comments on commit 4f07c6b

Please sign in to comment.