-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Feat: Full server-side pagination for important events #3515
Feat: Full server-side pagination for important events #3515
Conversation
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.
Overall, very clean. I have left some minor inline comments.
One question:
Why did you add mitt
exactly? (instead of function calls)
@@ -354,9 +340,23 @@ export default { | |||
return getResBaseURL() + this.monitor.screenshot + "?time=" + this.cacheTime; | |||
} | |||
}, | |||
|
|||
watch: { | |||
page(to) { |
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.
Is the reactivity in this case correct? (am I missing something?) 🤔
Let's assume that monitor
=null
⇒ the code is skipped.
If I then monitor gets populated ⇒ getImportantHeartbeatListPaged
is never called or am I missing something?
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.
Good point. This code normally works because AFAIK in the vue lifecycle computed runs before mounted, so this.monitor
should be true. I added a watch for monitor
in case the monitorList has not been loaded when we are mounted for some reason.
we need to send an event from the root of the vue app to deep inside the component tree I looked through the alternatives suggested in the Vue 3 Docs but none of them seemed helpful, so the global event bus option was chosen. |
6270abb
to
27fc2a5
Compare
Co-authored-by: Frank Elsinga <frank@elsinga.de>
27fc2a5
to
285320d
Compare
I found this issue, which is likely fixed by this PR: |
# Conflicts: # package-lock.json # package.json
Could this be ported to 1.23.x branch? |
Given how many performance improvements have gone into v2, I would argue that migrating to v2 would be a better choice for our userbase. => I think classifying speed as a feature instead of a bug is very reasonable |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
sendImportantHeartbeatList
importantHeartbeatList
in vuemitt
to pass new important heartbeats to any list currently activeThe code change is relatively simple, but the performance improvement should be significant.
Fixes #726
Fixes #758
Fixes #3497
Fixes #3494
Fixes #3127
Fixes #1716
Fixes #1397
Fixes #2346
Type of change
Checklist
(including JSDoc for methods)
Screenshots (if any)