checkpoint tracing work

This commit is contained in:
Stewart Allen 2020-11-30 18:46:56 -05:00
commit 33574454b6
3 changed files with 103 additions and 62 deletions

View file

@ -27,9 +27,14 @@
if (KIRI.client)
KIRI.client.traces = function(ondone) {
KIRI.client.sync();
send("traces", {
settings: API.conf.get()
}, ondone);
let settings = API.conf.get();
let widgets = API.widgets.map();
send("traces", { settings }, output => {
KIRI.codec.decode(output).forEach(rec => {
widgets[rec.id].traces = rec.traces;
});
ondone(true);
});
};
if (KIRI.worker)
@ -37,7 +42,10 @@
const { settings } = data;
const widgets = Object.values(cache);
widgets.forEach(widget => CAM.traces(settings, widget));
send.done(123);
send.done(KIRI.codec.encode(widgets.map(widget => {return {
id: widget.id,
traces: widget.traces
}})));
};
});