mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-18 23:34:04 +02:00
addressed review findings
This commit is contained in:
parent
91f34dde79
commit
e4c05cb37c
3 changed files with 30 additions and 17 deletions
|
@ -427,7 +427,13 @@ class Monitor extends BeanModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const agentFamily = this.forceIp ? (this.forceIp === "ipv4" ? 4 : 6) : undefined;
|
let agentFamily = undefined;
|
||||||
|
if (this.forceIp === "ipv4") {
|
||||||
|
agentFamily = 4;
|
||||||
|
}
|
||||||
|
if (this.forceIp === "ipv6") {
|
||||||
|
agentFamily = 6;
|
||||||
|
}
|
||||||
|
|
||||||
const httpsAgentOptions = {
|
const httpsAgentOptions = {
|
||||||
maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)
|
maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)
|
||||||
|
|
|
@ -1111,5 +1111,7 @@
|
||||||
"Phone numbers": "Phone numbers",
|
"Phone numbers": "Phone numbers",
|
||||||
"Sender name": "Sender name",
|
"Sender name": "Sender name",
|
||||||
"smsplanetNeedToApproveName": "Needs to be approved in the client panel",
|
"smsplanetNeedToApproveName": "Needs to be approved in the client panel",
|
||||||
"Disable URL in Notification": "Disable URL in Notification"
|
"Disable URL in Notification": "Disable URL in Notification",
|
||||||
|
"Force Ip": "Force IP",
|
||||||
|
"forceIpDescription": "If not None, the monitor will enforce using either IPv4 or IPv6 for connecting to the target."
|
||||||
}
|
}
|
||||||
|
|
|
@ -745,6 +745,26 @@
|
||||||
{{ $t("acceptedStatusCodesDescription") }}
|
{{ $t("acceptedStatusCodesDescription") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="my-3">
|
||||||
|
<label for="forceIp" class="form-label">{{ $t("Force Ip") }}</label>
|
||||||
|
|
||||||
|
<select id="forceIp" v-model="monitor.forceIp" class="form-select">
|
||||||
|
<option :value="null">
|
||||||
|
{{ $t("None") }}
|
||||||
|
</option>
|
||||||
|
<option value="ipv4">
|
||||||
|
IPv4
|
||||||
|
</option>
|
||||||
|
<option value="ipv6">
|
||||||
|
IPv6
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<div class="form-text">
|
||||||
|
{{ $t("forceIpDescription") }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Parent Monitor -->
|
<!-- Parent Monitor -->
|
||||||
|
@ -906,21 +926,6 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my-3">
|
|
||||||
<label for="forceIp" class="form-label">{{ $t("Force Ip") }}</label>
|
|
||||||
<select id="forceIp" v-model="monitor.forceIp" class="form-select">
|
|
||||||
<option :value="null">
|
|
||||||
{{ $t("None") }}
|
|
||||||
</option>
|
|
||||||
<option value="ipv4">
|
|
||||||
ipv4
|
|
||||||
</option>
|
|
||||||
<option value="ipv6">
|
|
||||||
ipv6
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Encoding -->
|
<!-- Encoding -->
|
||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
<label for="httpBodyEncoding" class="form-label">{{ $t("Body Encoding") }}</label>
|
<label for="httpBodyEncoding" class="form-label">{{ $t("Body Encoding") }}</label>
|
||||||
|
|
Loading…
Add table
Reference in a new issue