MCPcopy Create free account
hub / github.com/Marus/cortex-debug / processConfiguration

Function processConfiguration

src/grapher/main.ts:26–45  ·  view source on GitHub ↗
(message: GrapherConfigurationMessage)

Source from the content-addressed store, hash-verified

24 const graphs: Graph[] = [];
25
26 function processConfiguration(message: GrapherConfigurationMessage) {
27 window.datasource = new GraphDataSource();
28
29 message.graphs.forEach((config: any) => {
30 if (config.type === 'realtime') {
31 const graph = new TimeseriesGraph(config as TimeseriesGraphConfiguration, window.datasource);
32 graphs.push(graph);
33 if (message.status === 'stopped' || message.status === 'terminated') { graph.stop(); }
34 }
35 else if (config.type === 'x-y-plot') {
36 const graph = new XYGraph(config as XYGraphConfiguration, window.datasource);
37 graphs.push(graph);
38 if (message.status === 'stopped' || message.status === 'terminated') { graph.stop(); }
39 }
40 });
41
42 // const psg: ProgramStatsGraph = new ProgramStatsGraph(window.datasource);
43 // if (message.status === 'stopped' || message.status === 'terminated') { psg.stop(); }
44 // graphs.push(psg);
45 }
46
47 function processStatus(message: GrapherStatusMessage) {
48 if (message.status === 'stopped' || message.status === 'terminated') {

Callers 1

initFunction · 0.85

Calls 1

stopMethod · 0.95

Tested by

no test coverage detected