-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add "claims_version" event sent at each claims change. #474
Conversation
I don't remember where we've talked about this alrady. Also, I'm starting to need that for other cases in the UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, will test
I see a problem with current implementation. We need to find a better logic for the claims_version |
I guess there are arguments for eventing only on additions/deletions of claims and skipping updates of existing claims. In all honesty do what best suits the v2 UI use case and we can fix any additional use cases if/when they come up. Really we need to update to a proper pub/sub protocol on the websocket I think. |
Extending websocket to a proper pub/sub protocol would simplify a lot the client logics. Btw, the Svelte "store" engine I use in UI 2 is already pub/sub based on client side. Keeping the same flux to the client/server implementation would cleanup a lot of code. |
So for now it updates the claims_version only for change coming from other clients than divert & shaper. |
I've changed to what you said, only increment when there's a state field in the key |
lucky you hadn't merged it yet, it introduced the bug I was talking about in the other PR. |
@KipK Please could you take a look at the conflict? |
added ota event pushed on ota start / end ( throw "started", "completed", "failed" )
removed useless if condition
fix override topic not publishing props if there's no state prop removed useless if condition
mhh not sure of what happened here |
throw claims_version event at each claim change , incrementing from 0 to 254