forked from PeWu/osm-history
-
Notifications
You must be signed in to change notification settings - Fork 0
/
history.html
266 lines (266 loc) · 7.48 KB
/
history.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<h2>{{ctrl.type | capitalize}} {{ctrl.id}}</h2>
<div class="panel panel-default">
<div class="panel-body">
<a
class="btn btn-success"
role="button"
href="https://www.openstreetmap.org/{{ctrl.type}}/{{ctrl.id}}"
>
OSM
</a>
<a
class="btn btn-primary"
role="button"
ng-disabled="ctrl.deleted || !ctrl.extendedBounds"
href="{{ctrl.getJosmLink()}}"
target="_blank"
>
JOSM
</a>
<a
class="btn btn-primary"
role="button"
ng-disabled="ctrl.deleted"
href="https://www.openstreetmap.org/edit?{{ctrl.type}}={{ctrl.id}}"
>
Edit
</a>
<a
class="btn btn-danger"
role="button"
ng-disabled="ctrl.deleted"
href="http://rawedit.openstreetmap.fr/edit/{{ctrl.type}}/{{ctrl.id}}"
>
RawEdit
</a>
<a
class="btn btn-danger"
role="button"
ng-disabled="ctrl.deleted"
href="http://level0.osmz.ru/?url={{ctrl.type}}/{{ctrl.id}}"
>
Level0
</a>
<a
class="btn btn-warning"
role="button"
href="https://osmlab.github.io/osm-deep-history/#/{{ctrl.type}}/{{ctrl.id}}"
>
Deep History
</a>
<a
class="btn btn-warning"
role="button"
href="http://osm.virtuelle-loipe.de/history/?type={{ctrl.type}}&ref={{ctrl.id}}"
>
History Browser
</a>
<a
class="btn btn-warning"
role="button"
href="http://osm.mapki.com/history/{{ctrl.type}}.php?id={{ctrl.id}}"
>
Mapki
</a>
<a
class="btn btn-primary"
role="button"
ng-if="ctrl.type == 'relation'"
ng-disabled="ctrl.deleted"
href="http://ra.osmsurround.org/analyzeRelation?relationId={{ctrl.id}}"
>
Relation Analyzer
</a>
</div>
</div>
<h2>History</h2>
<div
class="panel panel-default"
ng-if="ctrl.history.length != ctrl.tagHistory.length"
>
<div class="panel-body">
<label>
<input type="checkbox" ng-model="ctrl.hideTagless" /> Hide versions
without tag changes
</label>
</div>
</div>
<div ng-if="ctrl.history">
<div ng-repeat="change in ctrl.getHistory()" class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
Version <b>#{{change.obj._version}}</b>, changeset
<a
href="https://www.openstreetmap.org/changeset/{{change.obj._changeset}}"
>{{change.obj._changeset}}</a
>
by
<a href="https://www.openstreetmap.org/user/{{change.obj._user}}"
>{{change.obj._user}}</a
>
at {{change.obj._timestamp | date:'yyyy-MM-dd HH:mm'}}
<div class="pull-right">
<a
class="btn btn-success btn-xs"
role="button"
href="https://www.openstreetmap.org/changeset/{{change.obj._changeset}}"
>
OSM
</a>
<a
class="btn btn-warning btn-xs"
role="button"
href="https://overpass-api.de/achavi/?changeset={{change.obj._changeset}}"
>
Achavi
</a>
<a
class="btn btn-warning btn-xs"
role="button"
href="http://osmhv.openstreetmap.de/changeset.jsp?id={{change.obj._changeset}}"
>
OSMHV
</a>
<a
class="btn btn-warning btn-xs"
role="button"
href="https://osmcha.org/changesets/{{change.obj._changeset}}"
>
OSMCha
</a>
<a
class="btn btn-warning btn-xs"
role="button"
href="https://osmlab.github.io/changeset-map/#{{change.obj._changeset}}"
>
OSM Lab
</a>
<a
class="btn btn-info btn-xs"
role="button"
href="http://hdyc.neis-one.org/?{{change.obj._user}}"
>
User contribution
</a>
</div>
</h3>
</div>
<div class="panel-body">
<div class="comment">
{{change.changeset.tagMap.comment || ' '}}
</div>
<div
ng-if="change.obj._visible != 'true'"
class="alert alert-danger"
role="alert"
>
<b>{{ctrl.type | uppercase}} DELETED</b>
</div>
<div ng-if="change.obj._visible == 'true'">
<div class="col-md-8">
<table class="table table-condensed">
<colgroup>
<col class="col-xs-2" />
<col class="col-xs-2" />
<col class="col-xs-4" />
<col class="col-xs-4" />
</colgroup>
<tr
diff-row
ng-repeat="diff in change.diff.tags"
key="{{diff.key}}"
prev="diff.prev"
next="diff.next"
></tr>
<tr
diff-row
key="Location"
prev="ctrl.formatCoords(change.diff.coordinates.prev)"
next="ctrl.formatCoords(change.diff.coordinates.next)"
></tr>
</table>
<table ng-if="change.diff.nodesList.length > 0" class="table table-condensed">
<caption>Nodes Changes</caption>
<colgroup>
<col class="col-xs-2" />
<col class="col-xs-2" />
<col class="col-xs-4" />
<col class="col-xs-4" />
<tr>
<th>Type</th>
<th></th>
<th>Removed Id</th>
<th>Added Id</th>
</tr>
</colgroup>
<tr
diff-row
ng-repeat="diff in change.diff.nodesList"
key="{{diff.key}}"
prev="diff.prev"
next="diff.next"
ng-attr-url="{{'https://www.openstreetmap.org/node/' + (diff.prev ? diff.prev : diff.next)}}"
context="nodes"
></tr>
</table>
<table ng-if="change.diff.membersList.length > 0" class="table table-condensed">
<caption>Members Changes</caption>
<colgroup>
<col class="col-xs-2" />
<col class="col-xs-2" />
<col class="col-xs-4" />
<col class="col-xs-4" />
</colgroup>
<tr>
<th>Type</th>
<th>Id</th>
<th>Old Role</th>
<th>New Role</th>
</tr>
<tr
diff-row
ng-repeat="diff in change.diff.membersList"
key="{{diff.key}}"
prev="diff.prev"
next="diff.next"
additional="diff.additional"
ng-attr-url="{{'https://www.openstreetmap.org/' + diff.key + '/' + diff.additional}}"
context="members"
></tr>
</table>
</div>
<leaflet
ng-if="change.mapData"
paths="change.mapData.paths"
bounds="change.mapData.bounds"
tiles="ctrl.mapTiles"
controls="ctrl.mapControls"
height="200px"
width="100%"
></leaflet>
</div>
</div>
</div>
</div>
<div ng-if="!ctrl.history && !ctrl.error">
Loading...
</div>
<div ng-if="ctrl.error" class="alert alert-danger" role="alert">
Error loading history.
</div>
<div class="text-center" ng-if="ctrl.fullHistory.length > 50 && ctrl.numberOfDisplayedChanges < ctrl.fullHistory.length">
<button
class="btn btn-default"
ng-click="ctrl.loadMore()"
>
Load More
</button>
<span>/</span>
<button
class="btn btn-default"
ng-click="ctrl.loadAll()"
>
Load All
</button>
<br>
</div>