2 import { onMount } from 'svelte';
3 import { fetch_from_api, update_html_title } from '../lib/api_utils.js';
4 import { formatOSMType, osmLink } from '../lib/helpers.js';
9 fetch_from_api('polygons', {format: 'json'}, function(data){
12 update_html_title('Broken polygons');
18 <div class="container">
20 <div class="col-sm-12">
21 <h1>Broken polygons</h1>
24 Total number of broken polygons: {aPolygons.length}.
27 <table class="table table-striped table-hover">
35 <th>Error message</th>
40 {#each aPolygons as polygon}
42 <td>{polygon.osm_type}</td>
43 <td>{@html osmLink(polygon)}</td>
44 <td>{polygon.class}</td>
45 <td>{polygon.type}</td>
46 <td>{polygon.name}</td>
47 <td>{polygon.country_code || ''}</td>
48 <td>{polygon.errormessage}</td>
49 <td>{polygon.updated}</td>
51 <a href="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/{formatOSMType(polygon.osm_type)}/{polygon.osm_id}/full" target="josm">josm</a>