summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Laughlin <clark.laughlin@linaro.org>2015-05-25 01:31:56 -0400
committerClark Laughlin <clark.laughlin@linaro.org>2015-05-25 01:31:56 -0400
commit90c80c45d654ba7c861ec084705c398d432a1e0a (patch)
treea1207d0f1c6c5340a61e23aab81de901e1cd499e
parentbeb187a458e2db7f53b4effbca5b5424f9fbc4ad (diff)
begin adding event handling for displaying actual test log data
-rw-r--r--web-app/static/index.html30
1 files 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 + " <strong>"+ e.entries[0].dataPoint.y ;
+ content = e.entries[0].dataSeries.legendText + " <strong>"+ 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);
+}
+
</script>