mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-31 02:29:25 -04:00
working
This commit is contained in:
parent
201a25c659
commit
59be9bb971
4 changed files with 186 additions and 23 deletions
|
@ -1,10 +1,22 @@
|
|||
const { BeanModel } = require("redbean-node/dist/bean-model");
|
||||
const { R } = require("redbean-node");
|
||||
const cheerio = require("cheerio");
|
||||
|
||||
class StatusPage extends BeanModel {
|
||||
|
||||
static domainMappingList = { };
|
||||
|
||||
/**
|
||||
* SSR for status pages
|
||||
* @param {string} indexHTML
|
||||
* @param {StatusPage} statusPage
|
||||
*/
|
||||
static renderHTML(indexHTML, statusPage) {
|
||||
const $ = cheerio.load(indexHTML);
|
||||
|
||||
return $.root().html();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads domain mapping from DB
|
||||
* Return object like this: { "test-uptime.kuma.pet": "default" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue