From a8c30f5ab8928d687355568fcf0c2ee775c1c042 Mon Sep 17 00:00:00 2001 From: Gero Gerke Date: Sat, 23 Nov 2024 16:28:01 +0100 Subject: [PATCH] fix lint errors --- server/model/group.js | 8 +++++--- server/model/monitor.js | 4 ++-- server/model/status_page.js | 7 ++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/server/model/group.js b/server/model/group.js index 9dd896e2..87c3a59b 100644 --- a/server/model/group.js +++ b/server/model/group.js @@ -6,9 +6,11 @@ class Group extends BeanModel { /** * Return an object that ready to parse to JSON for public * Only show necessary data to public - * @param {boolean} [showTags=false] Should the JSON include monitor tags - * @param {boolean} [showStatus = false] Should the JSON include the status - * @returns {Object} + * @param {boolean} showTags Should the JSON include monitor tags + * @param {boolean} certExpiry Should JSON include info about + * certificate expiry? + * @param {boolean} showStatus Should the JSON include the status + * @returns {Promise} Object ready to parse */ async toPublicJSON(showTags = false, certExpiry = false, showStatus = false) { let monitorBeanList = await this.getMonitorList(); diff --git a/server/model/monitor.js b/server/model/monitor.js index 0abb6e0a..dd936478 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -37,8 +37,8 @@ const rootCertificates = rootCertificatesFingerprints(); class Monitor extends BeanModel { /** -<<<<<<< HEAD * Formats the status code to a human readable form + * @param {number} status the internal status code of the monitor * @returns {string} a human readable string that corresponds to the status code */ statusToKey(status) { @@ -57,7 +57,7 @@ class Monitor extends BeanModel { * @param {boolean} showTags Include tags in JSON * @param {boolean} certExpiry Include certificate expiry info in * JSON - * @param {boolean} [showStatus = false] Should the JSON show the status + * @param {boolean} showStatus Should the JSON show the status * @returns {Promise} Object ready to parse */ async toPublicJSON(showTags = false, certExpiry = false, showStatus = false) { diff --git a/server/model/status_page.js b/server/model/status_page.js index 03591bd0..c9877417 100644 --- a/server/model/status_page.js +++ b/server/model/status_page.js @@ -257,9 +257,10 @@ class StatusPage extends BeanModel { /** * Get all status page data in one call - * @param {StatusPage} statusPage - * @param {boolean} [includeStatus = false] whether each monitor should include the status of the monitor ("up" or "down") - * @param {boolean} [includeConfig = true] whether the config for the status page should be included in the returned JSON + * @param {StatusPage} statusPage the status page to return the data for + * @param {boolean} includeStatus whether each monitor should include the status of the monitor ("up" or "down") + * @param {boolean} includeConfig whether the config for the status page should be included in the returned JSON + * @returns {object} the status page data object */ static async getStatusPageData(statusPage, includeStatus = false, includeConfig = true) { // Incident