diff options
author | Josh Blum | 2013-06-01 14:56:00 -0700 |
---|---|---|
committer | Josh Blum | 2013-06-01 14:56:00 -0700 |
commit | 618c0467762e3610f7e2afa48016183ff3a67060 (patch) | |
tree | aaeff5d5bb51b44fbf41d2a5a8bf0a7100335ed3 /query | |
parent | e0de6c31bbc3d0cde7b5907beb952d9411fd2d13 (diff) | |
download | sandhi-618c0467762e3610f7e2afa48016183ff3a67060.tar.gz sandhi-618c0467762e3610f7e2afa48016183ff3a67060.tar.bz2 sandhi-618c0467762e3610f7e2afa48016183ff3a67060.zip |
props: added prop query to blocks + qa test
Diffstat (limited to 'query')
-rw-r--r-- | query/chart_factory.js | 2 | ||||
-rw-r--r-- | query/chart_overhead_compare.js | 7 | ||||
-rw-r--r-- | query/main.html | 2 | ||||
-rw-r--r-- | query/main.js | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/query/chart_factory.js b/query/chart_factory.js index 8b9656a..d55a8fd 100644 --- a/query/chart_factory.js +++ b/query/chart_factory.js @@ -251,7 +251,7 @@ function gras_chart_factory_init(registry) $.getJSON('/blocks.json', function(data) { var container = $('#chart_designer_blocks'); - $.each(data.blocks, function(index, id) + $.each(data.blocks, function(id, attrs) { registry.block_ids.push(id); var cb_id = "chart_designer_blocks " + id; diff --git a/query/chart_overhead_compare.js b/query/chart_overhead_compare.js index 0ec9070..290b15d 100644 --- a/query/chart_overhead_compare.js +++ b/query/chart_overhead_compare.js @@ -23,8 +23,11 @@ GrasChartOverheadCompare.prototype.update = function(point) data_set.push(['Task', 'Percent']); $.each(this.ids, function(index, id) { - var percents = gras_extract_percent_times(point, id); - data_set.push([id, percents['total']]); + if (id in point.blocks) //skip this ID if it didnt show up in the data + { + var percents = gras_extract_percent_times(point, id); + data_set.push([id, percents['total']]); + } }); var data = google.visualization.arrayToDataTable(data_set) diff --git a/query/main.html b/query/main.html index 3fc3508..78f9227 100644 --- a/query/main.html +++ b/query/main.html @@ -20,7 +20,7 @@ <script type="text/javascript" src="/main.js"></script> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); - google.setOnLoadCallback(gras_stats_main); + google.setOnLoadCallback(gras_query_main); </script> </head> diff --git a/query/main.js b/query/main.js index b17af63..116653e 100644 --- a/query/main.js +++ b/query/main.js @@ -61,7 +61,7 @@ var gras_query_stats = function(registry) /*********************************************************************** * Init **********************************************************************/ -var gras_stats_main = function() +var gras_query_main = function() { //create a new registry - storage for gui state var registry = new GrasStatsRegistry(); |