diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index 9df7a8455..a7fc918da 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -446,7 +446,6 @@ "type": "Steckertyp", "details": "Status", "location": "Location", - "status": "DAPS Auth Status", "tooltipText": "Connector's status is pending", "sdDescription": "SD Registration", "sdRegistrationToolTip": "Die Selbstbeschreibung wurde ausgelöst. Der Vorgang kann bis zu ein paar Minuten dauern.", @@ -500,11 +499,6 @@ "intro": "Register a managed connector of your customer / 3rd party provided. This selection is mainly service provider relevant, which offers managed connectors to data provider/consumer. If you want to register your own connector, please use the selection above.", "disableDescription": "Diese Option ist nur verfügbar, wenn Ihr Unternehmen App-Anbieter oder Dienstanbieter ist. Unternehmensrollen können vom Unternehmensadministrator /company-role geändert werden" }, - "daps": { - "title": "Create DAPS Registration", - "intro": "Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts", - "error": "The daps registration failed. Please reverify the uploaded document" - }, "companyconnectorlabel": "Verbinden Sie den Unternehmenskonnektor", "connectorasaservice": "Connector-as-a-service", "insertform": { diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index 119dbca1e..156ff85db 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -445,7 +445,6 @@ "type": "Connector Type", "details": "Status", "location": "Location", - "status": "DAPS Auth Status", "tooltipText": "Connector's status is pending", "sdDescription": "SD Registration", "sdRegistrationToolTip": "The Self-Description is triggered. Process might take up to a couple of minutes.", @@ -499,11 +498,6 @@ "intro": "Register a managed connector of your customer / 3rd party provided. This selection is mainly service provider relevant, which offers managed connectors to data provider/consumer. If you want to register your own connector, please use the selection above.", "disableDescription": "This option is only available if your company is App Provider or Service Provider. Company roles can get changed by the company admin /company-role" }, - "daps": { - "title": "Create DAPS Registration", - "intro": "To retrigger the daps authentication interface, please upload the public authentication key/certificate of your connector.", - "error": "The daps registration failed. Please reverify the uploaded document" - }, "companyconnectorlabel": "Connect company connector", "connectorasaservice": "Connector-as-a-service", "insertform": { diff --git a/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx b/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx index 807bce887..03b1a1016 100644 --- a/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx +++ b/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx @@ -227,13 +227,6 @@ const ConnectorInsertForm = ({ const { t } = useTranslation() const theme = useTheme() const { spacing } = theme - //TO-DO: Enable when DAPS enabled - // const dropzoneProps = { - // accept: { - // 'application/x-pem-file': [], - // 'application/x-x509-ca-cert': [], - // }, - // } return ( @@ -368,29 +361,6 @@ const ConnectorInsertForm = ({ /> )} - {/* TO-DO: Enable when DAPS enabled */} - {/*
- -
*/} diff --git a/src/components/pages/EdcConnector/AddConnectorOverlay/components/CreateDapsRegistration.tsx b/src/components/pages/EdcConnector/AddConnectorOverlay/components/CreateDapsRegistration.tsx deleted file mode 100644 index 32c6ead6b..000000000 --- a/src/components/pages/EdcConnector/AddConnectorOverlay/components/CreateDapsRegistration.tsx +++ /dev/null @@ -1,150 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021, 2023 Mercedes-Benz Group AG and 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 React, { useState } from 'react' -import { useTranslation } from 'react-i18next' -import { - Dialog, - DialogContent, - Button, - DialogActions, - DialogHeader, - CircleProgress, - Typography, - DropArea, -} from '@catena-x/portal-shared-components' -import Box from '@mui/material/Box' -import ErrorOutlineOutlinedIcon from '@mui/icons-material/ErrorOutlineOutlined' -import './EdcComponentStyles.scss' -import { Dropzone } from '../../../../shared/basic/Dropzone' - -interface CreateDapsRegistrationProps { - openDialog?: boolean - handleOverlayClose: React.MouseEventHandler - handleConfirmClick: (data: any) => {} - loading: boolean -} - -const CreateDapsRegistration = ({ - openDialog = false, - handleOverlayClose, - handleConfirmClick, - loading, -}: CreateDapsRegistrationProps) => { - const { t } = useTranslation() - const [error, setError] = useState(false) - const [file, setFile] = useState() - const dropzoneProps = { - accept: { - 'application/x-pem-file': [], - 'application/x-x509-ca-cert': [], - }, - } - - return ( -
- - - - { - setFile(file) - setError(false) - }} - DropStatusHeader={false} - DropArea={(props) => } - /> - {error && ( -
- - - {t('content.edcconnector.modal.daps.error')} - -
- )} -
- - - {!loading && ( - - )} - {loading && ( - - - - )} - -
-
- ) -} - -export default CreateDapsRegistration diff --git a/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx b/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx index b2c28242b..c381bc454 100644 --- a/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx +++ b/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx @@ -53,7 +53,6 @@ export type FormFieldsType = { ConnectorURL: string ConnectorSubscriptionId: string ConnectorLocation: string - // ConnectorDoc: any TO-DO: Enable when DAPS enabled } const formFields = { @@ -61,7 +60,6 @@ const formFields = { ConnectorURL: '', ConnectorLocation: '', ConnectorSubscriptionId: '', - // ConnectorDoc: '', TO-DO: Enable when DAPS enabled } const AddConnectorOverlay = ({ @@ -100,7 +98,6 @@ const AddConnectorOverlay = ({ 'ConnectorURL', 'ConnectorLocation', 'ConnectorSubscriptionId', - // 'ConnectorDoc', TO-DO: Enable when DAPS enabled ]) if (validateFields) { onFormConfirmClick(getValues() as FormFieldsType) diff --git a/src/components/pages/EdcConnector/edcConnectorTableColumns.tsx b/src/components/pages/EdcConnector/edcConnectorTableColumns.tsx index b56b30542..d15b7f116 100644 --- a/src/components/pages/EdcConnector/edcConnectorTableColumns.tsx +++ b/src/components/pages/EdcConnector/edcConnectorTableColumns.tsx @@ -70,25 +70,6 @@ export const ConnectorTableColumns = ( {row.location} ), }, - // { - // field: 'dapsRegistrationSuccessful', - // headerName: t('content.edcconnector.columns.status'), - // flex: 1.2, - // sortable: false, - // disableColumnMenu: true, - // align: 'center', - // headerAlign: 'center', - // renderCell: ({ row }: { row: any }) => ( - // - // - // - // ), - // }, { field: 'selfDescriptionDocumentId', headerName: t('content.edcconnector.columns.sdDescription'), diff --git a/src/components/pages/EdcConnector/index.tsx b/src/components/pages/EdcConnector/index.tsx index 35cf628e5..bef1fa3b6 100644 --- a/src/components/pages/EdcConnector/index.tsx +++ b/src/components/pages/EdcConnector/index.tsx @@ -44,12 +44,10 @@ import { ConnectType, useFetchConnectorsQuery, ConnectorResponseBody, - useTriggerDapsMutation, useFetchManagedConnectorsQuery, } from 'features/connector/connectorApiSlice' import { ServerResponseOverlay } from 'components/overlays/ServerResponse' import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline' -import CreateDapsRegistration from './AddConnectorOverlay/components/CreateDapsRegistration' import { SuccessErrorType } from 'features/admin/appuserApiSlice' import { ManagedConnectorTableColumns } from './edcManagedConnectorTableColumns' import { OwnConnectorTableColumns } from './edcOwnConnectorTableColumns' @@ -86,9 +84,6 @@ const EdcConnector = () => { const [notificationMessage, setNotificationMessage] = useState( t('content.edcconnector.snackbar.successmessage') ) - const [createDapsModalOpen, setCreateDapsModalOpen] = useState(false) - useState(false) - const [triggerDaps] = useTriggerDapsMutation() const [ viewConfigurationDetailsOverlayOpen, setViewConfigurationDetailsOverlayOpen, @@ -125,14 +120,7 @@ const EdcConnector = () => { const onTableCellClick = (params: GridCellParams) => { // Show overlay only when detail field clicked - if ( - params.field === 'dapsRegistrationSuccessful' && - !params.row.dapsRegistrationSuccessful - ) { - setSelectedConnector(params.row as ConnectorContentAPIResponse) - //TO-DO: Enable when DAPS enabled - //setCreateDapsModalOpen(true) - } + setSelectedConnector(params.row as ConnectorContentAPIResponse) } const onConfirmClick = (selected: ConnectorType) => { @@ -148,8 +136,6 @@ const EdcConnector = () => { body.append('ConnectorUrl', data.ConnectorURL) body.append('Location', data.ConnectorLocation) body.append('Status', ConnectorStatusType.PENDING) - //TO-DO: Enable when DAPS enabled - // body.append('Certificate', data.ConnectorDoc) setLoading(true) if (selectedService.type === ConnectType.COMPANY_CONNECTOR) { await createConnector(body) @@ -193,25 +179,6 @@ const EdcConnector = () => { }) } - const onUploadImage = async (file: any) => { - setAction('daps') - setLoading(true) - const data = { - file: file, - connectorId: selectedConnector.id || '', - } - await triggerDaps(data) - .unwrap() - .then(() => { - showOverlay(true) - }) - .catch(() => { - setLoading(false) - showOverlay(false) - }) - setCreateDapsModalOpen(false) - } - const isCreate = () => { return action === 'create' } @@ -277,12 +244,6 @@ const EdcConnector = () => { handleConfirmClick={() => deleteSelectedConnector()} loading={loading} /> - setCreateDapsModalOpen(false)} - handleConfirmClick={(file) => onUploadImage(file)} - loading={loading} - /> ({ - query: (data) => { - const body = new FormData() - body.append('Certificate', data.file) - return { - url: `/api/administration/Connectors/trigger-daps/${data.connectorId}`, - method: 'POST', - body, - } - }, - }), fetchConnectors: builder.query< PaginResult, PaginFetchArgs @@ -146,7 +134,6 @@ export const { useCreateManagedConnectorMutation, useDeleteConnectorMutation, useFetchConnectorsQuery, - useTriggerDapsMutation, useFetchManagedConnectorsQuery, useFetchOfferSubscriptionsQuery, useFetchOperatorBpnQuery,