Skip to content

Commit

Permalink
Revert "feat: show owning organization in admin connector overview (#395
Browse files Browse the repository at this point in the history
)"

This reverts commit 710351a.
  • Loading branch information
PaddseL authored Dec 10, 2024
1 parent 710351a commit 0bad9d8
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 30 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,11 @@
scope="col">
Connector ID
</th>

<th
class="py-3.5 text-sm font-normal text-gray-700 text-left"
scope="col">
Connector Name
</th>

<th
class="py-3.5 text-sm font-normal text-gray-700 text-left"
scope="col">
Organization
</th>

<th
class="py-3.5 text-sm font-normal text-gray-700 text-left"
scope="col">
Expand All @@ -44,7 +36,6 @@
scope="col">
Environment
</th>

<th
class="py-3.5 text-sm font-normal text-gray-700 text-left"
scope="col">
Expand Down Expand Up @@ -78,10 +69,6 @@
class="py-8 text-sm font-medium whitespace-nowrap text-gray-700">
{{ connector.name }}
</td>
<td
class="py-8 text-sm font-medium whitespace-nowrap text-gray-700">
{{ connector.organizationName }}
</td>
<td class="py-8 text-sm whitespace-nowrap text-gray-700">
{{ connector.hostName }}
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0bad9d8

Please sign in to comment.