mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
resolves #54: page number remembered between jobs
This commit is contained in:
parent
a0f586581d
commit
2a14567b79
@ -212,7 +212,7 @@ void Laminar::sendStatus(LaminarClient* client) {
|
|||||||
db->stmt("SELECT COUNT(*) FROM builds WHERE name = ?")
|
db->stmt("SELECT COUNT(*) FROM builds WHERE name = ?")
|
||||||
.bind(client->scope.job)
|
.bind(client->scope.job)
|
||||||
.fetch<uint>([&](uint nRuns){
|
.fetch<uint>([&](uint nRuns){
|
||||||
j.set("pages", (nRuns-1) / runsPerPage + 1);
|
j.set("pages", (nRuns-1) / runsPerPage + 1).set("page", client->scope.page);
|
||||||
});
|
});
|
||||||
j.startArray("running");
|
j.startArray("running");
|
||||||
auto p = activeJobs.byJobName().equal_range(client->scope.job);
|
auto p = activeJobs.byJobName().equal_range(client->scope.job);
|
||||||
|
@ -413,6 +413,7 @@ var Job = function() {
|
|||||||
state.lastFailed = msg.lastFailed;
|
state.lastFailed = msg.lastFailed;
|
||||||
state.nQueued = msg.nQueued;
|
state.nQueued = msg.nQueued;
|
||||||
state.pages = msg.pages;
|
state.pages = msg.pages;
|
||||||
|
state.page = msg.page;
|
||||||
|
|
||||||
var chtBt = new Chart(document.getElementById("chartBt").getContext("2d")).Bar({
|
var chtBt = new Chart(document.getElementById("chartBt").getContext("2d")).Bar({
|
||||||
labels: msg.recent.map(function(e) {
|
labels: msg.recent.map(function(e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user