|
|
@ -16,6 +16,7 @@ function onTrainData(data) { |
|
|
|
title.appendChild(document.createTextNode(` ${data.number}`)) |
|
|
|
title.appendChild(document.createTextNode(` ${data.number}`)) |
|
|
|
|
|
|
|
|
|
|
|
document.getElementById('company').textContent = data.operator |
|
|
|
document.getElementById('company').textContent = data.operator |
|
|
|
|
|
|
|
document.getElementById('date').textContent = data.date |
|
|
|
|
|
|
|
|
|
|
|
document.getElementById('route-from').textContent = data.route.from |
|
|
|
document.getElementById('route-from').textContent = data.route.from |
|
|
|
document.getElementById('route-to').textContent = data.route.to |
|
|
|
document.getElementById('route-to').textContent = data.route.to |
|
|
@ -198,6 +199,9 @@ function refresh() { |
|
|
|
onTrainData(response) |
|
|
|
onTrainData(response) |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(function () { |
|
|
|
.then(function () { |
|
|
|
|
|
|
|
if (refreshStopToken != null) { |
|
|
|
|
|
|
|
clearTimeout(refreshStopToken) |
|
|
|
|
|
|
|
} |
|
|
|
refreshStopToken = setTimeout(function () {
|
|
|
|
refreshStopToken = setTimeout(function () {
|
|
|
|
refresh() |
|
|
|
refresh() |
|
|
|
}, 60000) |
|
|
|
}, 60000) |
|
|
|