]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/pages/DeletablePage.svelte
Reverse page: new optional parameter -layer-
[nominatim-ui.git] / src / pages / DeletablePage.svelte
1 <script>
2   import { onMount } from 'svelte';
3   import { fetch_from_api, update_html_title } from '../lib/api_utils.js';
4   import { osmLink } from '../lib/helpers.js';
5
6   import Header from '../components/Header.svelte';
7   import DetailsLink from '../components/DetailsLink.svelte';
8
9   let aPolygons = [];
10
11   function loaddata() {
12     fetch_from_api('deletable', { format: 'json' }, function (data) {
13       aPolygons = data;
14     });
15     update_html_title('Deletable objects');
16   }
17   onMount(loaddata);
18 </script>
19
20 <Header/>
21 <div class="container">
22   <div class="row">
23     <div class="col-sm-12">
24       <h1>Deletable</h1>
25
26       <p>
27         {aPolygons.length} objects have been deleted in OSM but
28         are still in the Nominatim database.
29       </p>
30
31       <table class="table table-striped table-hover">
32         <thead>
33           <th>Place id</th>
34           <th>Country Code</th>
35           <th>Name</th>
36           <th>OSM object</th>
37           <th>Class</th>
38           <th>Type</th>
39         </thead>
40         <tbody>
41           {#each aPolygons as polygon}
42           <tr>
43             <td><DetailsLink feature={polygon}>{polygon.place_id}</DetailsLink></td>
44             <td>{polygon.country_code}</td>
45             <td>{polygon.name}</td>
46             <!-- eslint-disable-next-line svelte/no-at-html-tags -->
47             <td>{@html osmLink(polygon)}</td>
48             <td>{polygon.class}</td>
49             <td>{polygon.type}</td>
50           </tr>
51           {/each}
52         </tbody>
53       </table>
54
55     </div>
56   </div>
57 </div>
58