Closed johnsimons closed 1 month ago
I'm not sure the logic is correct. I think we only require either audit or monitoring.
The current logic seems to always require audit for non-broker transports, which is not correct.
We don’t require Audit, but I agree the logic is not the best. the problem is that we don’t have an api to figure out if audit is configured at all or not and hence we have to “repurpose” the test connection logic to tell us. to fix this properly we would need to figure out if the backend has audit configured or not.
GitHub isn't letting me do a suggestion over all of the relevant code lines, but how about:
if (useIsMonitoringEnabled()) {
return !testResults.value?.monitoring_connection_result.connection_successful;
}
return !testResults.value?.audit_connection_result.connection_successful;
It's not one or the other. If both are connected, then if either one of them has an incorrect configuration then the error should be shown.
If both are connected, both result messages should be shown and both diagnostics.
If only one ia connected then only that connected services status should be used.
The logic should be: