diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-04-02 10:45:59 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-04-02 10:45:59 +0200 |
commit | 408d738127fda171b330519d25cc73dee65c9b28 (patch) | |
tree | d5196ddd05c4bef24bf4c632f441d9283f1e55ac /public/static/js/geotrain.js | |
parent | f5cdad8481c31bd6a4879e9c6efd2c93c64ca6f3 (diff) |
geotrain: show likelihood, distinguish between no track / no trains3.11.2
Diffstat (limited to 'public/static/js/geotrain.js')
-rw-r--r-- | public/static/js/geotrain.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/public/static/js/geotrain.js b/public/static/js/geotrain.js index 2291a72..9a937d1 100644 --- a/public/static/js/geotrain.js +++ b/public/static/js/geotrain.js @@ -31,8 +31,10 @@ $(function() { removeStatus(); if (data.error) { showError('Backend-Fehler:', data.error, null); - } else if (data.trains.length == 0) { + } else if (data.evas.length == 0) { showError('Keine Bahnstrecke gefunden', '', null); + } else if (data.trains.length == 0) { + showError('Keine Züge auf der Strecke gefunden', '', null); } else { $.each(data.trains, function(i, train) { @@ -48,7 +50,7 @@ $(function() { var distancenode = $(document.createElement('div')); distancenode.attr('class', 'traininfo'); - distancenode.html(prev_time + ' ' + prev + '<br/>' + next_time + ' ' + next); + distancenode.html(train.likelihood + '%<br/>' + prev_time + ' ' + prev + '<br/>' + next_time + ' ' + next); stationlink.append(distancenode); $('div.candidatelist').append(stationlink); |