π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
β¨ Adds frontend functionality for status checks max redirects (Re@ #494)
Alicia Sykes9e383e06388f
diff --git a/src/components/LinkItems/Item.vue b/src/components/LinkItems/Item.vueindex c242d1df..882f5dc9 100644--- a/src/components/LinkItems/Item.vue+++ b/src/components/LinkItems/Item.vue@@ -96,6 +96,7 @@ export default {statusCheckInterval: Number, // Num seconds beteween repeating checksstatusCheckAllowInsecure: Boolean, // Status check ignore SSL certsstatusCheckAcceptCodes: String, // Allow status checks to pass with a code other than 200+ statusCheckMaxRedirects: Number, // Specify max number of redirectsparentSectionTitle: String, // Title of parent section (for add new)isAddNew: Boolean, // Only set if 'fake' item used as Add New button},@@ -237,7 +238,12 @@ export default {/* Pulls together all user options, returns URL + Get params for ping endpoint */makeApiUrl() {const {- url, statusCheckUrl, statusCheckHeaders, statusCheckAllowInsecure, statusCheckAcceptCodes,+ url,+ statusCheckUrl,+ statusCheckHeaders,+ statusCheckAllowInsecure,+ statusCheckAcceptCodes,+ statusCheckMaxRedirects,} = this;const encode = (str) => encodeURIComponent(str);this.statusResponse = undefined;@@ -251,9 +257,10 @@ export default {// Deterimine if user disabled securityconst enableInsecure = statusCheckAllowInsecure ? '&enableInsecure=true' : '';const acceptCodes = statusCheckAcceptCodes ? `&acceptCodes=${statusCheckAcceptCodes}` : '';+ const maxRedirects = statusCheckMaxRedirects ? `&maxRedirects=${statusCheckMaxRedirects}` : '';// Construct the full API endpoint's URL with GET paramsreturn `${baseUrl}${serviceEndpoints.statusCheck}/${urlToCheck}`- + `${headers}${enableInsecure}${acceptCodes}`;+ + `${headers}${enableInsecure}${acceptCodes}${maxRedirects}`;},/* Checks if a given service is currently online */checkWebsiteStatus() {diff --git a/src/components/LinkItems/Section.vue b/src/components/LinkItems/Section.vueindex f7d8ac14..2145a248 100644--- a/src/components/LinkItems/Section.vue+++ b/src/components/LinkItems/Section.vue@@ -42,6 +42,7 @@:statusCheckInterval="statusCheckInterval":statusCheckAllowInsecure="item.statusCheckAllowInsecure":statusCheckAcceptCodes="item.statusCheckAcceptCodes"+ :statusCheckMaxRedirects="item.statusCheckMaxRedirects"@itemClicked="$emit('itemClicked')"@triggerModal="triggerModal":isAddNew="false"diff --git a/src/components/MinimalView/MinimalSection.vue b/src/components/MinimalView/MinimalSection.vueindex d561f3ca..5dd244b5 100644--- a/src/components/MinimalView/MinimalSection.vue+++ b/src/components/MinimalView/MinimalSection.vue@@ -19,6 +19,7 @@:enableStatusCheck="shouldEnableStatusCheck(item.statusCheck)":statusCheckAllowInsecure="item.statusCheckAllowInsecure":statusCheckAcceptCodes="item.statusCheckAcceptCodes"+ :statusCheckMaxRedirects="item.statusCheckMaxRedirects":statusCheckInterval="getStatusCheckInterval()"@itemClicked="$emit('itemClicked')"@triggerModal="triggerModal"