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 9, 2023
2 parents 82f4a7d + 6807b40 commit c70dccd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.11.4'
python-version: '3.11.4'
cache: 'pip'
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Install python dependencies
run: sudo apt-get update && sudo apt-get install -y python3-setuptools python3-pip chromium-browser libgbm1 && make install-deps
- name: Test-e2e
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.11.4'
cache: 'pip'
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Install python dependencies
run: sudo apt-get update && sudo apt-get install -y python3-setuptools python3-pip && make install-deps
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ e2e:
[ -d "./venv" ] && . ./venv/bin/activate
export FLASK_APP=$(CURDIR)/cre.py
export FLASK_CONFIG=development
fFLASK_CONFIG=development flask run&
FLASK_CONFIG=development flask run&

yarn test:e2e
killall yarn
Expand Down
8 changes: 3 additions & 5 deletions application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { LoadingAndErrorIndicator } from '../../components/LoadingAndErrorIndica
import { useEnvironment } from '../../hooks';
import { GapAnalysisPathStart } from '../../types';
import { getDocumentDisplayName } from '../../utils';
import { getInternalUrl } from '../../utils/document';

const GetSegmentText = (segment, segmentID) => {
let textPart = segment.end;
Expand Down Expand Up @@ -66,7 +67,7 @@ const GetResultLine = (path, gapAnalysis, key) => {
let segmentID = gapAnalysis[key].start.id;
return (
<div key={path.end.id} style={{ marginBottom: '.25em', fontWeight: 'bold' }}>
<a href={`/node/standard/${path.end.name}/section/${path.end.section}`} target="_blank">
<a href={getInternalUrl(path.end)} target="_blank">
<Popup
wide="very"
size="large"
Expand Down Expand Up @@ -231,10 +232,7 @@ export const GapAnalysis = () => {
{Object.keys(gapAnalysis).map((key) => (
<Table.Row key={key}>
<Table.Cell textAlign="left" verticalAlign="top" selectable>
<a
href={`/node/standard/${gapAnalysis[key].start.name}/section/${gapAnalysis[key].start.section}`}
target="_blank"
>
<a href={getInternalUrl(gapAnalysis[key].start)} target="_blank">
<p>
<b>{getDocumentDisplayName(gapAnalysis[key].start, true)}</b>
</p>
Expand Down
2 changes: 1 addition & 1 deletion application/frontend/src/utils/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const groupBy = <T, K extends keyof any>(list: T[], getKey: (item: T) =>
return previous;
}, {} as Record<K, T[]>);

export const getInternalUrl = (doc: Document): String => {
export const getInternalUrl = (doc: Document): string => {
if (doc.doctype.toLowerCase() != 'cre') {
var standardAPIPath = `/node/${doc.doctype.toLowerCase()}/${doc.name}/`;
if (doc) {
Expand Down

0 comments on commit c70dccd

Please sign in to comment.