diff --git a/ckanext/harvest/fanstatic_library/styles/harvest.css b/ckanext/harvest/fanstatic_library/styles/harvest.css index c0bb9cb..0e582a4 100644 --- a/ckanext/harvest/fanstatic_library/styles/harvest.css +++ b/ckanext/harvest/fanstatic_library/styles/harvest.css @@ -22,15 +22,6 @@ header.with-filter h1 { line-height: 1.3; color: #000; } -.harvest-jobs a .errors { - float: right; - font-size: 16px; - line-height: 1.3; - margin-top: 5px; - -webkit-border-radius: 100px; - -moz-border-radius: 100px; - border-radius: 100px; -} .harvest-jobs a p { clear: both; overflow: hidden; @@ -54,9 +45,32 @@ header.with-filter h1 { .harvest-jobs a:last-child { border-bottom-width: 0; } +.harvest-errors { + float: right; +} +.harvest-errors .badge { + float: left; + font-size: 16px; + line-height: 1.3; + margin-top: 5px; +} +.harvest-errors .badge:first-child { + padding-right: 8px; + -webkit-border-radius: 100px 0 0 100px; + -moz-border-radius: 100px 0 0 100px; + border-radius: 100px 0 0 100px; +} +.harvest-errors .badge:last-child { + font-weight: normal; + padding-left: 8px; + -webkit-border-radius: 0 100px 100px 0; + -moz-border-radius: 0 100px 100px 0; + border-radius: 0 100px 100px 0; +} .harvest-diff span { + display: inline-block; color: #000; - padding: 5px 10px; + padding: 2px 10px; margin-right: 5px; font-size: 12px; -webkit-border-radius: 5px; diff --git a/ckanext/harvest/fanstatic_library/styles/harvest.less b/ckanext/harvest/fanstatic_library/styles/harvest.less index 7fbdc33..f10c0db 100644 --- a/ckanext/harvest/fanstatic_library/styles/harvest.less +++ b/ckanext/harvest/fanstatic_library/styles/harvest.less @@ -22,13 +22,6 @@ header.with-filter { line-height: 1.3; color: #000; } - .errors { - float: right; - font-size: 16px; - line-height: 1.3; - margin-top: 5px; - .border-radius(100px); - } p { clear: both; overflow: hidden; @@ -57,10 +50,31 @@ header.with-filter { } } +.harvest-errors { + .clearfix(); + float: right; + .badge { + float: left; + font-size: 16px; + line-height: 1.3; + margin-top: 5px; + &:first-child { + padding-right: 8px; + .border-radius(100px 0 0 100px); + } + &:last-child { + font-weight: normal; + padding-left: 8px; + .border-radius(0 100px 100px 0); + } + } +} + .harvest-diff { span { + display: inline-block; color: #000; - padding: 5px 10px; + padding: 2px 10px; margin-right: 5px; font-size: 12px; .border-radius(5px); diff --git a/ckanext/harvest/templates_new/snippets/job_details.html b/ckanext/harvest/templates_new/snippets/job_details.html index 6d542ba..5294b02 100644 --- a/ckanext/harvest/templates_new/snippets/job_details.html +++ b/ckanext/harvest/templates_new/snippets/job_details.html @@ -17,12 +17,13 @@ Example: {% set stats = job.stats %} -

+

{% if 'errored' in stats and stats['errored'] > 0 %} - {{ stats['errored'] }} {{ _('errors') }} + {{ stats['errored'] }} {% else %} - 0 {{ _('errors') }} + 0 {% endif %} + {{ _('errors') }}

@@ -57,30 +58,3 @@ Example: {{ _(job.status) }} - -

{{ _('Error Summary') }}

-{% if job.error_summary|length == 0 %} -

{{ _('No errors for this job') }}

-{% else %} -

{{ _('Only the 20 most frequent errors are shown') }}

- - - - - - - - - - - - - {% for error in job.error_summary %} - - - - - {% endfor %} - -
{{ _('Count') }}{{ _('Message') }}
{{ error[1] }}{{ error[0] }}
-{% endif %} diff --git a/ckanext/harvest/templates_new/source/admin.html b/ckanext/harvest/templates_new/source/admin.html index c538910..e306ddd 100644 --- a/ckanext/harvest/templates_new/source/admin.html +++ b/ckanext/harvest/templates_new/source/admin.html @@ -2,14 +2,13 @@ {% block primary_content_inner %}
- - - {{ _('View full job report') }} -

Last Harvest Job

{% snippet "snippets/job_details.html", job=source.status.last_job %}
- View full job report + + + {{ _('View full job report') }} +
{% endblock %} diff --git a/ckanext/harvest/templates_new/source/admin_base.html b/ckanext/harvest/templates_new/source/admin_base.html index c161f29..5303a1f 100644 --- a/ckanext/harvest/templates_new/source/admin_base.html +++ b/ckanext/harvest/templates_new/source/admin_base.html @@ -14,8 +14,8 @@ {% block page_header %} {% snippet 'snippets/page_header.html', items=[ - h.build_nav_icon('{0}_admin'.format(c.dataset_type), _('Dashboard'), id=source.name), - h.build_nav_icon('harvest_job_list'.format(c.dataset_type), _('Jobs'), source=source.name), - h.build_nav_icon('{0}_edit'.format(c.dataset_type), _('Edit'), id=source.name), + h.build_nav_icon('{0}_admin'.format(c.dataset_type), _('Dashboard'), id=source.name, icon='dashboard'), + h.build_nav_icon('harvest_job_list'.format(c.dataset_type), _('Jobs'), source=source.name, icon='reorder'), + h.build_nav_icon('{0}_edit'.format(c.dataset_type), _('Edit'), id=source.name, icon='edit'), ] %} {% endblock %} diff --git a/ckanext/harvest/templates_new/source/job/list.html b/ckanext/harvest/templates_new/source/job/list.html index 4ca5d1e..fee3d0e 100644 --- a/ckanext/harvest/templates_new/source/job/list.html +++ b/ckanext/harvest/templates_new/source/job/list.html @@ -24,7 +24,10 @@
  • {% if 'errored' in job.stats and job.stats['errored'] > 0 %} - {{ job.stats['errored'] }} + + {{ job.stats['errored'] }} + {{ _('errors') }} + {% endif %}

    {{ _('Job: ') }} {{ job.id }}

    diff --git a/ckanext/harvest/templates_new/source/job/read.html b/ckanext/harvest/templates_new/source/job/read.html index a534a6a..19ce1f5 100644 --- a/ckanext/harvest/templates_new/source/job/read.html +++ b/ckanext/harvest/templates_new/source/job/read.html @@ -12,6 +12,33 @@

    {{ _('Job Report') }}

    {% snippet 'snippets/job_details.html', job=c.job %} +

    {{ _('Error Summary') }}

    + {% if c.job.error_summary|length == 0 %} +

    {{ _('No errors for this job') }}

    + {% else %} +

    {{ _('Only the 20 most frequent errors are shown') }}

    + + + + + + + + + + + + + {% for error in c.job.error_summary %} + + + + + {% endfor %} + +
    {{ _('Count') }}{{ _('Message') }}
    {{ error[1] }}{{ error[0] }}
    + {% endif %} +

    {{ _('Error Report') }}

    {{ c.job_report.keys()|length}} documents with errors

    diff --git a/ckanext/harvest/templates_new/source/read_base.html b/ckanext/harvest/templates_new/source/read_base.html index ac8d6b2..bf5c4fe 100644 --- a/ckanext/harvest/templates_new/source/read_base.html +++ b/ckanext/harvest/templates_new/source/read_base.html @@ -33,8 +33,8 @@
    {% block page_header %} {% snippet 'snippets/page_header.html', items=[ - h.build_nav_icon('{0}_read'.format(c.dataset_type), _('Datasets'), id=source.name), - h.build_nav_icon('{0}_about'.format(c.dataset_type), _('About'), id=source.name), + h.build_nav_icon('{0}_read'.format(c.dataset_type), _('Datasets'), id=source.name, icon='sitemap'), + h.build_nav_icon('{0}_about'.format(c.dataset_type), _('About'), id=source.name, icon='info-sign'), ] %} {% endblock %} {% block primary_content_inner %}{% endblock %}