From 90c80c45d654ba7c861ec084705c398d432a1e0a Mon Sep 17 00:00:00 2001 From: Clark Laughlin Date: Mon, 25 May 2015 01:31:56 -0400 Subject: begin adding event handling for displaying actual test log data --- web-app/static/index.html | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/web-app/static/index.html b/web-app/static/index.html index 9db6c1a..5bc0160 100644 --- a/web-app/static/index.html +++ b/web-app/static/index.html @@ -73,7 +73,7 @@ function create_chart(div_name, branch, distro, version, max_results) { toolTip: { content: function(e) { var content; - content = e.entries[0].dataSeries.name + " "+ e.entries[0].dataPoint.y ; + content = e.entries[0].dataSeries.legendText + " "+ e.entries[0].dataPoint.y ; return content; } }, @@ -81,22 +81,34 @@ function create_chart(div_name, branch, distro, version, max_results) { zoomEnabled: true, data: [ { - name: "Skipped Tests", showInLegend: true, + name: "skip", + legendText: "Skipped Tests", showInLegend: true, type: "stackedColumn", color: "rgba(13,131,172,.8)", - dataPoints: skippedDataPoints + dataPoints: skippedDataPoints, + click: function(e) { + handle_chart_click(e.dataPoint.label, e.dataSeries.name); + } }, { - name: "Failing Tests", showInLegend: true, + name: "fail", + legendText: "Failing Tests", showInLegend: true, type: "stackedColumn", color: "rgba(224,72,108,.8)", - dataPoints: failureDataPoints + dataPoints: failureDataPoints, + click: function(e) { + handle_chart_click(e.dataPoint.label, e.dataSeries.name); + } }, { - name: "Passing Tests", showInLegend: true, + name: "pass", + legendText: "Passing Tests", showInLegend: true, type: "stackedColumn", color: "rgba(159,204,64,.8)", - dataPoints: passingDataPoints + dataPoints: passingDataPoints, + click: function(e) { + handle_chart_click(e.dataPoint.label, e.dataSeries.name); + } } ] }); @@ -105,6 +117,10 @@ function create_chart(div_name, branch, distro, version, max_results) { }); } +function handle_chart_click(job, series) { + window.alert(job + ": " + series); +} + -- cgit v1.2.3