diff --git a/.github/workflows/solr.yml b/.github/workflows/solr.yml index 0bffd8d0..0ced5577 100644 --- a/.github/workflows/solr.yml +++ b/.github/workflows/solr.yml @@ -15,10 +15,13 @@ jobs: distribution: 'temurin' cache: maven - name: Starting SOLR - run: docker-compose -f docker/sas-solr/docker-compose.yml --project-directory . up -d solr + run: mkdir solr-data && chmod 777 solr-data && docker-compose -f docker/sas-solr/docker-compose.yml --project-directory . up -d solr + + - name: checking docker + run: docker ps && docker logs sas_solr - name: Wait for SOLR to start - run: docker exec -t sas_solr /opt/docker-solr/scripts/wait-for-solr.sh --max-attempts 10 --wait-seconds 5 --solr-url http://0.0.0.0:8983/ + run: docker exec -t sas_solr /opt/docker-solr/scripts/wait-for-solr.sh --max-attempts 10 --wait-seconds 10 --solr-url http://0.0.0.0:8983/ - name: Run Tests run: export "config=solr.properties" && mvn test diff --git a/.gitignore b/.gitignore index 4a12d11d..c0f2ff03 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ auth.json *auth.json node node_modules +solr-data diff --git a/docker/sas-solr/docker-compose.yml b/docker/sas-solr/docker-compose.yml index 086430c8..4182d100 100644 --- a/docker/sas-solr/docker-compose.yml +++ b/docker/sas-solr/docker-compose.yml @@ -9,12 +9,13 @@ services: - "8888:8080" solr: container_name: sas_solr - image: "solr:latest" + image: "solr:8" ports: - "8983:8983" volumes: - "./src/main/resources/solr:/tmp/config:ro" + - "./solr-data:/var/solr/data" entrypoint: - bash - "-c" - - "precreate-core testannotations /tmp/config; precreate-core annotations /tmp/config; exec solr -f" + - "solr-precreate testannotations /tmp/config; solr-precreate annotations /tmp/config; exec solr -f" diff --git a/src/main/java/uk/org/llgc/annotation/store/data/Manifest.java b/src/main/java/uk/org/llgc/annotation/store/data/Manifest.java index d7e16595..88ae14bf 100644 --- a/src/main/java/uk/org/llgc/annotation/store/data/Manifest.java +++ b/src/main/java/uk/org/llgc/annotation/store/data/Manifest.java @@ -276,16 +276,19 @@ public void setURI(final String pURI) { */ public String getShortId() { if (_shortId == null || _shortId.isEmpty()) { - if (_URI.endsWith("manifest.json")) { + // Its no longer safe to use this NLW shortcut + // as it fails the workbench: + // https://glenrobson.github.io/workbench/manifests/projectmanifest.json" + /*if (_URI.endsWith("manifest.json")) { String[] tURI = _URI.split("/"); _shortId = tURI[tURI.length - 2]; - } else { - try { - _shortId = AnnotationUtils.getHash(_URI, "md5"); - } catch (IOException tExcpt) { - tExcpt.printStackTrace(); - } + } else {*/ + try { + _shortId = AnnotationUtils.getHash(_URI, "md5"); + } catch (IOException tExcpt) { + tExcpt.printStackTrace(); } + //} } return _shortId; } diff --git a/src/main/webapp/manifest.xhtml b/src/main/webapp/manifest.xhtml index 0504b23e..16118a2e 100644 --- a/src/main/webapp/manifest.xhtml +++ b/src/main/webapp/manifest.xhtml @@ -25,120 +25,125 @@

-
- -
- - - - - + + + + + + +

It looks like there was a problem finding your manifest. Please add it again in the Collections screen.

+
diff --git a/src/main/webapp/stats/manifest.xhtml b/src/main/webapp/stats/manifest.xhtml index 8ace4cc6..bcc02586 100644 --- a/src/main/webapp/stats/manifest.xhtml +++ b/src/main/webapp/stats/manifest.xhtml @@ -28,11 +28,15 @@
- + + + - + + +