Merge pull request #140 from mjanez/ckan-2.9.11
Update ckanext-schemingdcat to v3.2.1
This commit is contained in:
commit
d1d65ec443
|
@ -127,7 +127,7 @@ CKAN__LOCALE_ORDER="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru
|
|||
CKAN__LOCALES_OFFERED="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv"
|
||||
|
||||
# Extensions
|
||||
CKAN__PLUGINS="envvars stats image_view text_view datatables_view webpage_view resourcedictionary datastore xloader harvest spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat schemingdcat_ckan_harvester schemingdcat_xls_harvester pdf_view pages fluent"
|
||||
CKAN__PLUGINS="envvars stats image_view text_view recline_view webpage_view resourcedictionary datastore xloader spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat schemingdcat_ckan_harvester schemingdcat_xls_harvester harvest pdf_view pages fluent"
|
||||
|
||||
# ckanext-harvest
|
||||
CKAN__HARVEST__MQ__TYPE=redis
|
||||
|
@ -176,6 +176,7 @@ CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS=True
|
|||
CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_ICON="theme"
|
||||
CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL=True
|
||||
CKANEXT__SCHEMINGDCAT_SHOW_METADATA_TEMPLATES_TOOLBAR=False
|
||||
CKANEXT__METADATA_TEMPLATES_SEARCH_IDENTIFIER="schemingdcat_xls-template"
|
||||
|
||||
# ckanext-pages
|
||||
CKANEXT__PAGES__ALOW_HTML=False
|
||||
|
|
|
@ -22,7 +22,7 @@ COPY req_fixes req_fixes
|
|||
## Pages - v0.5.2 ##
|
||||
## PDFView - 0.0.8 ##
|
||||
## Fluent - v1.0.1 (mjanez/Forked stable version) ##
|
||||
## Scheming DCAT - v3.2.0 (mjanez/GeoDCAT-AP/NTI-RISP extended version) ##
|
||||
## Scheming DCAT - v3.2.1 (mjanez/GeoDCAT-AP/NTI-RISP extended version) ##
|
||||
RUN echo ${TZ} > /etc/timezone && \
|
||||
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then cp /usr/share/zoneinfo/${TZ} /etc/localtime; fi && \
|
||||
# Remove apk cache
|
||||
|
@ -54,7 +54,7 @@ RUN echo ${TZ} > /etc/timezone && \
|
|||
echo "mjanez/ckanext-fluent" && \
|
||||
pip3 install --no-cache-dir -e git+https://github.com/mjanez/ckanext-fluent.git@v1.0.1#egg=ckanext-fluent && \
|
||||
echo "mjanez/ckanext-schemingdcat" && \
|
||||
pip3 install --no-cache-dir -e git+https://github.com/mjanez/ckanext-schemingdcat.git@v3.2.0#egg=ckanext_schemingdcat && \
|
||||
pip3 install --no-cache-dir -e git+https://github.com/mjanez/ckanext-schemingdcat.git@v3.2.1#egg=ckanext_schemingdcat && \
|
||||
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-schemingdcat/requirements.txt
|
||||
|
||||
# Used to configure the container environment by setting environment variables, creating users, running initialization scripts, .etc
|
||||
|
|
|
@ -16,7 +16,8 @@ ckan config-tool $CKAN_INI \
|
|||
"schemingdcat.geometadata_base_uri=$CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI" \
|
||||
"schemingdcat.default_package_item_icon=$CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_ICON" \
|
||||
"schemingdcat.default_package_item_show_spatial=$CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL" \
|
||||
"schemingdcat.show_metadata_templates_toolbar=$CKANEXT__SCHEMINGDCAT_SHOW_METADATA_TEMPLATES_TOOLBAR"
|
||||
"schemingdcat.show_metadata_templates_toolbar=$CKANEXT__SCHEMINGDCAT_SHOW_METADATA_TEMPLATES_TOOLBAR" \
|
||||
"schemingdcat.metadata_templates_search_identifier=$CKANEXT__METADATA_TEMPLATES_SEARCH_IDENTIFIER"
|
||||
|
||||
echo "[docker-entrypoint.02_setup_scheming] Rebuild index"
|
||||
ckan -c $CKAN_INI search-index rebuild
|
|
@ -1,144 +0,0 @@
|
|||
diff --git a/ckanext/harvest/logic/action/update.py b/ckanext/harvest/logic/action/update.py
|
||||
index 7dce1f5..ac4db4f 100644
|
||||
--- a/ckanext/harvest/logic/action/update.py
|
||||
+++ b/ckanext/harvest/logic/action/update.py
|
||||
@@ -706,7 +706,7 @@ def harvest_jobs_run(context, data_dict):
|
||||
notify_all = toolkit.asbool(config.get('ckan.harvest.status_mail.all'))
|
||||
notify_errors = toolkit.asbool(config.get('ckan.harvest.status_mail.errored'))
|
||||
last_job_errors = status['last_job']['stats'].get('errored', 0)
|
||||
- log.debug('Notifications: All:{} On error:{} Errors:{}'.format(notify_all, notify_errors, last_job_errors))
|
||||
+ log.debug('Notifications: All:{} On error:{} Errors:{} Errordict:{}'.format(notify_all, notify_errors, last_job_errors, status['last_job']['stats']))
|
||||
|
||||
if last_job_errors > 0 and (notify_all or notify_errors):
|
||||
send_error_email(context, job_obj.source.id, status)
|
||||
diff --git a/ckanext/harvest/templates/snippets/source_item.html b/ckanext/harvest/templates/snippets/source_item.html
|
||||
index a8ba26f..3f50bdb 100644
|
||||
--- a/ckanext/harvest/templates/snippets/source_item.html
|
||||
+++ b/ckanext/harvest/templates/snippets/source_item.html
|
||||
@@ -48,6 +48,7 @@ Example:
|
||||
{% endif %}
|
||||
{% if not within_organization and source.organization %}
|
||||
— {{ _('Organization') }}: {{ h.link_to(source.organization.title or source.organization.name, h.url_for('organization.read', id=source.organization.name)) }}</a>
|
||||
+ — {{ _('Datasets') }}: {{ h.link_to(h.schemingdcat_package_count_for_source(source.id), url) }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
diff --git a/ckanext/harvest/templates/source/new.html b/ckanext/harvest/templates/source/new.html
|
||||
index b7feb3d..b1fe472 100644
|
||||
--- a/ckanext/harvest/templates/source/new.html
|
||||
+++ b/ckanext/harvest/templates/source/new.html
|
||||
@@ -24,12 +24,18 @@
|
||||
<div class="module-content">
|
||||
<p>
|
||||
{% trans %}
|
||||
- Harvest sources allow importing remote metadata into this catalog.
|
||||
- Remote sources can be other catalogs such as other CKAN instances, CSW
|
||||
- servers or Web Accessible Folders (WAF) (depending on the actual
|
||||
- harvesters enabled for this instance).
|
||||
+ Harvest sources allow importing remote metadata into this catalog. Remote sources can be other catalogs such as other CKAN instances, CSW servers, XML metadata files, XLSX with metadata records or Web Accessible Folder (WAF).
|
||||
{% endtrans %}
|
||||
</p>
|
||||
+
|
||||
+ <p>
|
||||
+ {{ _('Depending on the actual harvesters enabled for this instance. eg: ') }}
|
||||
+ <ul>
|
||||
+ <li><a href="https://github.com/mjanez/ckanext-schemingdcat?tab=readme-ov-file#harvesters" target="_blank">ckanext-schemingdcat</a></li>
|
||||
+ <li><a href="https://github.com/ckan/ckanext-dcat?tab=readme-ov-file#rdf-dcat-harvester" target="_blank">ckanext-dcat</a></li>
|
||||
+ <li><a href="https://docs.ckan.org/projects/ckanext-spatial/en/latest/harvesters.html" target="_blank">ckanext-scheming_spatial</a></li>
|
||||
+ </ul>
|
||||
+ </p>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
diff --git a/ckanext/harvest/templates/source/new_source_form.html b/ckanext/harvest/templates/source/new_source_form.html
|
||||
index 324d012..37358fc 100644
|
||||
--- a/ckanext/harvest/templates/source/new_source_form.html
|
||||
+++ b/ckanext/harvest/templates/source/new_source_form.html
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
{% call form.input('url', id='field-url', label=_('URL'), value=data.url, error=errors.url, classes=['control-full', 'control-large']) %}
|
||||
<span class="info-block">
|
||||
- {{ _('This should include the http:// part of the URL') }}
|
||||
+ <i class="fa fa-exclamation-triangle"></i> {{ _('This should include the http:// part of the URL') }}
|
||||
</span>
|
||||
{% endcall %}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{{ form.markdown('notes', id='field-notes', label=_('Description'), value=data.notes, error=errors.notes) }}
|
||||
|
||||
<div class="harvest-types form-group control-group">
|
||||
- <label class="control-label">Source type</label>
|
||||
+ <label class="control-label">{{ _('Source type') }}</label>
|
||||
<div class="controls">
|
||||
{% for harvester in h.harvesters_info() %}
|
||||
{% set checked = False %}
|
||||
@@ -46,7 +46,11 @@
|
||||
{{ form.select('frequency', id='field-frequency', label=_('Update frequency'), options=h.harvest_frequencies(), selected=data.frequency, error=errors.frequency) }}
|
||||
|
||||
{% block extra_config %}
|
||||
- {{ form.textarea('config', id='field-config', label=_('Configuration'), value=data.config, error=errors.config) }}
|
||||
+ {% call form.textarea('config', id='field-config', label=_('Configuration'), value=data.config, error=errors.config) %}
|
||||
+ <span class="info-block">
|
||||
+ <i class="fa fa-info-circle"></i> {{ _('You can validate the JSON at: ') }} <a href="{{ h.url_for_static_or_external("https://jsonlint.com/") }}" target="_blank" rel="noreferrer">{{ _('JSONLint') }}</a>
|
||||
+ </span>
|
||||
+ {% endcall %}
|
||||
{% endblock extra_config %}
|
||||
|
||||
{# if we have a default group then this wants remembering #}
|
||||
diff --git a/ckanext/harvest/templates/source/read.html b/ckanext/harvest/templates/source/read.html
|
||||
index e016e55..e60a18c 100644
|
||||
--- a/ckanext/harvest/templates/source/read.html
|
||||
+++ b/ckanext/harvest/templates/source/read.html
|
||||
@@ -3,6 +3,6 @@
|
||||
{% block primary_content_inner %}
|
||||
<section class="module-content">
|
||||
<h1 class="hide-heading">{{ _('Datasets') }}</h1>
|
||||
- {{ h.package_list_for_source(harvest_source.id) }}
|
||||
+ {{ h.schemingdcat_package_list_for_source(harvest_source.id) }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
diff --git a/ckanext/harvest/templates/source/read_base.html b/ckanext/harvest/templates/source/read_base.html
|
||||
index 5126e25..3191c38 100644
|
||||
--- a/ckanext/harvest/templates/source/read_base.html
|
||||
+++ b/ckanext/harvest/templates/source/read_base.html
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="nums">
|
||||
<dl>
|
||||
<dt>{{ _('Datasets') }}</dt>
|
||||
- <dd>{{ h.package_count_for_source(harvest_source.id) }}</dd>
|
||||
+ <dd>{{ h.schemingdcat_package_count_for_source(harvest_source.id) }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
diff --git a/ckanext/harvest/templates/source/search.html b/ckanext/harvest/templates/source/search.html
|
||||
index d9ceeea..f44a0cb 100644
|
||||
--- a/ckanext/harvest/templates/source/search.html
|
||||
+++ b/ckanext/harvest/templates/source/search.html
|
||||
@@ -44,7 +44,26 @@
|
||||
|
||||
|
||||
|
||||
-{% block secondary_content %}
|
||||
+ {% block secondary_content %}
|
||||
+ <section class="module module-narrow">
|
||||
+ <h2 class="module-heading"><i class="fa fa-lg fa-info-circle icon-large icon-info-sign"></i> {{ _('Harvest sources') }}</h2>
|
||||
+ <div class="module-content">
|
||||
+ <p>
|
||||
+ {% trans %}
|
||||
+ Harvest sources allow importing remote metadata into this catalog. Remote sources can be other catalogs such as other CKAN instances, CSW servers, XML metadata files, XLSX with metadata records or Web Accessible Folder (WAF).
|
||||
+ {% endtrans %}
|
||||
+ </p>
|
||||
+
|
||||
+ <p>
|
||||
+ {{ _('Depending on the actual harvesters enabled for this instance. eg: ') }}
|
||||
+ <ul>
|
||||
+ <li><a href="https://github.com/mjanez/ckanext-schemingdcat?tab=readme-ov-file#harvesters" target="_blank">ckanext-schemingdcat</a></li>
|
||||
+ <li><a href="https://github.com/ckan/ckanext-dcat?tab=readme-ov-file#rdf-dcat-harvester" target="_blank">ckanext-dcat</a></li>
|
||||
+ <li><a href="https://docs.ckan.org/projects/ckanext-spatial/en/latest/harvesters.html" target="_blank">ckanext-scheming_spatial</a></li>
|
||||
+ </ul>
|
||||
+ </p>
|
||||
+ </div>
|
||||
+ </section>
|
||||
{% for facet in c.facet_titles %}
|
||||
{{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, alternative_url=h.url_for('{0}.search'.format(c.dataset_type))) }}
|
||||
{% endfor %}
|
|
@ -59,7 +59,7 @@ ENV SOLR_BBOX_FIELDS '<field name="bbox_area" type="float" indexed="true" stored
|
|||
<field name="resource_relation" type="string" uninvertible="false" docValues="true" indexed="true" stored="true" multiValued="true"/> \
|
||||
<field name="metadata_profile" type="string" uninvertible="false" docValues="true" indexed="true" stored="true" multiValued="true"/>' \
|
||||
'<field name="dcat_type" type="string" uninvertible="false" docValues="true" indexed="true" stored="true" multiValued="true"/>' \
|
||||
'<field name="dataset_scope" type="boolean" indexed="true" stored="true"/>'
|
||||
'<field name="dataset_scope" type="string" uninvertible="false" docValues="true" indexed="true" stored="true" multiValued="true"/>'
|
||||
|
||||
RUN sed -i "/<fields>/a $SOLR_BBOX_FIELDS" $SOLR_SCHEMA_FILE
|
||||
|
||||
|
|
Loading…
Reference in New Issue