static void publish(string instance, DateTime redTime, int numRed, int numGreen, int total, double runsPerMinute, DateTime lastCompletion) { new Topic(CloudMonitor.instanceTopic(instance)).send(new Dictionary <string, object> { { "NumRed", numRed }, { "NumGreen", numGreen }, { "Completed", total }, { "RunsPerMinute", runsPerMinute }, { "LastCompleted", O.ymdHuman(lastCompletion) }, { "RedTime", O.ymdHuman(redTime) } }); }
void addRow(string id) { var row = table.NewRow(); row[INSTANCE_ID] = id; var topic = CloudMonitor.instanceTopic(id); new Topic(topic).subscribe(fields => gui.runOnGuiThread(() => updateRow(row, fields))); table.Rows.Add(row); instances[row] = id; gui.setInstanceCount(table.Rows.Count); }