Skip to content

Commit

Permalink
updates(daps): remove all daps related code (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
manojava-gk authored Aug 18, 2023
1 parent 066f143 commit e3fbde4
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 267 deletions.
6 changes: 0 additions & 6 deletions src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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": {
Expand Down
6 changes: 0 additions & 6 deletions src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Box sx={{ width: '100%' }} className="connector-insert-form">
Expand Down Expand Up @@ -368,29 +361,6 @@ const ConnectorInsertForm = ({
/>
</div>
)}
{/* TO-DO: Enable when DAPS enabled */}
{/* <div className="form-input">
<ConnectorFormInput
{...{
control,
trigger,
errors,
name: 'ConnectorDoc',
type: 'dropzone',
rules: {
required: true,
},
label: t('content.edcconnector.modal.insertform.doc.label'),
dropzoneProps: dropzoneProps,
helperText: t(
'content.edcconnector.modal.insertform.doc.error'
),
tooltipMsg: t(
'content.edcconnector.modal.insertform.doc.tooltipMsg'
),
}}
/>
</div> */}
</form>
</Grid>
</Grid>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ export type FormFieldsType = {
ConnectorURL: string
ConnectorSubscriptionId: string
ConnectorLocation: string
// ConnectorDoc: any TO-DO: Enable when DAPS enabled
}

const formFields = {
ConnectorName: '',
ConnectorURL: '',
ConnectorLocation: '',
ConnectorSubscriptionId: '',
// ConnectorDoc: '', TO-DO: Enable when DAPS enabled
}

const AddConnectorOverlay = ({
Expand Down Expand Up @@ -100,7 +98,6 @@ const AddConnectorOverlay = ({
'ConnectorURL',
'ConnectorLocation',
'ConnectorSubscriptionId',
// 'ConnectorDoc', TO-DO: Enable when DAPS enabled
])
if (validateFields) {
onFormConfirmClick(getValues() as FormFieldsType)
Expand Down
19 changes: 0 additions & 19 deletions src/components/pages/EdcConnector/edcConnectorTableColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,6 @@ export const ConnectorTableColumns = (
<Typography variant="body2">{row.location}</Typography>
),
},
// {
// field: 'dapsRegistrationSuccessful',
// headerName: t('content.edcconnector.columns.status'),
// flex: 1.2,
// sortable: false,
// disableColumnMenu: true,
// align: 'center',
// headerAlign: 'center',
// renderCell: ({ row }: { row: any }) => (
// <Box>
// <LockIcon
// sx={{
// color: row.dapsRegistrationSuccessful ? 'green' : '#b6b6b6',
// cursor: 'pointer',
// }}
// />
// </Box>
// ),
// },
{
field: 'selfDescriptionDocumentId',
headerName: t('content.edcconnector.columns.sdDescription'),
Expand Down
41 changes: 1 addition & 40 deletions src/components/pages/EdcConnector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -86,9 +84,6 @@ const EdcConnector = () => {
const [notificationMessage, setNotificationMessage] = useState<string>(
t('content.edcconnector.snackbar.successmessage')
)
const [createDapsModalOpen, setCreateDapsModalOpen] = useState<boolean>(false)
useState<boolean>(false)
const [triggerDaps] = useTriggerDapsMutation()
const [
viewConfigurationDetailsOverlayOpen,
setViewConfigurationDetailsOverlayOpen,
Expand Down Expand Up @@ -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) => {
Expand All @@ -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)
Expand Down Expand Up @@ -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'
}
Expand Down Expand Up @@ -277,12 +244,6 @@ const EdcConnector = () => {
handleConfirmClick={() => deleteSelectedConnector()}
loading={loading}
/>
<CreateDapsRegistration
openDialog={createDapsModalOpen}
handleOverlayClose={() => setCreateDapsModalOpen(false)}
handleConfirmClick={(file) => onUploadImage(file)}
loading={loading}
/>
<AddConnectorOverlay
openDialog={addConnectorOverlayOpen}
handleOverlayClose={closeAndResetModalState}
Expand Down
Loading

0 comments on commit e3fbde4

Please sign in to comment.