From 121a609ed2cadd50e5e85093e2ac524bdd279d02 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 10 May 2013 00:00:47 -0700 Subject: gras: added more theron counters + query work --- python/gras/query/chart_port_counters.js | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 python/gras/query/chart_port_counters.js (limited to 'python/gras/query/chart_port_counters.js') diff --git a/python/gras/query/chart_port_counters.js b/python/gras/query/chart_port_counters.js new file mode 100644 index 0000000..af74c33 --- /dev/null +++ b/python/gras/query/chart_port_counters.js @@ -0,0 +1,76 @@ +function GrasChartPortCounts(args, panel) +{ + //input checking + if (args.block_ids.length != 1) throw gras_error_dialog( + "GrasChartPortCounts", + "Error making total port counts chart.\n"+ + "Specify only one block for this chart." + ); + + //settings + this.block_id = args.block_ids[0]; + this.div = $('
').attr({class:'chart_total_counts'}); + $(panel).append(this.div); + this.title = "Port Counters - " + this.block_id; +} + +GrasChartPortCounts.prototype.update = function(point) +{ + var block_data = point.blocks[this.block_id]; + if (!block_data) return; + var ul = $('