Skip to content
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

Closed
wants to merge 15 commits into from

Conversation

Delgerskhn
Copy link

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
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]:

  • I have read and understand the pull request rules.

Description

Fixes #(issue)

Type of change

Please delete any options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • User interface (UI)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (a fix or feature that would cause existing functionality to not work as expected)
  • Other
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
  • My changes generates no new warnings
  • My code needed automated testing. I have added them (this is optional task)

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.

Copy link
Collaborator

@CommanderStorm CommanderStorm left a 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.

@CommanderStorm CommanderStorm added the question Further information is requested label May 13, 2024
@CommanderStorm CommanderStorm marked this pull request as draft May 17, 2024 20:07
@CommanderStorm CommanderStorm added the needs:work this PR needs work label May 19, 2024
@github-actions github-actions bot added needs:resolve-merge-conflict A merge-conflict needs to be addressed before reviewing makes sense again and removed needs:resolve-merge-conflict A merge-conflict needs to be addressed before reviewing makes sense again labels May 19, 2024
Copy link
Collaborator

@CommanderStorm CommanderStorm left a 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";
Copy link
Collaborator

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

Comment on lines +409 to +428
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}`
);
});
}
Copy link
Collaborator

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:work this PR needs work question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants