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
Restart button logic added on UI and backend, Some localizations added for japanese log msg #4755
Conversation
… into anpr-restart
status page monitor list has restart button
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.
- Please go through the changes you are trying to add and remove the ones which are made by accident.
As it stands, it is basically impossible to review this change as there are waaay to many accidental/ formatting changes.
+2k -1k lines changed is not reviewable - Please split this PR into two distinct PRs for reviewability:
- one adding a restart button
- one adding the japanese log message you mentioned above
- Please also fill out the description. The checklist exists to prevent wasted effort and churn, please respect this.
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.
Thanks for the PR.
After looking a bit into what you are trying to add, I think you have added this PR by accident to this repo and not your private one.
=> I am going to close this PR
@@ -380,50 +447,70 @@ class Monitor extends BeanModel { | |||
|
|||
try { | |||
if (await Monitor.isUnderMaintenance(this.id)) { | |||
bean.msg = "Monitor under maintenance"; | |||
bean.msg = | |||
"モニターメンテナンス中 / Monitor under maintenance"; |
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.
Such changes as here lead me to beleave that this PR was opened by accident
const downSeconds = this.interval * previousBeat?.retries || 0; | ||
if ( | ||
this.restartUrl && | ||
this.restartInterval && | ||
this.restartUrl.length > 0 && | ||
downSeconds >= this.restartInterval | ||
) { | ||
log.info("monitor", `[${this.name}] Restarting monitor`); | ||
axios | ||
.get(this.restartUrl) | ||
.then(() => { | ||
log.info("monitor", `[${this.name}] Restarted monitor`); | ||
}) | ||
.catch((error) => { | ||
log.error( | ||
"monitor", | ||
`[${this.name}] Failed to restart monitor: ${error.message}` | ||
); | ||
}); | ||
} |
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.
What you are trying to add here is a webhook on downed monitors.
We currently allow sending monitors, but don't allow for filtering them.
The correct issues are:
- Filter which event (
UP
/DOWN
/CERT-EXPIRY
/...) triggers alerts #508 - Notification Escalation / Delay Notifications #1315
Given that such a change was never discussed, nor a setting that we should have, I am going to close this PR.
We are not going to add another timeout to the list of timeouts. I expect that our users already don't get half of what the timeouts do and mostly leave them as is.
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
Fixes #(issue)
Type of change
Please delete any options that are not relevant.
Checklist
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.