uniqueId(row.idShort)}
- rowHeight={50}
- hasBorder={false}
- noRowsMsg={t('content.digitaltwin.table.norows').replace(
- '{data}',
- searchValue
- )}
- />
-
- {twinList.totalPages !== twinList.currentPage && (
- setPageNumber((prevState) => prevState + 1)}
- />
- )}
-
-
- )
-}
-
-export default TwinTable
diff --git a/src/components/pages/DigitalTwins/index.tsx b/src/components/pages/DigitalTwins/index.tsx
deleted file mode 100644
index a9b0cb0a0..000000000
--- a/src/components/pages/DigitalTwins/index.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2021, 2023 T-Systems International GmbH 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 TwinTable from './TwinTable'
-import { useState } from 'react'
-import DigitalTwinDetailDialog from './DigitalTwinDetailDialog'
-import { useDispatch } from 'react-redux'
-import { fetchTwinById } from 'features/digitalTwins/actions'
-import StageHeader from 'components/shared/frame/StageHeader'
-import { useTranslation } from 'react-i18next'
-import { AppDispatch } from 'features/store'
-
-export default function DigitalTwins() {
- const { t } = useTranslation()
- const dispatch = useDispatch()
- const [showTwin, setShowTwin] = useState(false)
-
- const onTwinSelect = (id: string) => {
- setShowTwin(true)
- const encodedId = encodeURIComponent(id)
- dispatch(fetchTwinById(encodedId))
- }
-
- return (
- <>
-
-
-
-
- setShowTwin(false)}
- />
- >
- )
-}
diff --git a/src/features/digitalTwins/actions.ts b/src/features/digitalTwins/actions.ts
deleted file mode 100644
index 27a8e92f1..000000000
--- a/src/features/digitalTwins/actions.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2021, 2023 T-Systems International GmbH 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 { createAsyncThunk } from '@reduxjs/toolkit'
-import { Api } from './api'
-import { FilterParams } from './types'
-
-const fetchDigitalTwins = createAsyncThunk(
- 'fetch twins',
- async ({ filter }: { filter: FilterParams }) => {
- try {
- return await Api.getInstance().getTwins(filter)
- } catch (error: unknown) {
- console.error('api call error:', error)
- throw Error('DigitalTwin api call error')
- }
- }
-)
-const fetchTwinById = createAsyncThunk(
- 'fetch twin by id',
- async (id: string) => {
- try {
- return await Api.getInstance().getTwinById(id)
- } catch (error: unknown) {
- console.error('api call error:', error)
- throw Error('Get twin by id api call error')
- }
- }
-)
-
-const fetchTwinForSearch = createAsyncThunk(
- 'fetch twin for search',
- async ({ key, value }: { key: string; value: string }) => {
- try {
- const response = await Api.getInstance().getTwinForSearch(
- encodeURIComponent(JSON.stringify([{ key, value }]))
- )
-
- const mappedData = await Promise.all([
- ...response.map((id: string) => Api.getInstance().getTwinById(id)),
- ])
-
- return mappedData
- } catch (error) {
- console.error('api call error:', error)
- throw Error('Get twin by id for search api call error')
- }
- }
-)
-
-export { fetchDigitalTwins, fetchTwinById, fetchTwinForSearch }
diff --git a/src/features/digitalTwins/api.ts b/src/features/digitalTwins/api.ts
deleted file mode 100644
index 894d21679..000000000
--- a/src/features/digitalTwins/api.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2021, 2023 T-Systems International GmbH 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 qs from 'qs'
-import { HttpClient } from 'utils/HttpClient'
-import { FilterParams, ShellDescriptor, TwinList } from './types'
-import { getSemanticApiBase } from 'services/EnvironmentService'
-import { getHeaders } from 'services/RequestService'
-
-export class Api extends HttpClient {
- private static classInstance?: Api
-
- public constructor() {
- super(`${getSemanticApiBase()}/registry`)
- }
-
- public static getInstance() {
- if (!this.classInstance) {
- this.classInstance = new Api()
- }
- return this.classInstance
- }
-
- public getTwins = (filters: FilterParams) =>
- this.instance.get(
- `/registry/shell-descriptors?${qs.stringify(filters)}`,
- getHeaders()
- )
-
- public getTwinById = (id: string) =>
- this.instance.get(
- `/registry/shell-descriptors/${id}`,
- getHeaders()
- )
-
- public getTwinForSearch = (search: string) =>
- this.instance.get(`lookup/shells?assetIds=${search}`, getHeaders())
-}
diff --git a/src/features/digitalTwins/slice.ts b/src/features/digitalTwins/slice.ts
deleted file mode 100644
index 9c3bcb6ba..000000000
--- a/src/features/digitalTwins/slice.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2021, 2023 T-Systems International GmbH 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 { createSlice } from '@reduxjs/toolkit'
-import { RootState } from 'features/store'
-import { fetchDigitalTwins, fetchTwinById, fetchTwinForSearch } from './actions'
-import { DigitalTwinsInitialState, ShellDescriptor, TwinList } from './types'
-
-const defaultTwins: TwinList = {
- items: [],
- totalItems: 0,
- itemCount: 0,
- currentPage: 0,
- totalPages: 0,
-}
-
-const initialState: DigitalTwinsInitialState = {
- twinList: defaultTwins,
- twin: null,
- loading: false,
- error: '',
-}
-
-const twinsSlice = createSlice({
- name: 'twins',
- initialState,
- reducers: {},
- extraReducers: (builder) => {
- builder.addCase(fetchDigitalTwins.pending, (state) => {
- state.twinList = defaultTwins
- state.loading = true
- state.error = ''
- })
- builder.addCase(fetchDigitalTwins.fulfilled, (state, { payload }) => {
- state.twinList = payload as TwinList
- state.loading = false
- state.error = ''
- })
- builder.addCase(fetchDigitalTwins.rejected, (state, action) => {
- state.twinList = defaultTwins
- state.loading = false
- state.error = action.error.message as string
- })
-
- builder.addCase(fetchTwinById.pending, (state) => {
- state.twin = null
- state.loading = true
- state.error = ''
- })
- builder.addCase(fetchTwinById.fulfilled, (state, { payload }) => {
- state.twin = payload as ShellDescriptor
- state.loading = false
- state.error = ''
- })
- builder.addCase(fetchTwinById.rejected, (state, action) => {
- state.twin = null
- state.loading = false
- state.error = action.error.message as string
- })
-
- builder.addCase(fetchTwinForSearch.pending, (state, { payload }) => {
- state.twinList = defaultTwins
- state.loading = true
- state.error = ''
- })
- builder.addCase(fetchTwinForSearch.fulfilled, (state, { payload }) => {
- state.twinList = { ...state.twinList, currentPage: 0, items: payload }
- state.error = ''
- state.loading = false
- })
- builder.addCase(fetchTwinForSearch.rejected, (state, action) => {
- state.twinList = { ...state.twinList, items: [] }
- state.loading = false
- state.error = action.error.message as string
- })
- },
-})
-
-export const twinsSelector = (state: RootState): DigitalTwinsInitialState =>
- state.twins
-
-export default twinsSlice
diff --git a/src/features/digitalTwins/types.ts b/src/features/digitalTwins/types.ts
deleted file mode 100644
index 0d6673ebb..000000000
--- a/src/features/digitalTwins/types.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2021, 2023 T-Systems International GmbH 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 { Nullable } from 'types/MainTypes'
-
-export interface DigitalTwinsInitialState {
- twinList: TwinList
- twin: Nullable
- loading: boolean
- error: string
-}
-
-export type FilterParams = {
- readonly page: number
- readonly pageSize: number
-}
-
-export interface TwinList {
- items: Array
- totalItems: number
- itemCount: number
- currentPage: number
- totalPages: number
-}
-
-export interface ShellDescriptor {
- description: Description[]
- globalAssetId: {
- value: [string]
- }
- idShort: string
- identification: string
- specificAssetIds: [
- {
- key: string
- semanticId: SemanticId
- value: string
- }
- ]
- submodelDescriptors: SubmodelDescriptors[]
-}
-
-export interface SubmodelDescriptors {
- description: Description[]
- endpoints: Endpoints[]
- idShort: string
- identification: string
- semanticId: SemanticId
-}
-
-interface Description {
- language: string
- text: string
-}
-
-interface Endpoints {
- interface: string
- protocolInformation: {
- endpointAddress: string
- endpointProtocol: string
- endpointProtocolVersion: string
- subprotocol: string
- subprotocolBody: string
- subprotocolBodyEncoding: string
- }
-}
-
-interface SemanticId {
- value: string[]
-}
diff --git a/src/features/store.ts b/src/features/store.ts
index f6e1df903..ba87447a5 100644
--- a/src/features/store.ts
+++ b/src/features/store.ts
@@ -26,7 +26,6 @@ import control from './control'
import info from './info'
import userSliceDep from './user/slice'
import partnerNetworkSlice from './partnerNetwork/slice'
-import twinsSlice from './digitalTwins/slice'
import connectorSlice from './connector/slice'
import notificationSliceDep from './notification/slice'
import ErrorSlice from './error/slice'
@@ -85,7 +84,6 @@ export const reducers = {
semanticModels: modelsSlice.reducer,
companyRoles: updateCompanyRoleSlice.reducer,
user: userSliceDep,
- twins: twinsSlice.reducer,
partnerNetwork: partnerNetworkSlice.reducer,
connector: connectorSlice.reducer,
notification: notificationSliceDep.reducer,
diff --git a/src/services/EnvironmentService.ts b/src/services/EnvironmentService.ts
index 490632e0c..25a44bf38 100644
--- a/src/services/EnvironmentService.ts
+++ b/src/services/EnvironmentService.ts
@@ -39,8 +39,6 @@ export const getSemanticApiBase = () =>
export const getClientIdSemantic = () => 'Cl3-CX-Semantic'
-export const getClientIdDigitalTwin = () => 'Cl4-CX-DigitalTwin'
-
export const getManagedIdentityWalletsNewBase = () =>
typeof ENV === 'undefined' ? '' : ENV.MANAGED_IDENTITY_WALLETS_NEW_URL
@@ -52,7 +50,6 @@ const EnvironmentService = {
getSemanticApiBase,
getClientId,
getClientIdSemantic,
- getClientIdDigitalTwin,
getManagedIdentityWalletsNewBase,
}
diff --git a/src/services/UserService.ts b/src/services/UserService.ts
index 080d457ff..a8d9ae99c 100644
--- a/src/services/UserService.ts
+++ b/src/services/UserService.ts
@@ -26,7 +26,6 @@ import {
getCentralIdp,
getClientId,
getClientIdSemantic,
- getClientIdDigitalTwin,
} from './EnvironmentService'
import { error, info } from './LogService'
import { store } from 'features/store'
@@ -44,12 +43,6 @@ const keycloakConfigSemantic: Keycloak.KeycloakConfig = {
clientId: getClientIdSemantic(),
}
-const keycloakConfigDigitalTwin: Keycloak.KeycloakConfig = {
- url: getCentralIdp(),
- realm: 'CX-Central',
- clientId: getClientIdDigitalTwin(),
-}
-
// TODO: add an ESLint exception until there is a solution
/* eslint @typescript-eslint/no-explicit-any: "off" */
const KC = new (Keycloak as any)(keycloakConfig)
@@ -110,8 +103,7 @@ const getTenant = () => KC.tokenParsed?.tenant
// not sustainable because client roles need to be unique across all clients
const getRoles = () =>
KC.tokenParsed?.resource_access[keycloakConfig.clientId]?.roles.concat(
- KC.tokenParsed?.resource_access[keycloakConfigSemantic.clientId]?.roles,
- KC.tokenParsed?.resource_access[keycloakConfigDigitalTwin.clientId]?.roles
+ KC.tokenParsed?.resource_access[keycloakConfigSemantic.clientId]?.roles
)
const hasRole = (role: string) => getRoles()?.includes(role)
diff --git a/src/types/Config.tsx b/src/types/Config.tsx
index 6571924e9..1732555d4 100644
--- a/src/types/Config.tsx
+++ b/src/types/Config.tsx
@@ -30,7 +30,6 @@ import AppReleaseProcess from 'components/pages/AppReleaseProcess'
import Connector from 'components/pages/Connector'
import Contact from 'components/pages/Contact'
import CookiePolicy from 'components/pages/CookiePolicy'
-import DigitalTwins from 'components/pages/DigitalTwins'
import EdcConnector from 'components/pages/EdcConnector'
import Home from 'components/pages/Home'
import Imprint from 'components/pages/Imprint'
@@ -158,11 +157,6 @@ export const ALL_PAGES: IPage[] = [
role: ROLES.SEMANTICHUB_VIEW,
element: ,
},
- {
- name: PAGES.DIGITALTWIN,
- role: ROLES.DIGITALTWIN_VIEW,
- element: ,
- },
{
name: PAGES.SEMANTICHUB,
role: ROLES.SEMANTICHUB_VIEW,
@@ -711,7 +705,7 @@ export const mainMenuFullTree = [
},
{
name: PAGES.DATA_MANAGEMENT,
- children: [{ name: PAGES.SEMANTICHUB }, { name: PAGES.DIGITALTWIN }],
+ children: [{ name: PAGES.SEMANTICHUB }],
},
{ name: PAGES.PARTNER_NETWORK },
{
diff --git a/src/types/Constants.ts b/src/types/Constants.ts
index 787cbf869..a9cda492f 100644
--- a/src/types/Constants.ts
+++ b/src/types/Constants.ts
@@ -37,7 +37,6 @@ export enum PAGES {
SERVICE_MARKETPLACE_DETAIL = 'servicemarketplacedetail',
APP_DETAIL = 'appdetail',
DATA_MANAGEMENT = 'datamanagement',
- DIGITALTWIN = 'digitaltwin',
SEMANTICHUB = 'semantichub',
CONNECTOR = 'connector',
ACCOUNT = 'account',
@@ -176,9 +175,6 @@ export enum ROLES {
APPOVERVIEW_VIEW = 'add_apps',
SERVICEOVERVIEW_VIEW = 'add_service_offering',
CONNECTOR_SETUP = 'setup_connector',
- DIGITALTWIN_VIEW = 'view_digital_twin',
- DIGITALTWIN_ADD = 'add_digital_twin',
- DIGITALTWIN_DELETE = 'delete_digital_twin',
SEMANTICHUB_VIEW = 'view_semantic_model',
SEMANTICHUB_ADD = 'add_semantic_model',
SEMANTICHUB_DELETE = 'delete_semantic_model',
diff --git a/src/types/Patterns.ts b/src/types/Patterns.ts
index a78b7bdd0..325e7fa46 100644
--- a/src/types/Patterns.ts
+++ b/src/types/Patterns.ts
@@ -44,7 +44,6 @@ export const Patterns = {
BPN: /^BPNL/i,
URL: /^https:/i,
MAIL: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@/,
- URNID: /^urn:uuid:[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}$/i,
},
SEARCH: /^[a-zA-ZÀ-ÿ0-9 !?@&_\-.]{3,80}$/,
appMarketCard: {