-
Notifications
You must be signed in to change notification settings - Fork 233
maintenance mode #101
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
base: main
Are you sure you want to change the base?
maintenance mode #101
Conversation
copying over from the issue to discuss further about the notification handling and stuff. For that to work |
Although this doesn't cause any problems at the moment, I would recommend not importing Perhaps we could put the |
Yes, I was thinking about that as well. The problem I see is backwards compatability. If we extend the config with values that don't have a default we will break setups that don't have it unless there is a fallback value (due to the imports). Perhaps we can have a |
I've pushed something which I builds. I've not tested anything more since I have to go now, but perhaps you can have a look and give feedback if that's something that could work. |
I think this is not necessary as UptimeFlare now is not considered "stable", no config compatibility is ever guaranteed. Users have to manually modify their config when updating if necessary, that's exactly what users should expect from "unstable" software. Also, it looks like your auto-format is a little bit aggressive and causes many changes, could you please turn it off for now so that it won't affect review. |
For formatting, are you using prettier or eslint or something else? Reverting the formatting changes is easier when I know which format we are using :) |
The I have run |
Yep, needed to rebase but does seem to be alright now. I was busy with other stuff but will look into integrating the maintenances object into the worker now |
I have two things where I need your help. Perhaps you can have a look at the [1] in the image, where the box is not as wide as the card below. Also I did not test in the non-grouped setup. I don't quite understand the width logic there. I've also added the code in the worker but I don't have notifications setup (other monitoring for that) so I cannot test that. Regarding the icon marked with [2], I don't know if we perhaps want to choose another icon here. Let me know what you think. |
I had a quick review with your code, it looks good to me. I will spend some time testing it and fix the width problem (maybe today or tomorrow). The width logic is a little bit complicated as the status bar below will dynamically decide its count based on screen width. It's not hard to fix though, I will commit my fix directly to this PR. Regarding the icon I think a triangle warning mark is better than a circle, I will change it too. |
I was also thinking that we can have the date-range in the top right of the card and perhaps have it collapsable if there are multiple maintenances. Would make it a bit more compact i think |
I don't think it's very important, and having multiple systems in maintenance at the same time is probably less common. Less compact is acceptable to me as long as there are no obvious typographical errors.
I've fixed this in my commit, and now the alert automatically shrinks with the width of the page, all you need is a
I haven't tested it yet, I'll do a full test and some clean ups when you think you're done, but I'm guessing that the ungrouped monitors won't be affected by this alert box. |
Oops... I specified two margins and they conflict. |
I'll remove that, gotcha :) |
I've also moved the code to a separate maintenace component to have less clutter in the overall status and perhaps we can reuse that on a /:monitor page later on |
Moving the time to the top right corner looks good and really makes it more compact.
I'm not a big fan of the collapsed design though, the user doesn't get to see the alert prominently at first glance when entering the page, and I'd probably be inclined to remove the collapsed dropdown box when merging and have all the alerts vertically aligned. I was thinking of adding a close button in the top right corner so users could hide the alert (but it would come back when the page auto-refreshes), and the top right corner is now occupied by the time, so it might be okay to leave it as it is. |
Yep, I agree. In my mind it was a bit cooler than it come out in reality, i'll remove it again. |
Do we want to change the Overall System Status or leave as is? |
If there is already an obvious alert, I think we can leave it as is. |
Alrighty - then I'm happy with this PR. Do you have anything else that needs to be done? |
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.
LGTM
start?: Date | ||
// end Date | ||
end?: Date | ||
// display color |
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.
Why is start
and end
of a maintenance optional?
I think a scheduled maintenance should have a defined start and end time (so that it's easier to show the timeline later).
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.
Yes, if not specified then the banner is always shown. This way you are free to add a "on demand" maintenance when stuff breaks. For example you could add an indefinite maintenance windows if something in your homelab breaks (lol) :D
Also LGTM, I may have a few more minor modifications(probably some variable naming and config file changes) as well as testing. I'll probably make another commit afterward. My HomeLab went down yesterday and my two backups didn't quite work, I'm now rescuing data from one of my VMs 😥. I may continue this in a day or two. |
Alright - take your time. Backups are only worth something if they are tested :D Learned that the hard way as well. I don't want to advertise but I might know someone who could help out :) |
Hi,
as talked about - here a rough first draft.
Things I've changed so far:
Point I'd like to have:
Make this look better - the cards have different widths due to the non-dynamic width of the green/red barsMake the displayment dynamic, depending on the start/end time IF they are present (added a TODO in the code)test with multiple active alertslink monitor-id in incident with monitor to load display namedecide how to handle monitor checks and notifications for monitors that are in maintenance modecloses #100