12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- {% if c.options['organization'] == None %}
- <ul>
- <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" id="report-table">
- <col style="width: 60%" />
- <col style="width: 10%" />
- <col style="width: 10%" />
- <col style="width: 10%" />
- <thead>
- <tr>
- <th class="header">{% trans %}Organization{% endtrans %}</th>
- <th class="header">{% trans %}Broken datasets{% endtrans %}</th>
- <th class="header">{% trans %}Broken links{% endtrans %}</th>
- <th class="header">% {% trans %}Broken links{% endtrans %}</th>
- </tr>
- </thead>
- <tbody>
- {% for row in c.data['table'] %}
- <tr>
- <td>{{ h.link_to(row['organization_title'], h.report__relative_url_for(organization=row['organization_name'])) }}</td>
- <td>{{ row['broken_package_count'] }}</td>
- <td>{{ row['broken_resource_count'] }}</td>
- <td>{{ row.get('broken_resource_percent') }}%</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% else %}
- <ul>
- <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" id="report-table" style="width: 100%">
- <thead>
- <tr class="js-tooltip" style="letter-spacing: -1px; font-size: 13px;">
- <th>{% trans %}Dataset{% endtrans %}</th>
- {% if c.options['include_sub_organizations'] %}
- <th>{% trans %}Organization{% endtrans %}</th>
- {% endif %}
- <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>
- {% 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 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>
- <td>{{ h.render_datetime(row_dict.get('last_success')) if row_dict.get('last_success') else 'not recorded' }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% endif %}
|