Skip to content

Commit

Permalink
fix: Dashboard does not filter unknown connectors by mdsId (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
jridderbusch authored and kamilczaja committed Oct 24, 2024
1 parent 3a01f0c commit 2eee04c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,16 @@ class ComponentStatusApiService {

private fun getNumberOfUnknownConnectors(connectorMetadata: List<AuthorityPortalConnectorInfo>, environmentId: String, mdsId: String? = null): Int {
val c = Tables.CONNECTOR
val condition = dsl.selectCount().from(c).where(

val conditions = mutableListOf(
c.ENVIRONMENT.eq(environmentId),
c.ENDPOINT_URL.notIn(connectorMetadata.map { it.connectorEndpoint })
)

if (mdsId != null) {
condition.and(c.MDS_ID.eq(mdsId))
conditions += c.MDS_ID.eq(mdsId)
}

return condition.fetchSingle().value1()
return dsl.selectCount().from(c).where(conditions).fetchSingle().value1()
}

data class ConnectorStatusCount(
Expand Down

0 comments on commit 2eee04c

Please sign in to comment.