Skip to content

Commit

Permalink
Merge pull request ckan#68 from vrk-kpa/AV-976_broken-links-overflow
Browse files Browse the repository at this point in the history
AV-976: Fix broken links report layout for long words
  • Loading branch information
Zharktas authored Aug 21, 2019
2 parents 55dadd1 + 995385d commit 2166591
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions ckanext/archiver/templates/report/broken_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,34 @@
<li>{% trans %}Broken datasets{% endtrans %}: {{ c.data['num_broken_packages'] }} / {{ c.data['num_packages'] }} ({{ c.data.get('broken_package_percent') }}%)</li>
<li>{% trans %}Broken links{% endtrans %}: {{ c.data['num_broken_resources'] }} / {{ c.data['num_resources'] }} ({{ c.data.get('broken_resource_percent') }}%)</li>
</ul>
<table class="table table-striped table-bordered table-condensed tablesorter" id="report-table" style="width: 100%; table-layout: fixed;">
<table class="table table-striped table-bordered table-condensed tablesorter" id="report-table" style="width: 100%">
<thead>
<tr class="js-tooltip" style="letter-spacing: -1px; font-size: 13px;">
<th style="width: 100px">{% trans %}Dataset{% endtrans %}</th>
<th style="width: 45px">{% trans %}Notes{% endtrans %}</th>
<th>{% trans %}Dataset{% endtrans %}</th>
{% if c.options['include_sub_organizations'] %}
<th style="width: 85px">{% trans %}Organization{% endtrans %}</th>
<th>{% trans %}Organization{% endtrans %}</th>
{% endif %}
<th style="width: 20px" title="{% trans %}Index/position of the resource in the dataset{% endtrans %}">{% trans %}Res{% endtrans %}</th>
<th style="width: 190px">{% trans %}URL{% endtrans %}</th>
<th style="width: 75px">{% trans %}Status{% endtrans %}</th>
<th style="width: 120px">{% trans %}Reason{% endtrans %}</th>
<th style="width: 25px" title="{% trans %}Failed download attempts{% endtrans %}">{% trans %}No. of fails{% endtrans %}</th>
<th style="width: 75px" title="{% trans %}First failed attempt{% endtrans %}">{% trans %}First fail{% endtrans %}</th>
<th style="width: 75px" title="{% trans %}Most recent failed attempt{% endtrans %}">{% trans %}Latest fail{% endtrans %}</th>
<th style="width: 75px" title="{% trans %}The last time it was successfully obtained{% endtrans %}">{% trans %}Last success{% endtrans %}</th>
<th title="{% trans %}Index/position of the resource in the dataset{% endtrans %}">{% trans %}Res{% endtrans %}</th>
<th>{% trans %}URL{% endtrans %}</th>
<th>{% trans %}Status{% endtrans %}</th>
<th>{% trans %}Reason{% endtrans %}</th>
<th title="{% trans %}Failed download attempts{% endtrans %}">{% trans %}No. of fails{% endtrans %}</th>
<th title="{% trans %}First failed attempt{% endtrans %}">{% trans %}First fail{% endtrans %}</th>
<th title="{% trans %}Most recent failed attempt{% endtrans %}">{% trans %}Latest fail{% endtrans %}</th>
<th title="{% trans %}The last time it was successfully obtained{% endtrans %}">{% trans %}Last success{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for row_dict in c.data['table'] %}
<tr>
<td><a href="{{ h.url_for(controller='package', action='read', id=row_dict['dataset_name']) }}">{{ row_dict['dataset_title'] }}</a></td>
<td>{{ row_dict['dataset_notes'] }}</td>
{% if c.options['include_sub_organizations'] %}
<td><a href="/publisher/{{ row_dict['organization_name'] }}">{{ row_dict['organization_title'] }}</a></td>
{% endif %}
<td><a href="/dataset/{{ row_dict['dataset_name'] }}/resource/{{ row_dict['resource_id'] }}">{{ row_dict['resource_position'] }}</a></td>
<td><a href="{{ row_dict['resource_url'] }}" style="word-wrap:break-word;">{{ row_dict['resource_url'] }}</a></td>
<td>{{ row_dict.get('status', 'not recorded') }}</td>
<td>{{ row_dict.get('reason', 'not recorded') }}</td>
<td style="word-wrap: anywhere">{{ row_dict.get('reason', 'not recorded') }}</td>
<td>{{ row_dict.get('failure_count', 'not recorded') }}</td>
<td>{{ h.render_datetime(row_dict.get('first_failure')) if row_dict.get('first_failure') else 'not recorded' }}</td>
<td>{{ h.render_datetime(row_dict.get('last_updated')) if row_dict.get('last_updated') else 'not recorded' }}</td>
Expand Down

0 comments on commit 2166591

Please sign in to comment.