From 4d2a0968ec1f46082bc357fdf1f88a590eb6ee3b Mon Sep 17 00:00:00 2001 From: Adam Bem Date: Wed, 19 Apr 2023 10:32:45 +0200 Subject: [PATCH] Type info now only shows when needed --- Frontend/assets/scripts/tools/scripts.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Frontend/assets/scripts/tools/scripts.js b/Frontend/assets/scripts/tools/scripts.js index e990108..ab7f46c 100644 --- a/Frontend/assets/scripts/tools/scripts.js +++ b/Frontend/assets/scripts/tools/scripts.js @@ -244,9 +244,12 @@ function performRequest(endpoint, checkXML, checkTransform) { if (!empty) { restRequest(port, endpoint, xmlData, transformData).then(function (result) { document.getElementById("resultArea").value = result.result; - document.getElementById("procinfo").innerText = ' Computed using '.concat(" ", result.processor, ". Returned: ", result.type); + document.getElementById("procinfo").innerText = ' Computed using ' + result.processor + if (result.type) + document.getElementById("procinfo").innerText += ". Returned: " + result.type; + if (result.status = "OK") { - document.getElementById("procinfo").innerText = document.getElementById("procinfo").innerText.concat(" in ", result.time, "ms"); + document.getElementById("procinfo").innerText += " in " + result.time + "ms"; procinfo.style.color = "#30aa58"; } else { procinfo.style.color = "#aa3030";