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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user