mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-17 17:15:57 +00:00
Compare commits
3 commits
f9e1f2840e
...
5b4853f9ba
Author | SHA1 | Date | |
---|---|---|---|
|
5b4853f9ba | ||
|
277d6fe0ce | ||
|
ffbd312f29 |
3 changed files with 28 additions and 6 deletions
|
@ -0,0 +1,13 @@
|
||||||
|
// Update info_json column to LONGTEXT mainly for MariaDB
|
||||||
|
exports.up = function (knex) {
|
||||||
|
return knex.schema
|
||||||
|
.alterTable("monitor_tls_info", function (table) {
|
||||||
|
table.text("info_json", "longtext").alter();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.down = function (knex) {
|
||||||
|
return knex.schema.alterTable("monitor_tls_info", function (table) {
|
||||||
|
table.text("info_json", "text").alter();
|
||||||
|
});
|
||||||
|
};
|
|
@ -775,8 +775,6 @@ class Database {
|
||||||
await migrationServer.start(port, hostname);
|
await migrationServer.start(port, hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
await Settings.set("migrateAggregateTableState", "migrating");
|
|
||||||
|
|
||||||
log.info("db", "Migrating Aggregate Table");
|
log.info("db", "Migrating Aggregate Table");
|
||||||
|
|
||||||
log.info("db", "Getting list of unique monitors");
|
log.info("db", "Getting list of unique monitors");
|
||||||
|
@ -799,6 +797,8 @@ class Database {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await Settings.set("migrateAggregateTableState", "migrating");
|
||||||
|
|
||||||
let progressPercent = 0;
|
let progressPercent = 0;
|
||||||
let part = 100 / monitors.length;
|
let part = 100 / monitors.length;
|
||||||
let i = 1;
|
let i = 1;
|
||||||
|
|
|
@ -240,10 +240,19 @@ class RealBrowserMonitorType extends MonitorType {
|
||||||
const context = await browser.newContext();
|
const context = await browser.newContext();
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
|
|
||||||
const res = await page.goto(monitor.url, {
|
let res;
|
||||||
waitUntil: "networkidle",
|
const matches = monitor.name.match(/\[(.*?)\]/);
|
||||||
timeout: monitor.interval * 1000 * 0.8,
|
if (matches) {
|
||||||
});
|
res = await page.goto(monitor.url, {
|
||||||
|
timeout: monitor.interval * 1000 * 0.8,
|
||||||
|
});
|
||||||
|
await page.waitForSelector(matches[1], { timeout: monitor.interval * 1000 * 0.8 });
|
||||||
|
} else {
|
||||||
|
res = await page.goto(monitor.url, {
|
||||||
|
waitUntil: "networkidle",
|
||||||
|
timeout: monitor.interval * 1000 * 0.8,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let filename = jwt.sign(monitor.id, server.jwtSecret) + ".png";
|
let filename = jwt.sign(monitor.id, server.jwtSecret) + ".png";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue