From 981b0dedb9650a1304b0887ba8fdbd93aaeb9d0e Mon Sep 17 00:00:00 2001
From: John Harvey <10814889+john681611@users.noreply.github.com>
Date: Fri, 6 Oct 2023 12:49:28 +0100
Subject: [PATCH] Rename gap to map (#419)
* GA make strong status <=2
* Rename URL and UI from Gap to Map analysis
---
application/frontend/src/const.ts | 2 +-
.../frontend/src/pages/GapAnalysis/GapAnalysis.tsx | 10 +++++-----
application/frontend/src/scaffolding/Header/Header.tsx | 4 ++--
application/web/web_main.py | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/application/frontend/src/const.ts b/application/frontend/src/const.ts
index cc2afdfc8..6f176723f 100644
--- a/application/frontend/src/const.ts
+++ b/application/frontend/src/const.ts
@@ -36,4 +36,4 @@ export const CRE = '/cre';
export const GRAPH = '/graph';
export const DEEPLINK = '/deeplink';
export const BROWSEROOT = '/root_cres';
-export const GAP_ANALYSIS = '/gap_analysis';
+export const GAP_ANALYSIS = '/map_analysis';
diff --git a/application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx b/application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx
index a8878a162..87ef58a4f 100644
--- a/application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx
+++ b/application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx
@@ -50,14 +50,14 @@ function useQuery() {
const GetStrength = (score) => {
if (score == 0) return 'Direct';
- if (score < 5) return 'Strong';
+ if (score <= 2) return 'Strong';
if (score >= 20) return 'Weak';
return 'Average';
};
const GetStrengthColor = (score) => {
if (score === 0) return 'darkgreen';
- if (score < 5) return '#93C54B';
+ if (score <= 2) return '#93C54B';
if (score >= 20) return 'Red';
return 'Orange';
};
@@ -99,7 +99,7 @@ const GetResultLine = (path, gapAnalysis, key) => {
{GetStrength(0)}: Directly Linked
- {GetStrength(3)}: Closely connected likely to have
+ {GetStrength(2)}: Closely connected likely to have
majority overlap
{GetStrength(6)}: Connected likely to have partial
@@ -157,7 +157,7 @@ export const GapAnalysis = () => {
useEffect(() => {
const fetchData = async () => {
const result = await axios.get(
- `${apiUrl}/gap_analysis?standard=${BaseStandard}&standard=${CompareStandard}`
+ `${apiUrl}/map_analysis?standard=${BaseStandard}&standard=${CompareStandard}`
);
setLoading(false);
setGapAnalysis(result.data);
@@ -210,7 +210,7 @@ export const GapAnalysis = () => {