Skip to content

Commit

Permalink
Merge branch 'staging' into neo4j_ORM
Browse files Browse the repository at this point in the history
  • Loading branch information
john681611 authored Oct 6, 2023
2 parents 51ea175 + 981b0de commit 82f4a7d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion application/frontend/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
10 changes: 5 additions & 5 deletions application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
};
Expand Down Expand Up @@ -99,7 +99,7 @@ const GetResultLine = (path, gapAnalysis, key) => {
<br />
<b style={{ color: GetStrengthColor(0) }}>{GetStrength(0)}</b>: Directly Linked
<br />
<b style={{ color: GetStrengthColor(3) }}>{GetStrength(3)}</b>: Closely connected likely to have
<b style={{ color: GetStrengthColor(2) }}>{GetStrength(2)}</b>: Closely connected likely to have
majority overlap
<br />
<b style={{ color: GetStrengthColor(6) }}>{GetStrength(6)}</b>: Connected likely to have partial
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -210,7 +210,7 @@ export const GapAnalysis = () => {
<Button
onClick={() => {
navigator.clipboard.writeText(
`${window.location.origin}/gap_analysis?base=${encodeURIComponent(
`${window.location.origin}/map_analysis?base=${encodeURIComponent(
BaseStandard || ''
)}&compare=${encodeURIComponent(CompareStandard || '')}`
);
Expand Down
4 changes: 2 additions & 2 deletions application/frontend/src/scaffolding/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const getLinks = (): { to: string; name: string }[] => [
name: 'Open CRE',
},
{
to: `/gap_analysis`,
name: 'Gap Analysis',
to: `/map_analysis`,
name: 'Map analysis',
},
];

Expand Down
2 changes: 1 addition & 1 deletion application/web/web_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def find_document_by_tag() -> Any:
abort(404)


@app.route("/rest/v1/gap_analysis", methods=["GET"])
@app.route("/rest/v1/map_analysis", methods=["GET"])
@cache.cached(timeout=50, query_string=True)
def gap_analysis() -> Any:
database = db.Node_collection()
Expand Down

0 comments on commit 82f4a7d

Please sign in to comment.