From 0bad9d897d449759a1a33da18b46affec23e72bc Mon Sep 17 00:00:00 2001 From: PaddseL Date: Tue, 10 Dec 2024 17:08:55 +0100 Subject: [PATCH] Revert "feat: show owning organization in admin connector overview (#395)" This reverts commit 710351a507951e56bb1a6f025b4891510b44f9bc. --- CHANGELOG.md | 1 - .../api/model/ConnectorOverviewEntryDto.kt | 2 -- .../sovity/authorityportal/seeds/utils/DevUserId.kt | 1 - .../authorityportal/seeds/utils/ScenarioData.kt | 2 +- .../ConnectorManagementApiService.kt | 1 - .../connector/ConnectorManagementApiServiceTest.kt | 9 +++------ .../core/api/fake-backend/impl/fake-connectors.ts | 3 --- .../authority-connector-list-page.component.html | 13 ------------- .../sp-connector-list-page.component.ts | 4 ++-- 9 files changed, 6 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 050211b09..f5f95cd15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,6 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md). #### Minor - Uptime Kuma is no longer mandatory and the status dashboard can be disabled -- Added Owning Organization in Admin Connector Overview ([#355](https://github.com/sovity/authority-portal/issues/355)) #### Patch diff --git a/authority-portal-backend/authority-portal-api/src/main/java/de/sovity/authorityportal/api/model/ConnectorOverviewEntryDto.kt b/authority-portal-backend/authority-portal-api/src/main/java/de/sovity/authorityportal/api/model/ConnectorOverviewEntryDto.kt index 784d08aa6..86192db6a 100644 --- a/authority-portal-backend/authority-portal-api/src/main/java/de/sovity/authorityportal/api/model/ConnectorOverviewEntryDto.kt +++ b/authority-portal-backend/authority-portal-api/src/main/java/de/sovity/authorityportal/api/model/ConnectorOverviewEntryDto.kt @@ -19,8 +19,6 @@ import io.swagger.v3.oas.annotations.media.Schema data class ConnectorOverviewEntryDto( @field:Schema(description = "Connector ID", requiredMode = Schema.RequiredMode.REQUIRED) val id: String, - @field:Schema(description = "Organization Name", requiredMode = Schema.RequiredMode.REQUIRED) - val organizationName: String, @field:Schema(description = "Host Name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) val hostName: String?, @field:Schema(description = "Type", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/seeds/utils/DevUserId.kt b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/seeds/utils/DevUserId.kt index 93b396951..35d5a47d5 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/seeds/utils/DevUserId.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/seeds/utils/DevUserId.kt @@ -22,7 +22,6 @@ import java.time.ZoneOffset */ fun dummyDevUserUuid(i: Int): String = "00000000-0000-0000-0000-${i.toString().padStart(12, '0')}" fun dummyDevOrganizationId(i: Int): String = "MDSL${i.toString().padStart(6, '0')}" -fun dummyDevOrganizationName(i: Int): String = "Organization $i" fun dummyDevConnectorId(orgId: Int, connectorId: Int) = "${dummyDevOrganizationId(orgId)}.${dummyDevConnectorIdComponent(connectorId)}" fun dummyDevConnectorIdComponent(i: Int): String = "CONN${i.toString().padStart(3, '0')}" diff --git a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/seeds/utils/ScenarioData.kt b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/seeds/utils/ScenarioData.kt index 8f5b1c395..bfe3e1be6 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/seeds/utils/ScenarioData.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/seeds/utils/ScenarioData.kt @@ -117,7 +117,7 @@ class ScenarioData { fun organization(orgId: Int, createdByUserId: Int, applyer: (OrganizationRecord) -> Unit = {}) { OrganizationRecord().also { it.id = dummyDevOrganizationId(orgId) - it.name = dummyDevOrganizationName(orgId) + it.name = "Organization $orgId" it.address = "Address" it.url = "https://url" it.createdBy = dummyDevUserUuid(createdByUserId) diff --git a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/connectormanagement/ConnectorManagementApiService.kt b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/connectormanagement/ConnectorManagementApiService.kt index 50d92670e..d99dbb576 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/connectormanagement/ConnectorManagementApiService.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/connectormanagement/ConnectorManagementApiService.kt @@ -116,7 +116,6 @@ class ConnectorManagementApiService( val connectorDtos = connectors.map { ConnectorOverviewEntryDto( id = it.connectorId, - organizationName = orgNames[it.organizationId] ?: "", hostName = if (it.type == ConnectorType.CAAS) "sovity GmbH" else orgNames[it.providerOrganizationId] ?: "", type = it.type.toDto(), environment = deploymentEnvironmentDtoService.findByIdOrThrow(it.environment), diff --git a/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt b/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt index 05dac3750..e9d38f8a3 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt @@ -27,7 +27,6 @@ import de.sovity.authorityportal.seeds.utils.ScenarioData import de.sovity.authorityportal.seeds.utils.ScenarioInstaller import de.sovity.authorityportal.seeds.utils.dummyDevConnectorId import de.sovity.authorityportal.seeds.utils.dummyDevOrganizationId -import de.sovity.authorityportal.seeds.utils.dummyDevOrganizationName import de.sovity.authorityportal.seeds.utils.dummyDevUserUuid import de.sovity.authorityportal.web.Roles import de.sovity.authorityportal.web.tests.loadTestResource @@ -440,11 +439,9 @@ class ConnectorManagementApiServiceTest { assertThat(result.connectors).hasSize(3) assertThat(result.connectors).noneMatch { it.id == dummyDevConnectorId(1, 3) } assertThat(result.connectors).noneMatch { it.environment.environmentId != "test" } - - result.connectors.forEachIndexed { i, connector -> - assertThat(connector.id).isEqualTo(dummyDevConnectorId(0, i)) - assertThat(connector.organizationName).isEqualTo(dummyDevOrganizationName(0)) - } + assertThat(result.connectors[0].id).isEqualTo(dummyDevConnectorId(0, 0)) + assertThat(result.connectors[1].id).isEqualTo(dummyDevConnectorId(0, 1)) + assertThat(result.connectors[2].id).isEqualTo(dummyDevConnectorId(0, 2)) } @Test diff --git a/authority-portal-frontend/src/app/core/api/fake-backend/impl/fake-connectors.ts b/authority-portal-frontend/src/app/core/api/fake-backend/impl/fake-connectors.ts index baf0e9693..fc78bc803 100644 --- a/authority-portal-frontend/src/app/core/api/fake-backend/impl/fake-connectors.ts +++ b/authority-portal-frontend/src/app/core/api/fake-backend/impl/fake-connectors.ts @@ -158,7 +158,6 @@ export const getListOfConnectorsForTable = ( ).map((c) => { return { id: c.connectorId, - organizationName: c.organizationName, hostOrganizationName: c.hostOrganizationName, type: c.type, environment: c.environment, @@ -196,7 +195,6 @@ export const getListOfOwnConnectorsForTable = (): ConnectorOverviewResult => { ).map((c) => { return { id: c.connectorId, - organizationName: c.organizationName, hostOrganizationName: c.hostOrganizationName, type: c.type, environment: c.environment, @@ -222,7 +220,6 @@ export const getListOfAllConnectorsForTable = (): ConnectorOverviewResult => { connectors: TEST_CONNECTORS.map((c) => { return { id: c.connectorId, - organizationName: c.organizationName, hostOrganizationName: c.hostOrganizationName, type: c.type, environment: c.environment, diff --git a/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.html b/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.html index ce318be28..a4eca59bb 100644 --- a/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.html +++ b/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.html @@ -14,19 +14,11 @@ scope="col"> Connector ID - Connector Name - - - Organization - - @@ -44,7 +36,6 @@ scope="col"> Environment - @@ -78,10 +69,6 @@ class="py-8 text-sm font-medium whitespace-nowrap text-gray-700"> {{ connector.name }} - - {{ connector.organizationName }} - {{ connector.hostName }} diff --git a/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts b/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts index 9659adc10..8dcfb1230 100644 --- a/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts +++ b/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts @@ -17,8 +17,8 @@ import {Subject, interval} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; import {Store} from '@ngxs/store'; import { + ConnectorOverviewEntryDto, ConnectorTypeDto, - ProvidedConnectorOverviewEntryDto, UserRoleDto, } from '@sovity.de/authority-portal-client'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; @@ -187,7 +187,7 @@ export class SpConnectorListPageComponent implements OnInit, OnDestroy { this.slideOverService.slideOverReset(); } - openDetailPage(connector: ProvidedConnectorOverviewEntryDto) { + openDetailPage(connector: ConnectorOverviewEntryDto) { this.slideOverConfig = { childComponentInput: { id: connector.id,