mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 17:13:08 +08:00
[Status Page] wip
This commit is contained in:
@@ -233,6 +233,7 @@ class Database {
|
||||
let statusPage = R.dispense("status_page");
|
||||
statusPage.slug = "";
|
||||
statusPage.title = title;
|
||||
statusPage.description = await setting("description");
|
||||
statusPage.icon = await setting("icon");
|
||||
statusPage.theme = await setting("statusPageTheme");
|
||||
statusPage.published = await setting("statusPagePublished");
|
||||
|
@@ -21,6 +21,7 @@ class StatusPage extends BeanModel {
|
||||
id: this.id,
|
||||
slug: this.slug,
|
||||
title: this.title,
|
||||
description: this.description,
|
||||
icon: this.icon,
|
||||
theme: this.theme,
|
||||
published: !!this.published,
|
||||
@@ -32,6 +33,7 @@ class StatusPage extends BeanModel {
|
||||
return {
|
||||
slug: this.slug,
|
||||
title: this.title,
|
||||
description: this.description,
|
||||
icon: this.icon,
|
||||
theme: this.theme,
|
||||
published: !!this.published,
|
||||
|
@@ -220,11 +220,7 @@ async function checkPublished() {
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
async function isPublished() {
|
||||
const value = await setting("statusPagePublished");
|
||||
if (value === null) {
|
||||
return true;
|
||||
}
|
||||
return value;
|
||||
return true;
|
||||
}
|
||||
|
||||
function send403(res, msg = "") {
|
||||
|
@@ -107,12 +107,14 @@ module.exports.statusPageSocketHandler = (socket) => {
|
||||
|
||||
statusPage.slug = config.slug;
|
||||
statusPage.title = config.title;
|
||||
statusPage.description = config.description;
|
||||
statusPage.icon = config.logo;
|
||||
statusPage.theme = config.theme;
|
||||
//statusPage.published = ;
|
||||
//statusPage.search_engine_index = ;
|
||||
statusPage.show_tags = config.showTags;
|
||||
//statusPage.password = null;
|
||||
statusPage.modified_date = R.isoDateTime();
|
||||
|
||||
await R.store(statusPage);
|
||||
|
||||
|
Reference in New Issue
Block a user