From cc14fa4f996d0adf27f183387187e7e5c150ddf9 Mon Sep 17 00:00:00 2001 From: "Schiefelbein, Andrew" Date: Thu, 25 Jun 2020 14:24:53 -0500 Subject: [PATCH] Quick fix for the fqdn option not working for the dashboards Change-Id: I36c7c85694fd3fb4ea6cd0b88cbb008dafb0f3b0 --- web/js/common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/js/common.js b/web/js/common.js index aad4ea4..9d3e098 100755 --- a/web/js/common.js +++ b/web/js/common.js @@ -106,11 +106,11 @@ function addServiceDashboards(json) { // eslint-disable-line no-unused-vars let namespace = cluster.namespaces[j]; for (let k = 0; k < namespace.dashboards.length; k++) { let dash = namespace.dashboards[k]; - let fqdn = ""; - if (dash.fqdn === undefined) { - fqdn = `${dash.hostname}.${cluster.namespaces[j].name}.${cluster.baseFqdn}` + let fqdn = null; + if (dash.hasOwnProperty("fqdn")) { + fqdn = `${dash.fqdn}`; } else { - ({ fqdn } = dash.fqdn); + fqdn = `${dash.hostname}.${cluster.namespaces[j].name}.${cluster.baseFqdn}`; } let url = `${dash.protocol}://${fqdn}:${dash.port}/${dash.path || ""}`; addDashboard("DashDropdown", dash.name, url)