-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Weekly release 2024-07-08
- Loading branch information
Showing
11 changed files
with
196 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
# | ||
# This file is part of ckanext-nhm | ||
# Created by the Natural History Museum in London, UK | ||
|
||
from ckan.plugins import toolkit | ||
import requests | ||
|
||
|
||
def get_iiif_status(): | ||
health = {} | ||
|
||
url = toolkit.config.get('ckanext.iiif.image_server_url') | ||
r = requests.get(url + '/status') | ||
if r.ok: | ||
health['ping'] = True | ||
response_json = r.json() | ||
else: | ||
response_json = {} | ||
|
||
health['status'] = response_json.get('status') | ||
mss = response_json.get('profiles', {}).get('mss', {}) | ||
health['specimens'] = mss.get('mss_status', {}).get('status', ':(') | ||
health['es'] = mss.get('es', {'status': 'red', 'response_time': None}) | ||
|
||
return health |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
('Library & Archives', '[email protected]'), | ||
('Mineral & Planetary Sciences', '[email protected]'), | ||
('Vertebrates', '[email protected]'), | ||
('Biodiversity Intactness Index', '[email protected]'), | ||
('Data Portal / Other', '[email protected]'), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,11 @@ | |
{% endblock %} | ||
|
||
{% block package_metadata_fields_maintainer %} | ||
{{ form.input('maintainer_email', label=_('Contact email'), id='field-maintainer-email', placeholder=_('e.g. [email protected]'), value=data.maintainer_email, error=errors.maintainer_email, classes=['control-medium']) }} | ||
{{ form.info('Enquiries about this dataset will be sent to this address. If not set, messages will go to the collaborators or creator of the dataset.', inline=False) }} | ||
|
||
{{ form.input('maintainer', label=_('Contact name'), id='field-maintainer', placeholder=_('e.g Project Y'), value=data.maintainer, error=errors.maintainer, classes=['control-medium']) }} | ||
{{ form.info('Name of the person or group receiving dataset enquiries (see above). Optional.', inline=False) }} | ||
{% endblock %} | ||
|
||
{% block custom_fields %} | ||
|
@@ -21,8 +26,8 @@ | |
{{ super() }} | ||
{% endblock %} | ||
|
||
{{ form.info("What time period does this dataset cover? If not applicable, leave blank.", inline=True) }} | ||
{{ form.input('temporal_extent', label=_('Temporal extent'), id='field-temporal-extent', placeholder=_('1970 - 1985'), value=data.temporal_extent, error=errors.temporal_extent, classes=['control-medium']) }} | ||
{{ form.info("What time period does this dataset cover? If not applicable, leave blank.", inline=True) }} | ||
|
||
{{ form.select('update_frequency', label=_('Update frequency'), id='field-update-frequency', options=h.form_select_update_frequency_options(), selected=data.update_frequency, error=errors.update_frequency, classes=['control-medium']) }} | ||
{# TODO: Add map to pick spatial extent - hidden for non sysadmin until then #} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters