From e3f28fde8f56c389efff8e1f66b74bc88594038a Mon Sep 17 00:00:00 2001 From: Paul Millar <paul.millar@desy.de> Date: Wed, 1 Jan 2025 20:17:51 +0100 Subject: [PATCH] oai-pmh update how non-optimal endpoints are shown Motivation: Currently, if an endpoint has harvesting suspended then the cell is shown as green, with no indication of any problem. Similarly, when there was a problem, the message is Status: Error, with limited explanation. Modification: Remove "Status: Error" as this (in essence) provides no information that isn't already captured by the cell colour. Update cell colour to show when harvesting was disabled, now shown as an orange cell. This is meant as a kind of half-way between green (=> good) and red (=> bad). For both cases (error and harvesting disabled) a simple text is provided. Result: The output is now better reflects the status of the endpoints. --- open-data-resources.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/open-data-resources.html b/open-data-resources.html index 1564aea..ee1f6b5 100644 --- a/open-data-resources.html +++ b/open-data-resources.html @@ -48,7 +48,10 @@ title: Open data resources {% endif %} </td> {% if facility.odr.oai-pmh-endpoint.status == "Active" - %}<td class="adopted">{% + %}{% if facility.odr.oai-pmh-endpoint.skip-harvesting + %}<td class="planned">{% + else + %}<td class="adopted">{%endif%}{% elsif facility.odr.oai-pmh-endpoint.status == "Error" %}<td class="no">{% else @@ -58,7 +61,11 @@ title: Open data resources <div class="tooltip-cont"> <div class="trigger-tooltip">Endpoint: <a href="{{facility.odr.oai-pmh-endpoint.link}}">link</a> [<a href="{{facility.odr.oai-pmh-endpoint.link}}?verb=Identify">Identify</a>]<br/>{% - if facility.odr.oai-pmh-endpoint.items + if facility.odr.oai-pmh-endpoint.skip-harvesting + %}Harvesting suspended.{%endif%}{% + if facility.odr.oai-pmh-endpoint.status == "Error" + %}Querying failed.{%endif%}{% + if facility.odr.oai-pmh-endpoint.items %}Items: <b>{{facility.odr.oai-pmh-endpoint.items.count | thousands_separated}}</b>{% assign total_oai_pmh_dataset_count = total_oai_pmh_dataset_count | plus: facility.odr.oai-pmh-endpoint.items.count %}{% if facility.odr.oai-pmh-endpoint.items.sets%} @@ -77,7 +84,6 @@ title: Open data resources </table> </div>{% endif %}{% - else %}Status: {{ facility.odr.oai-pmh-endpoint.status }}{% endif %} </div> <span class="tooltip">last check: {{ facility.odr.oai-pmh-endpoint.last-check | date: "%Y-%m-%d" }}</span> -- GitLab