add stats on matchstops page
This commit is contained in:
parent
36cf1cc2c4
commit
e78345d023
|
@ -139,8 +139,14 @@ def fuzzystops(request):
|
||||||
unrs.append({'unr':unr,'stop_is_first':fs,'stop_is_last':ls})
|
unrs.append({'unr':unr,'stop_is_first':fs,'stop_is_last':ls})
|
||||||
# import pdb
|
# import pdb
|
||||||
# pdb.set_trace()
|
# pdb.set_trace()
|
||||||
|
if end > len(unrs):
|
||||||
|
end = len(unrs)
|
||||||
|
|
||||||
context = RequestContext(request, {
|
context = RequestContext(request, {
|
||||||
'unrs': unrs[start:end]
|
'unrs': unrs[start:end],
|
||||||
|
'total': len(unrs),
|
||||||
|
'start': start,
|
||||||
|
'end': end
|
||||||
})
|
})
|
||||||
return render_to_response("fuzzystops.html", context)
|
return render_to_response("fuzzystops.html", context)
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,12 @@ $(function() {
|
||||||
$(this).parents('tr').find('.submitFuzzyEdit').click();
|
$(this).parents('tr').find('.submitFuzzyEdit').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#reloadPage').click(function() {
|
||||||
|
var start = $('#start').val();
|
||||||
|
var end = $('#end').val();
|
||||||
|
var url = location.pathname + "?start=" + start + "&end=" + end;
|
||||||
|
window.location.href = url;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function saveUNR(elem, markChecked) {
|
function saveUNR(elem, markChecked) {
|
||||||
|
@ -83,6 +89,12 @@ function saveUNR(elem, markChecked) {
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div id="stats">
|
||||||
|
Total Unique Routes remaining: {{ total }}
|
||||||
|
Showing <input size="1" id="start" value="{{ start }}" /> to <input size="1" id="end" value="{{ end }}" />
|
||||||
|
<button id="reloadPage">Reload</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
<table id="unrTable">
|
<table id="unrTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user