From 5243c1653b238b8d873d9c6a27b780426e24aec3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 30 Apr 2013 18:21:56 -0700 Subject: query: do not save the panel in args args is meant to be serialized for local storage factory functions now get panel as another argument --- python/gras/query/chart_factory.js | 3 +-- python/gras/query/chart_handler_breakdown.js | 4 ++-- python/gras/query/chart_overall_throughput.js | 4 ++-- python/gras/query/chart_overhead_compare.js | 4 ++-- python/gras/query/chart_total_io_counts.js | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) (limited to 'python') diff --git a/python/gras/query/chart_factory.js b/python/gras/query/chart_factory.js index e4382d3..122d222 100644 --- a/python/gras/query/chart_factory.js +++ b/python/gras/query/chart_factory.js @@ -126,10 +126,9 @@ function gras_chart_factory_make(registry, args) tr.append(td); //call into the factory - args.panel = td.get(0); try { - var chart = new registry.chart_factories[args.chart_type](args); + var chart = new registry.chart_factories[args.chart_type](args, td.get(0)); } catch(err) { diff --git a/python/gras/query/chart_handler_breakdown.js b/python/gras/query/chart_handler_breakdown.js index 459c2d3..5f76d1d 100644 --- a/python/gras/query/chart_handler_breakdown.js +++ b/python/gras/query/chart_handler_breakdown.js @@ -1,4 +1,4 @@ -function GrasChartHandlerBreakdown(args) +function GrasChartHandlerBreakdown(args, panel) { //input checking if (args.block_ids.length != 1) throw gras_error_dialog( @@ -11,7 +11,7 @@ function GrasChartHandlerBreakdown(args) this.block_id = args.block_ids[0]; //make new chart - this.chart = new google.visualization.PieChart(args.panel); + this.chart = new google.visualization.PieChart(panel); this.title = "Handler Breakdown - " + this.block_id; this.default_width = GRAS_CHARTS_STD_WIDTH; diff --git a/python/gras/query/chart_overall_throughput.js b/python/gras/query/chart_overall_throughput.js index 280c10a..6d66e40 100644 --- a/python/gras/query/chart_overall_throughput.js +++ b/python/gras/query/chart_overall_throughput.js @@ -1,4 +1,4 @@ -function GrasChartOverallThroughput(args) +function GrasChartOverallThroughput(args, panel) { //save enables this.ids = args.block_ids; @@ -11,7 +11,7 @@ function GrasChartOverallThroughput(args) ); //make new chart - this.chart = new google.visualization.LineChart(args.panel); + this.chart = new google.visualization.LineChart(panel); this.title = "Overall Throughput vs Time in MIps"; this.history = new Array(); diff --git a/python/gras/query/chart_overhead_compare.js b/python/gras/query/chart_overhead_compare.js index 9ad324c..0ec9070 100644 --- a/python/gras/query/chart_overhead_compare.js +++ b/python/gras/query/chart_overhead_compare.js @@ -1,4 +1,4 @@ -function GrasChartOverheadCompare(args) +function GrasChartOverheadCompare(args, panel) { //save enables this.ids = args.block_ids; @@ -11,7 +11,7 @@ function GrasChartOverheadCompare(args) ); //make new chart - this.chart = new google.visualization.PieChart(args.panel); + this.chart = new google.visualization.PieChart(panel); this.title = "Overhead Comparison"; this.default_width = GRAS_CHARTS_STD_WIDTH; diff --git a/python/gras/query/chart_total_io_counts.js b/python/gras/query/chart_total_io_counts.js index f959414..2aa8a84 100644 --- a/python/gras/query/chart_total_io_counts.js +++ b/python/gras/query/chart_total_io_counts.js @@ -1,4 +1,4 @@ -function GrasChartTotalIoCounts(args) +function GrasChartTotalIoCounts(args, panel) { //input checking if (args.block_ids.length != 1) throw gras_error_dialog( @@ -10,7 +10,7 @@ function GrasChartTotalIoCounts(args) //settings this.block_id = args.block_ids[0]; this.div = $('
').attr({class:'chart_total_io_counts'}); - $(args.panel).append(this.div); + $(panel).append(this.div); this.title = "I/O Totals - " + this.block_id; } -- cgit