Repository navigation
Conversation
…nect before first heartbeat hangs in loading
|
@LordIdra, I like the separation between Kafka and alarm service connection. Good job. However, to better communicate connection errors I would maybe suggest using separate messages in the UI. This would hopefully eliminate the ambiguity between "alarm server" and "kafka", or at least clarify they are not the same. Personally I would prefer icons (paired with tooltips) to indicate status, I could ask my colleague to create such. But this could be added later. |
Thanks! Please could you clarify on using separate messages in the UI? Currently, when Kafka connection is lost the message is 'No Kafka connection' and when alarm server connection is lost the message is 'No alarm server connection'. (Though, now that you mention it, they use the same background color so may be easily confused). Yes, I agree the icons + tooltips would be an improvement. It would also be good to display in the tooltip the implication of 'no alarm server connection' (i.e. you can still configure alarms but their status will not update) as obviously operators may not have an appreciation for the difference between Kafka and alarm server. Just let me know on the icons |
|
Maybe I should not try to be clever late in the afternoon... For the time being I think this is ok. |
…r status if failed to construct client
|
pushed some very minor fixes to issues found by LLM |
|




Now that I am familiar with all the alarm logic, I have done a refactor which I have wanted to look into for a while; introduce a state tracking system for AlarmClient. Half-and-half technical and UX change which aims to lower architectural complexity, improve performance, move tracking logic out of the UI, reduce potential for bugs, and display the client/server state to the user more clearly.
part of #3995
Closes #4022
Previous behaviour
The alarm server / Kafka state tracking prior to this PR works as follows:
Changes
I have resolved these issues by consolidating the logic and using some new Kafka features to track the state of the Kafka connection, how much of the config we have loaded, and the state of the alarm server connection, and displaying this clearly to the user.
Why this is an improvement:
Have only touched AlarmTreeConfigView as far as was needed to get it to keep working (as usual with these PRs, as otherwise it requires me to write a lot of duplicate code). Once the alarm config work is mostly done I will revisit it and clean it up, refactor it, or remove it depending on what we agree.
Importantly, the state machine logic does not affect the polling logic, it runs alongside it. Kafka will be continually polled regardless of the state.
snazzy state machine diagram
Testing
Test setups:
(also tested config loads for our own development setup)
Test cases (tried the below on every setup for the alarm tree):
Also tested random cases with alarm table + area panel
Related future work