1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2026-10-18 00:54:25 +00:00

frontend: better dynamic update of graphs

react to jobCompletion messages by updating graphs in
more cases so manual refresh is not necessary to see
most up to date representation.
This commit is contained in:
Oliver Giles
2021-07-09 10:03:30 +12:00
parent 60f7ee5402
commit a50514a135
2 changed files with 102 additions and 23 deletions

View File

@@ -470,6 +470,12 @@ std::string Laminar::getStatus(MonitorScope scope) {
j.EndObject();
});
j.EndArray();
j.startObject("completedCounts");
db->stmt("SELECT name, COUNT(*) FROM builds WHERE result IS NOT NULL GROUP BY name")
.fetch<str, uint>([&](str job, uint count){
j.set(job.c_str(), count);
});
j.EndObject();
}
j.EndObject();
return j.str();