Skip to content

Commit

Permalink
Merge branch 'main' into fix/1140-OSP-consent-from-missing-company-id…
Browse files Browse the repository at this point in the history
…entifier-&-short-name
  • Loading branch information
JordanGerada3 authored Oct 14, 2024
2 parents ca90190 + 2a3ae9b commit ef952a7
Show file tree
Hide file tree
Showing 37 changed files with 917 additions and 158 deletions.
3 changes: 0 additions & 3 deletions .conf/Dockerfile.full
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ FROM node:22-alpine as build-step
ARG http_proxy=$http_proxy
ARG https_proxy=$https_proxy
ARG no_proxy=$no_proxy
RUN apk update && apk add --no-cache jq
COPY . /app
WORKDIR /app
RUN yarn
Expand All @@ -48,8 +47,6 @@ RUN ln -s /tmp/index.html /usr/share/nginx/html/index.html
# Add env variables inject script and mark as executable
COPY ./scripts/inject-dynamic-env.sh /docker-entrypoint.d/00-inject-dynamic-env.sh
RUN chmod +x /docker-entrypoint.d/00-inject-dynamic-env.sh
# Install bash for env variables inject script
RUN apk update && apk add --no-cache bash
# Make nginx owner of /usr/share/nginx/html/ and change to nginx user
RUN chown -R 101:101 /usr/share/nginx/html/
# Change to nginx user
Expand Down
2 changes: 0 additions & 2 deletions .conf/Dockerfile.prebuilt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ RUN ln -s /tmp/index.html /usr/share/nginx/html/index.html
# Add env variables inject script and mark as executable
COPY ./scripts/inject-dynamic-env.sh /docker-entrypoint.d/00-inject-dynamic-env.sh
RUN chmod +x /docker-entrypoint.d/00-inject-dynamic-env.sh
# Install bash for env variables inject script
RUN apk update && apk add --no-cache bash
# Make nginx owner of /usr/share/nginx/html/ and change to nginx user
RUN chown -R 101:101 /usr/share/nginx/html/
# Change to nginx user
Expand Down
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,49 @@
- **Onboarding Service Provider**
- add missing fields to form legal name & company identifier[#1151](https://github.com/eclipse-tractusx/portal-frontend/pull/1151)

## 2.2.0-alpha.1
### Feature

- **Clearinghouse Self-Description**
- Admin UI for Managing SD Document Retriggering [#1141](https://github.com/eclipse-tractusx/portal-frontend/pull/1141)

### Technical Support

- **Injection of environment variables to Docker image**
- refactored to a more readable and typo resistant implementation using sh - bash and jq are no longer required in image [#914](https://github.com/eclipse-tractusx/portal-frontend/pull/914)

### Change

- **Service Subscriptions**
- rename 'Configure' button to 'Activate' button [#1150](https://github.com/eclipse-tractusx/portal-frontend/pull/1150)

## 2.3.0-alpha.2

### Change

- **Technical User Details**
- updated technical user details with user type and service endpoint fields. Also, updated copy icon color for better view and made copy icon available only when value is available [#1137](https://github.com/eclipse-tractusx/portal-frontend/pull/1137)
- **Company Subscriptions**
- update API query parameters and fix tab UI scroll [#1131](https://github.com/eclipse-tractusx/portal-frontend/pull/1131)
- **App & Service Subscription Management**
- updated search place holder text - showing only available offer names at the top - and implemented hover information on the status icon of service subscription [#1130](https://github.com/eclipse-tractusx/portal-frontend/pull/1130)
- **Customer Data**
- re-enabled CSV upload [#1144](https://github.com/eclipse-tractusx/portal-frontend/pull/1144)
- reverted manual intervention with ready state api [#1144](https://github.com/eclipse-tractusx/portal-frontend/pull/1144)
- **Onboarding Service Provider**
- enhanced permission and company role validation for Onboarding Service Provider [#1176](https://github.com/eclipse-tractusx/portal-frontend/pull/1176)

### Bugfixes

- **Connector Management**
- fixed overlay enabling on click of managed connectors(details) [#1142](https://github.com/eclipse-tractusx/portal-frontend/pull/1142)
- **Connector Management**
- fixed customer link selection and fixed resetting values [#1119](https://github.com/eclipse-tractusx/portal-frontend/pull/1119)
- **Technical User Management**
- fixed error message scenario post technical user deletion action [#1164](https://github.com/eclipse-tractusx/portal-frontend/pull/1164)
- **Company Subscriptions**
- fixed incorrect data display in service company subscriptions [#1191](https://github.com/eclipse-tractusx/portal-frontend/pull/1191)

## 2.3.0-alpha.1

### Bugfixes

Expand Down
22 changes: 20 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,26 @@
<body>
<div id="app"></div>
<script>
// Do NOT change 'ENV' without changing 'custom_env_vars_anchor' in scripts/inject-dynamic-env.sh as well
const ENV = {REQUIRE_HTTPS_URL_PATTERN:"true",PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.example.org",CENTRALIDP_URL:"https://centralidp.example.org/auth",SSI_CREDENTIAL_URL:"https://ssi-credential-issuer.example.org",BPDM_POOL_API_URL:"https://business-partners.example.org/pool/v6",BPDM_GATE_API_URL:"https://business-partners.example.org/companies/test-company/v6",SEMANTICS_URL:"https://semantics.example.org",MANAGED_IDENTITY_WALLETS_NEW_URL:"https://managed-identity-wallets-new.example.org",REALM:"CX-Central",CLIENT_ID:"Cl2-CX-Portal",CLIENT_ID_REGISTRATION:"Cl1-CX-Registration",CLIENT_ID_SEMANTIC:"Cl3-CX-Semantic",CLIENT_ID_BPDM:"Cl7-CX-BPDM",CLIENT_ID_MIW:"Cl5-CX-Custodian",CLIENT_ID_SSI_CREDENTIAL:"Cl24-CX-SSI-CredentialIssuer"}
// Do NOT change ENV attributes without changing them in scripts/inject-dynamic-env.sh as well
const ENV = {
REQUIRE_HTTPS_URL_PATTERN: "true",
CLEARINGHOUSE_CONNECT_DISABLED: "false",
PORTAL_ASSETS_URL: "http://localhost:3000/assets",
PORTAL_BACKEND_URL: "https://portal-backend.example.org",
CENTRALIDP_URL: "https://centralidp.example.org/auth",
SSI_CREDENTIAL_URL: "https://ssi-credential-issuer.example.org",
BPDM_POOL_API_URL: "https://business-partners.example.org/pool/v6",
BPDM_GATE_API_URL: "https://business-partners.example.org/companies/test-company/v6",
SEMANTICS_URL: "https://semantics.example.org",
MANAGED_IDENTITY_WALLETS_NEW_URL: "https://managed-identity-wallets-new.example.org",
REALM: "CX-Central",
CLIENT_ID: "Cl2-CX-Portal",
CLIENT_ID_REGISTRATION: "Cl1-CX-Registration",
CLIENT_ID_SEMANTIC: "Cl3-CX-Semantic",
CLIENT_ID_BPDM: "Cl7-CX-BPDM",
CLIENT_ID_MIW: "Cl5-CX-Custodian",
CLIENT_ID_SSI_CREDENTIAL: "Cl24-CX-SSI-CredentialIssuer"
}
</script>
<script type="module" src="/src/index.tsx"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@catena-x/portal-frontend",
"version": "v2.3.0-alpha.1",
"version": "v2.3.0-alpha.2",
"description": "Catena-X Portal Frontend",
"author": "Catena-X Contributors",
"license": "Apache-2.0",
Expand Down
50 changes: 39 additions & 11 deletions scripts/inject-dynamic-env.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

###############################################################
# Copyright (c) 2022 Contributors to the Eclipse Foundation
Expand All @@ -19,13 +19,41 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

# Define custom variable
custom_env_vars='{REQUIRE_HTTPS_URL_PATTERN:"'$REQUIRE_HTTPS_URL_PATTERN'",PORTAL_ASSETS_URL:"'$PORTAL_ASSETS_URL'",PORTAL_BACKEND_URL:"'$PORTAL_BACKEND_URL'",CENTRALIDP_URL:"'$CENTRALIDP_URL'",SSI_CREDENTIAL_URL:"'$SSI_CREDENTIAL_URL'",BPDM_POOL_API_URL:"'$BPDM_POOL_API_URL'",BPDM_GATE_API_URL:"'$BPDM_GATE_API_URL'",SEMANTICS_URL:"'$SEMANTICS_URL'",MANAGED_IDENTITY_WALLETS_NEW_URL:"'$MANAGED_IDENTITY_WALLETS_NEW_URL'",REALM:"'$REALM'",CLIENT_ID:"'$CLIENT_ID'",CLIENT_ID_REGISTRATION:"'$CLIENT_ID_REGISTRATION'",CLIENT_ID_SEMANTIC:"'$CLIENT_ID_SEMANTIC'",CLIENT_ID_BPDM:"'$CLIENT_ID_BPDM'",CLIENT_ID_MIW:"'$CLIENT_ID_MIW'",CLIENT_ID_SSI_CREDENTIAL:"'$CLIENT_ID_SSI_CREDENTIAL'"}'
# Define anchor variable
custom_env_vars_anchor='{REQUIRE_HTTPS_URL_PATTERN:"true",PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.example.org",CENTRALIDP_URL:"https://centralidp.example.org/auth",SSI_CREDENTIAL_URL:"https://ssi-credential-issuer.example.org",BPDM_POOL_API_URL:"https://business-partners.example.org/pool/v6",BPDM_GATE_API_URL:"https://business-partners.example.org/companies/test-company/v6",SEMANTICS_URL:"https://semantics.example.org",MANAGED_IDENTITY_WALLETS_NEW_URL:"https://managed-identity-wallets-new.example.org",REALM:"CX-Central",CLIENT_ID:"Cl2-CX-Portal",CLIENT_ID_REGISTRATION:"Cl1-CX-Registration",CLIENT_ID_SEMANTIC:"Cl3-CX-Semantic",CLIENT_ID_BPDM:"Cl7-CX-BPDM",CLIENT_ID_MIW:"Cl5-CX-Custodian",CLIENT_ID_SSI_CREDENTIAL:"Cl24-CX-SSI-CredentialIssuer"}'
# Read content of the reference index.html file into the index_html_reference variable
index_html_reference=`cat /usr/share/nginx/html/index.html.reference`
# Replace the anchor variable with the custom variable in the index.html file
index_html=${index_html_reference//$custom_env_vars_anchor/$custom_env_vars}
# Write the modified index.html to tmp (to enable readOnlyRootFilesystem)
echo "$index_html" > /tmp/index.html
source_file=/usr/share/nginx/html/index.html.reference
target_file=/tmp/index.html

# these environment variables should be set and match the ones in index.html
# sequence is irrelevant
vars=" \
REQUIRE_HTTPS_URL_PATTERN \
CLEARINGHOUSE_CONNECT_DISABLED \
CENTRALIDP_URL \
PORTAL_ASSETS_URL \
PORTAL_BACKEND_URL \
SEMANTICS_URL \
BPDM_GATE_API_URL \
BPDM_POOL_API_URL \
SSI_CREDENTIAL_URL \
MANAGED_IDENTITY_WALLETS_NEW_URL \
REALM \
CLIENT_ID \
CLIENT_ID_REGISTRATION \
CLIENT_ID_SEMANTIC \
CLIENT_ID_BPDM \
CLIENT_ID_MIW \
CLIENT_ID_SSI_CREDENTIAL \
"

# base sed command: output source file and remove javascript comments
sed_command="cat ${source_file} | sed -e \"s@^\\\s*//.*@@g\""

set -- $vars
while [ -n "$1" ]; do
var=$1
# add a replace expression for each variable
sed_command="${sed_command} -e \"s@${var}:\s*\\\".*\\\"@${var}: \\\"\${${var}}\\\"@g\""
shift
done

# execute the built replace command and write to target file
echo ${sed_command} | sh > ${target_file}
24 changes: 19 additions & 5 deletions src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
"configureYourConnectorDetails": "Konfigurieren Sie die Connector-Details",
"learnMore": "Learn More",
"noDocumentAvailable": "Kein Dokument verfügbar",
"selfDescriptionDocument": "Selbstbeschreibungsdokument",
"selfDescriptionDocument": "Eigenerklärungsdokument",
"deleteConnector": "Connector löschen",
"urlUpdatedSuccessfully": "URL erfolgreich aktualisiert",
"note": "Bitte beachten Sie:",
Expand Down Expand Up @@ -676,7 +676,7 @@
"deletemodal": {
"title": "EDC-Connector Löschen",
"description": "Möchten Sie den ausgewählten Connector wirklich löschen? Die Löschung kann nicht rückgängig gemacht werden.",
"techUserdescription": "Möchten Sie den Connector wirklich löschen? Mit der Löschung wird der Connector automatisch vom Endpunkt „Connector Discovery“ gelöscht und das Selbstbeschreibungsdokument auf inaktiv gesetzt.\n Bitte beachten Sie, dass mit dem Connector ein technischer Benutzer verbunden ist. Der technische Benutzer kann gelöscht werden, wenn Sie das Kontrollkästchen unten aktivieren. Andernfalls wird nur die Zuordnung zwischen Connector und technischem Benutzer gelöscht.",
"techUserdescription": "Möchten Sie den Connector wirklich löschen? Mit der Löschung wird der Connector automatisch vom Endpunkt „Connector Discovery“ gelöscht und das Eigenerklärungsdokument auf inaktiv gesetzt.\n Bitte beachten Sie, dass mit dem Connector ein technischer Benutzer verbunden ist. Der technische Benutzer kann gelöscht werden, wenn Sie das Kontrollkästchen unten aktivieren. Andernfalls wird nur die Zuordnung zwischen Connector und technischem Benutzer gelöscht.",
"techUserCheckBoxLabel": "Ja, ich möchte den Connector löschen, wodurch automatisch auch der erwähnte technische Benutzer gelöscht wird.",
"techDetails": {
"title": "Technical Details",
Expand Down Expand Up @@ -1066,6 +1066,18 @@
"metadata_url_required_error": "Metadaten-URL ist erforderlich",
"metadata_url_invalid_error": "Bitte geben Sie eine gültige Metadaten-URL ein"
},
"clearinghouseSelfDescription": {
"heading": "Status der Eigenerklärung",
"description": "Diese Seite bietet einen Überblick über den aktuellen Stand der Eigenerklärungen für Administratoren.",
"reprocess": "Nachverarbeiten",
"complianceStatus": "Compliance-Status:",
"legalPerson": "Juristische Person",
"legalPersonDesc": "Übersicht über Unternehmen mit fehlender Eigenerklärung einer juristischen Person",
"connectors": "Connectors",
"connectorsDesc": "Übersicht über Unternehmen mit fehlender Eigenerklärung der Konnektoren",
"errorMsg": "Fehler! Etwas ist schief gelaufen",
"noDataMsg": "Keine Datensätze gefunden."
},
"addUser": {
"headline": "Erstelle einen neuen User",
"subheadline": "Fügen Sie ein neues Benutzerkonto hinzu, indem Sie den Vor- und Nachnamen des Benutzers sowie die E-Mail-Adresse hinterlegen. Wählen Sie unterhalb der Eingabefelder die jeweiligen Benutzerrollen aus, die der Benutzer haben soll. Eine Rolle ist mindestens erforderlich, um dem Benutzer den Zugriff auf das Netzwerk zu ermöglichen.",
Expand Down Expand Up @@ -1483,11 +1495,13 @@
"recommendations": "Recommendations",
"allServices": "All Services",
"viewDetails": "Display more details",
"activateBtn": "Activate",
"configureBtn": "Configure",
"activateBtn": "Aktivieren",
"pleaseEnterValidURL": "Please enter a valid URL",
"error": "Error",
"success": "Success",
"pending": "Das Abonnement steht noch aus",
"active": "Das Abonnement ist aktiv",
"process": "Das Abonnement ist in Bearbeitung",
"tabs": {
"request": "Request",
"active": "Active",
Expand Down Expand Up @@ -1840,7 +1854,7 @@
},
"SKIPPED": {
"title": "Von Ihrer Seite sind keine Maßnahmen erforderlich",
"description": "Die Erstellung der Selbstbeschreibung wurde absichtlich übersprungen. Dieser Prozess wird vom CX-Operator so bald wie möglich wieder ausgelöst."
"description": "Die Erstellung der Eigenerklärung wurde absichtlich übersprungen. Dieser Prozess wird vom CX-Operator so bald wie möglich wieder ausgelöst."
}
}
},
Expand Down
17 changes: 16 additions & 1 deletion src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"technicalSetup": "Technical Integration",
"connectorManagement": "Connector Management",
"applicationRequests": "Application Requests",
"clearinghouseSelfDescription": "Clearinghouse Self-Description",
"admin": "Administration",
"developer": "Development",
"invite": "Invite Business Partner",
Expand Down Expand Up @@ -1070,6 +1071,18 @@
"metadata_url_required_error": "Metadata url is required",
"metadata_url_invalid_error": "Please enter valid metadata url"
},
"clearinghouseSelfDescription": {
"heading": "Self-Description Document Status",
"description": "This page provides an overview of the current status of self-descriptions for administrators.",
"reprocess": "Reprocess",
"complianceStatus": "Compliance Status:",
"legalPerson": "Legal Person",
"legalPersonDesc": "Overview of companies with missing legal person self-description",
"connectors": "Connectors",
"connectorsDesc": "Overview of companies with missing connector self-description",
"errorMsg": "Error! Something went wrong",
"noDataMsg": "No records found."
},
"addUser": {
"headline": "Add User Account",
"subheadline": "Add a new user account by adding the user first and last name as well as the email address. Below the input fields select the respective user roles which the user should have. One role is minimum needed to enable the user to access the network.",
Expand Down Expand Up @@ -1452,10 +1465,12 @@
"allServices": "All Services",
"viewDetails": "Display more details",
"activateBtn": "Activate",
"configureBtn": "Configure",
"pleaseEnterValidURL": "Please enter a valid URL",
"error": "Error",
"success": "Success",
"pending": "Subscription is Pending",
"active": "Subscription is Active",
"process": "Subscription is in Progress",
"tabs": {
"request": "Request",
"active": "Active",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
display: grid;

.roleDescription {
line-height: 0;
margin: 5px 27px 20px;
margin: -5px 27px 10px;
}
}
107 changes: 107 additions & 0 deletions src/components/pages/AdminClearingHouseSD/AdminClearingHouseSD.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/********************************************************************************
* Copyright (c) 2024 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
********************************************************************************/

.admin-container {
padding: 50px 15px;

.loading-progress {
display: flex;
justify-content: center;
align-items: center;
height: 50vh;
}

.heading {
text-align: center;
}

.description {
text-align: center;
margin: 34px auto 64px;
width: 70%;
}

.company-list-container {
max-height: 350px;
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;
}

.section {
margin-bottom: 20px;

ul {
margin-top: 24px;
list-style-type: none;
padding-left: 0;

li {
margin-bottom: 5px;
}
}

.connectors-list {
gap: 10px;
margin-top: 24px;
max-height: 350px;
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;

.connector {
display: flex;
gap: 80px;
padding: 5px;
border-radius: 5px;
}
}

.btn-container {
display: flex;
margin-top: 20px;
align-items: flex-end;
justify-content: flex-end;
}
}

.compliance-status {
display: flex;
align-items: center;
margin-bottom: 40px;
margin-top: 50px;

label {
margin-right: 10px;
font-weight: bold;
}

.switch-container {
display: flex;
align-items: center;
margin-left: 5px;
}
}

.no-data-msg {
text-align: center;
margin-top: 24px;
margin-bottom: 24px;
}
}
Loading

0 comments on commit ef952a7

Please sign in to comment.