mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Fix some bugginess with how expired alerts and alert max_duration were handled. Closes #34
This commit is contained in:
@@ -66,13 +66,13 @@ function updateRefreshDisplay() {
|
||||
count = REFRESH_INTERVAL_SEC - secSinceUpdate;
|
||||
if (count <= 60) {
|
||||
var number = count.toFixed(0);
|
||||
updatingString = "Updating in " + number + " second" + (number != "1" ? "s" : "") + ". ";
|
||||
updatingString = "Updating in <span class='nowrap'>" + number + " second" + (number != "1" ? "s" : "") + ".</span>";
|
||||
} else {
|
||||
var number = Math.round(count / 60.0).toFixed(0);
|
||||
updatingString = "Updating in " + number + " minute" + (number != "1" ? "s" : "") + ". ";
|
||||
updatingString = "Updating in <span class='nowrap'>" + number + " minute" + (number != "1" ? "s" : "") + ".</span>";
|
||||
}
|
||||
}
|
||||
$("#timing-container").text("Last updated at " + lastUpdateTime.format('HH:mm') + " UTC. " + updatingString);
|
||||
$("#timing-container").html("Last updated at " + lastUpdateTime.format('HH:mm') + " UTC. " + updatingString);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user