Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename gap to map #419

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading