mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-19 07:44:02 +02:00
Add port field to SRV condition variable
This commit is contained in:
parent
979c89004d
commit
4f7c8ae3b4
1 changed files with 3 additions and 4 deletions
|
@ -37,7 +37,7 @@ class DnsMonitorType extends MonitorType {
|
||||||
new ConditionVariable("retry", defaultNumberOperators),
|
new ConditionVariable("retry", defaultNumberOperators),
|
||||||
new ConditionVariable("minimum", defaultNumberOperators),
|
new ConditionVariable("minimum", defaultNumberOperators),
|
||||||
// SRV
|
// SRV
|
||||||
new ConditionVariable("targets", defaultArrayOperators),
|
new ConditionVariable("servers", defaultArrayOperators),
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -140,15 +140,14 @@ class DnsMonitorType extends MonitorType {
|
||||||
case "SRV":
|
case "SRV":
|
||||||
dnsMessage = records.map((record) => {
|
dnsMessage = records.map((record) => {
|
||||||
return Object.entries({
|
return Object.entries({
|
||||||
"Target": record.target,
|
"Server": `${record.target}:${record.port}`,
|
||||||
"Port": record.port,
|
|
||||||
"Priority": record.priority,
|
"Priority": record.priority,
|
||||||
"Weight": record.weight,
|
"Weight": record.weight,
|
||||||
}).map(([ name, value ]) => {
|
}).map(([ name, value ]) => {
|
||||||
return `${name}: ${value}`;
|
return `${name}: ${value}`;
|
||||||
}).join("; ");
|
}).join("; ");
|
||||||
}).join(" | ");
|
}).join(" | ");
|
||||||
conditionsResult = handleConditions({ targets: records.map(record => record.target) });
|
conditionsResult = handleConditions({ servers: records.map(record => `${record.target}:${record.port}`) });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue