From 9c58faa7c2c3d6a964f6bcc257b56f6bda92e982 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sat, 28 Jan 2023 18:36:55 +0000 Subject: [PATCH] Added LINK_TO_QDN_RESOURCE support in the gateway. --- src/main/resources/q-apps/q-apps.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/resources/q-apps/q-apps.js b/src/main/resources/q-apps/q-apps.js index 5b6e9c15..fb7bbb55 100644 --- a/src/main/resources/q-apps/q-apps.js +++ b/src/main/resources/q-apps/q-apps.js @@ -75,13 +75,19 @@ window.addEventListener("message", (event) => { if (data.service == null) data.service = "WEBSITE"; // Default to WEBSITE if (qdnContext == "render") { url = "/render/" + data.service + "/" + data.name; + if (data.path != null) url = url.concat((data.path.startsWith("/") ? "" : "/") + data.path); + if (data.identifier != null) url = url.concat("?identifier=" + data.identifier); + } + else if (qdnContext == "gateway") { + url = "/" + data.service + "/" + data.name; + if (data.identifier != null) url = url.concat("/" + data.identifier); + if (data.path != null) url = url.concat((data.path.startsWith("/") ? "" : "/") + data.path); } else { - // gateway / domainMap only serve websites right now + // domainMap only serves websites right now url = "/" + data.name; + if (data.path != null) url = url.concat((data.path.startsWith("/") ? "" : "/") + data.path); } - if (data.path != null) url = url.concat((data.path.startsWith("/") ? "" : "/") + data.path); - if (data.identifier != null) url = url.concat("?identifier=" + data.identifier); window.location = url; response = true;