From 6f8508ed2f980e005be6870ee1a80427ef0d9c5f Mon Sep 17 00:00:00 2001 From: Jawed Date: Sun, 11 Jun 2023 17:45:48 +0200 Subject: [PATCH] Display ThreatType on Information Page --- .gitignore | 3 +++ .../Front/Source/ArkThor.UI/wwwroot/theme/MD/js/CSCD.js | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index aa8fcd3..3929be4 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ pcapengine/.vs/*.json /Documentation/PS.ps1 /Arkthor/Core/.idea/* /Arkthor/Core/.vscode/* +/Arkthor/Core/.vs/Core/FileContentIndex +/Arkthor/Core/.vs/Core/v17 +/Arkthor/Core/.vs diff --git a/Arkthor/Front/Source/ArkThor.UI/wwwroot/theme/MD/js/CSCD.js b/Arkthor/Front/Source/ArkThor.UI/wwwroot/theme/MD/js/CSCD.js index 1d66f90..e0b787d 100644 --- a/Arkthor/Front/Source/ArkThor.UI/wwwroot/theme/MD/js/CSCD.js +++ b/Arkthor/Front/Source/ArkThor.UI/wwwroot/theme/MD/js/CSCD.js @@ -615,7 +615,10 @@ function displayFileRecordInformation(resultResponse) { //Set Threat Type if (!(resultResponse.threatType == undefined || resultResponse.threatType == null || resultResponse.threatType == "")) { let threatType = resultResponse.threatType.toUpperCase(); - setValue("ddThreatTypeIdentified", threatType); + // setValueinnerHTML("ddThreatTypeIdentified", threatType.replace(/,/g, "
- ")); + let ddThreatTypeIdentifiedElement = document.getElementById("ddThreatTypeIdentified"); + ddThreatTypeIdentifiedElement.innerHTML = "- " + threatType.replace(/,/g, "
- "); + if (threatType.includes(", ")) { threatType = getHighestConfidenceLevelThreatType(threatType); // console.log("Highest Threat Type: " + threatType); @@ -1119,7 +1122,7 @@ function displayLiveTrackingOnBoard(response) { if ((response.status).toUpperCase() == 'DONE') { divinfo_box.className = 'callout callout-success info-box' } else if ((response.status).toUpperCase() == 'QUEUED') { divinfo_box.className = 'callout callout-warning info-box'; iConStatus.className = 'fa fa-hourglass'; } - else if ((response.status).toUpperCase() == 'REMOVED' || (response.status).toUpperCase() == 'CANCELLED') { divinfo_box.className = 'callout callout-danger info-box'; iConStatus.className = 'icon fas fa-ban'; } + else if ((response.status).toUpperCase() == 'REMOVED' || (response.status).toUpperCase() == 'CANCELLED' || (response.status).toUpperCase() == 'FAILURE') { divinfo_box.className = 'callout callout-danger info-box'; iConStatus.className = 'icon fas fa-ban'; } else if ((response.status).toUpperCase() == 'INPROGRESS') { divinfo_box.className = 'callout callout-info info-box'; iConStatus.className = 'fa fa-cog fa-spin fa-2x fa-fw'; } else { divinfo_box.className = 'callout callout-danger info-box' } }