Skip to content

Commit f6556da

Browse files
authored
Merge pull request #99 from LukePrior/testing
recovery error handling
2 parents 6589097 + 5738bc2 commit f6556da

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ <h2>Recoveries</h2>
6363
<hr/>
6464
<p>Recovery reports can be added on the Chase-Car pane.</p>
6565
<hr/>
66-
<div id="recovery-list">No recent recoveries :-(</div>
66+
<div id="recovery-list"><img style="width:90px;height:30px;display:block;margin:auto;" src="img/hab-spinner.gif"/><br></div>
6767
</div>
6868
<div class="slimContainer">
6969
<h2>Statistics</h2>
7070
<hr/>
71-
<div id="leaderboard-list">No leaderboard data :-(</div>
71+
<div id="leaderboard-list"><img style="width:90px;height:30px;display:block;margin:auto;" src="img/hab-spinner.gif"/><br></div>
7272
</div>
7373
</div>
7474
<div id="aboutbox" style="display: none" class="flatpage">

js/tracker.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,6 +3295,8 @@ function refreshRecoveries() {
32953295
}
32963296
},
32973297
error: function() {
3298+
updateRecoveryPane([]);
3299+
updateLeaderboardPane([]);
32983300
},
32993301
complete: function(request, textStatus) {
33003302
periodical_recoveries = setTimeout(refreshRecoveries, 600 * 1000);
@@ -3706,6 +3708,10 @@ function updateRecoveryPane(r){
37063708
}
37073709
}
37083710

3711+
if (html == "") {
3712+
html = "<div>No recent recoveries :-(</div>"
3713+
}
3714+
37093715
$("#recovery-list").html(html);
37103716

37113717
}
@@ -3748,6 +3754,10 @@ function updateLeaderboardPane(r){
37483754
html += "<div><b>" + (parseInt(i)+1) + ". </b>" + list[i][0] + " - " + list[i][1] + "</div>";
37493755
}
37503756

3757+
if (r.length == 0) {
3758+
html = "<div>No recent recoveries :-(</div>"
3759+
}
3760+
37513761
$("#leaderboard-list").html(html);
37523762

37533763
}

0 commit comments

Comments
 (0)