kikocis/dataspace-portal public
Changesets · Branches · Tags · Compare
| Changeset | 57417784710bccc56bab6cb24ad71622e0929cf720f13451836c7b333e4a2371 |
|---|---|
| Author | Kamil Czaja <46053356+kamilczaja@users.noreply.github.com> · 2024-09-18 10:53 +02:00 |
| Committer | GitHub <noreply@github.com> · 2024-09-18 10:53 +02:00 |
| Parents | 35e5a9795cbc |
2 files changed
modified authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/services/CaasUpdateService.kt +1 −1
| @@ -39,7 +39,7 @@ | ||
| 39 | 39 | |
| 40 | 40 | @Scheduled(every = "30s") |
| 41 | 41 | fun scheduledCaasStatusUpdate() { |
| 42 | - if (!isCaasClientEnabled) { | |
| 42 | + if (isCaasClientEnabled) { | |
| 43 | 43 | val connectors = connectorService.getAllCaas() |
| 44 | 44 | val connectorStatusList = caasClient.getCaasStatus(connectors.map { it.connectorId }) |
| 45 | 45 | val connectorStatusMap = buildConnectorStatusMap(connectorStatusList, connectors) |
modified authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/services/reporting/DataOfferCsvReportService.kt +9 −1
| @@ -63,8 +63,16 @@ | ||
| 63 | 63 | organizationId = it.organizationId, |
| 64 | 64 | organizationName = organizationNames[it.organizationId] ?: "", |
| 65 | 65 | status = it.onlineStatus.toString(), |
| 66 | - dataSourceAvailability = if (it.dataSourceAvailability == "LIVE") "Available" else it.dataSourceAvailability | |
| 66 | + dataSourceAvailability = mapDataSourceAvailabilityToReadableFormat(it.dataSourceAvailability) | |
| 67 | 67 | ) |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | + | |
| 71 | + private fun mapDataSourceAvailabilityToReadableFormat(dataSourceAvailability: String): String { | |
| 72 | + return when (dataSourceAvailability) { | |
| 73 | + "LIVE" -> "Available" | |
| 74 | + "ON_REQUEST" -> "On Request" | |
| 75 | + else -> dataSourceAvailability | |
| 76 | + } | |
| 77 | + } | |
| 70 | 78 | } |