3120 persist admin value

This commit is contained in:
Craig Lawson committed 2026-01-10 21:29:15 +00:00
1 parent fb3795bd70
commit ab4cc80628
5 files changed
+17 -12

No files matched your search

+6 -6
View File
@@ -217,7 +217,7 @@ class StatusPageModule {
showUptimePercentage: 1,
timezone: 1,
showAdminLoginLink: 1,
url: { $cond: [{ $eq: ["$statusPage.showMonitorUrl", true] }, "$monitors.url", "$$REMOVE"] },
url: 1,
},
monitors: {
_id: 1,
@@ -261,12 +261,12 @@ class StatusPageModule {
const { statusPage, monitors } = statusPageQuery[0];
const appSettings = await this.AppSettings.findOne({ singleton: true }).lean();
const showURL = appSettings?.showURL === true;
const showURL = appSettings?.showURL === true || appSettings?.showURL === "true";
const normalizedMonitors = monitors.map((monitor) => {
const normalizedChecks = this.NormalizeData(monitor.checks, 10, 100);
if (showURL !== true) {
const { url, ...rest } = monitor;
const normalizedMonitors = monitors.map((monitor) => {
const normalizedChecks = this.NormalizeData(monitor.checks, 10, 100);
if (showURL !== true) {
const { url, port, secret, notifications, ...rest } = monitor;
return { ...rest, checks: normalizedChecks };
}
return { ...monitor, checks: normalizedChecks };