mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-03 20:14:21 -04:00
Feat: Add http/http keyword timeout option (#2142)
* feat: Add timeoutMs field
* chore: Update Languages (incl. ko-KR)
* Revert "chore: Update Languages (incl. ko-KR)"
This reverts commit 349331a00b
.
* chore: Update ko-KR selectively
* chore: Update en selectively
* Merge manually
* Reorder and show only if http related monitors
* fix: Update Korean translation
* fix: Rename timeoutMs to timeout, rename label, make DOUBLE
* fix: Change minimum step to 0.1, matching DOUBLE type
* Put the sql patch at the end
* Update EditMonitor.vue
* Colocate timeout with retry, fix clampTimeout logic, show default on 0
* Update src/pages/EditMonitor.vue to remove a comment
Co-authored-by: Frank Elsinga <frank@elsinga.de>
* Fix merge issue
* Update the timeout value while finished editing the interval value
---------
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
c6e68fac97
commit
439b6517d1
7 changed files with 56 additions and 4 deletions
|
@ -102,6 +102,7 @@ class Monitor extends BeanModel {
|
|||
active: await this.isActive(),
|
||||
forceInactive: !await Monitor.isParentActive(this.id),
|
||||
type: this.type,
|
||||
timeout: this.timeout,
|
||||
interval: this.interval,
|
||||
retryInterval: this.retryInterval,
|
||||
resendInterval: this.resendInterval,
|
||||
|
@ -428,7 +429,7 @@ class Monitor extends BeanModel {
|
|||
const options = {
|
||||
url: this.url,
|
||||
method: (this.method || "get").toLowerCase(),
|
||||
timeout: this.interval * 1000 * 0.8,
|
||||
timeout: this.timeout,
|
||||
headers: {
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
|
||||
"User-Agent": "Uptime-Kuma/" + version,
|
||||
|
@ -648,7 +649,7 @@ class Monitor extends BeanModel {
|
|||
}
|
||||
|
||||
let res = await axios.get(steamApiUrl, {
|
||||
timeout: this.interval * 1000 * 0.8,
|
||||
timeout: this.timeout,
|
||||
headers: {
|
||||
"Accept": "*/*",
|
||||
"User-Agent": "Uptime-Kuma/" + version,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue