more logging
This commit is contained in:
1 parent
ab4cc80628
commit
643a743d70
2 files changed
+20
-6
No files matched your search
@@ -80,7 +80,8 @@ const Settings = () => {
|
|||||||
const handleChange = async (e) => {
|
const handleChange = async (e) => {
|
||||||
const { name, value, checked } = e.target;
|
const { name, value, checked } = e.target;
|
||||||
|
|
||||||
let newValue;
|
// eslint-disable-next-line no-console
|
||||||
|
console.log("=== SETTINGS HANDLER CHANGE ===", { name, value, checked, type: typeof value });
|
||||||
if (
|
if (
|
||||||
name === "systemEmailIgnoreTLS" ||
|
name === "systemEmailIgnoreTLS" ||
|
||||||
name === "systemEmailRequireTLS" ||
|
name === "systemEmailRequireTLS" ||
|
||||||
@@ -170,6 +171,8 @@ const Settings = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log("=== HANDLE SAVE ===", { settingsDataSettings: settingsData?.settings });
|
||||||
const { error } = settingsValidation.validate(settingsData.settings, {
|
const { error } = settingsValidation.validate(settingsData.settings, {
|
||||||
abortEarly: false,
|
abortEarly: false,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -263,16 +263,27 @@ class StatusPageModule {
|
|||||||
const appSettings = await this.AppSettings.findOne({ singleton: true }).lean();
|
const appSettings = await this.AppSettings.findOne({ singleton: true }).lean();
|
||||||
const showURL = appSettings?.showURL === true || appSettings?.showURL === "true";
|
const showURL = appSettings?.showURL === true || appSettings?.showURL === "true";
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log("=== STATUS PAGE FETCH ===");
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log("appSettings object:", JSON.stringify(appSettings, null, 2));
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log("appSettings.showURL value:", appSettings?.showURL);
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log("appSettings.showURL type:", typeof appSettings?.showURL);
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log("showURL after check:", showURL);
|
||||||
|
|
||||||
const normalizedMonitors = monitors.map((monitor) => {
|
const normalizedMonitors = monitors.map((monitor) => {
|
||||||
const normalizedChecks = this.NormalizeData(monitor.checks, 10, 100);
|
const normalizedChecks = this.NormalizeData(monitor.checks, 10, 100);
|
||||||
if (showURL !== true) {
|
if (showURL !== true) {
|
||||||
const { url, port, secret, notifications, ...rest } = monitor;
|
const { url, port, secret, notifications, ...rest } = monitor;
|
||||||
return { ...rest, checks: normalizedChecks };
|
return { ...rest, checks: normalizedChecks };
|
||||||
}
|
}
|
||||||
return { ...monitor, checks: normalizedChecks };
|
return { ...monitor, checks: normalizedChecks };
|
||||||
});
|
});
|
||||||
|
|
||||||
return { statusPage, monitors: normalizedMonitors };
|
return { statusPage, monitors: normalizedMonitors };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
error.service = SERVICE_NAME;
|
error.service = SERVICE_NAME;
|
||||||
error.method = "getStatusPageByUrl";
|
error.method = "getStatusPageByUrl";
|
||||||
|
|||||||
Reference in new issue
Block a user