Merge branch 'louislam:master' into feature/local-service-monitor
This commit is contained in:
commit
700eefafe4
@ -0,0 +1,14 @@
|
||||
// Change dns_last_result column from VARCHAR(255) to TEXT to handle longer DNS TXT records
|
||||
exports.up = function (knex) {
|
||||
return knex.schema
|
||||
.alterTable("monitor", function (table) {
|
||||
table.text("dns_last_result").alter();
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function (knex) {
|
||||
return knex.schema
|
||||
.alterTable("monitor", function (table) {
|
||||
table.string("dns_last_result", 255).alter();
|
||||
});
|
||||
};
|
||||
@ -132,6 +132,9 @@ class StatusPage extends BeanModel {
|
||||
let ogDescription = $("<meta property=\"og:description\" content=\"\" />").attr("content", description155);
|
||||
head.append(ogDescription);
|
||||
|
||||
let ogType = $("<meta property=\"og:type\" content=\"website\" />");
|
||||
head.append(ogType);
|
||||
|
||||
// Preload data
|
||||
// Add jsesc, fix https://github.com/louislam/uptime-kuma/issues/2186
|
||||
const escapedJSONObject = jsesc(await StatusPage.getStatusPageData(statusPage), {
|
||||
|
||||
@ -46,6 +46,7 @@ class Discord extends NotificationProvider {
|
||||
}
|
||||
|
||||
// If heartbeatJSON is not null, we go into the normal alerting loop.
|
||||
let addess = this.extractAddress(monitorJSON);
|
||||
if (heartbeatJSON["status"] === DOWN) {
|
||||
let discorddowndata = {
|
||||
username: discordDisplayName,
|
||||
@ -58,9 +59,9 @@ class Discord extends NotificationProvider {
|
||||
name: "Service Name",
|
||||
value: monitorJSON["name"],
|
||||
},
|
||||
...(!notification.disableUrl ? [{
|
||||
...((!notification.disableUrl && addess) ? [{
|
||||
name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL",
|
||||
value: this.extractAddress(monitorJSON),
|
||||
value: addess,
|
||||
}] : []),
|
||||
{
|
||||
name: `Time (${heartbeatJSON["timezone"]})`,
|
||||
@ -98,18 +99,18 @@ class Discord extends NotificationProvider {
|
||||
name: "Service Name",
|
||||
value: monitorJSON["name"],
|
||||
},
|
||||
...(!notification.disableUrl ? [{
|
||||
...((!notification.disableUrl && addess) ? [{
|
||||
name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL",
|
||||
value: this.extractAddress(monitorJSON),
|
||||
value: addess,
|
||||
}] : []),
|
||||
{
|
||||
name: `Time (${heartbeatJSON["timezone"]})`,
|
||||
value: heartbeatJSON["localDateTime"],
|
||||
},
|
||||
{
|
||||
...(heartbeatJSON["ping"] != null ? [{
|
||||
name: "Ping",
|
||||
value: heartbeatJSON["ping"] == null ? "N/A" : heartbeatJSON["ping"] + " ms",
|
||||
},
|
||||
value: heartbeatJSON["ping"] + " ms",
|
||||
}] : []),
|
||||
],
|
||||
}],
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user