mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 08:48:46 -03:30
Fix click handlers for filters
This commit is contained in:
@@ -59,8 +59,6 @@ angular.module('GraphDirectives', [])
|
|||||||
}
|
}
|
||||||
scope.removeGraphDataReady = scope.$on('graphDataReady', function (e, data) {
|
scope.removeGraphDataReady = scope.$on('graphDataReady', function (e, data) {
|
||||||
|
|
||||||
console.log("building graph", data);
|
|
||||||
|
|
||||||
var timeFormat, graphData = [
|
var timeFormat, graphData = [
|
||||||
{
|
{
|
||||||
"color": "#00aa00",
|
"color": "#00aa00",
|
||||||
@@ -133,7 +131,7 @@ angular.module('GraphDirectives', [])
|
|||||||
});
|
});
|
||||||
|
|
||||||
// when the Period drop down filter is used, create a new graph based on the
|
// when the Period drop down filter is used, create a new graph based on the
|
||||||
d3.selectAll(element.find(".n")[0])
|
d3.selectAll(element.find(".n"))
|
||||||
.on("click", function() {
|
.on("click", function() {
|
||||||
period = this.getAttribute("id");
|
period = this.getAttribute("id");
|
||||||
$('#period-dropdown').replaceWith("<a id=\"period-dropdown\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+"<span class=\"caret\"><span>\n");
|
$('#period-dropdown').replaceWith("<a id=\"period-dropdown\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+"<span class=\"caret\"><span>\n");
|
||||||
@@ -142,7 +140,7 @@ angular.module('GraphDirectives', [])
|
|||||||
});
|
});
|
||||||
|
|
||||||
//On click, update with new data
|
//On click, update with new data
|
||||||
d3.selectAll(element.find(".m")[0])
|
d3.selectAll(element.find(".m"))
|
||||||
.on("click", function() {
|
.on("click", function() {
|
||||||
job_type = this.getAttribute("id");
|
job_type = this.getAttribute("id");
|
||||||
$('#type-dropdown').replaceWith("<a id=\"type-dropdown\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+"<span class=\"caret\"><span>\n");
|
$('#type-dropdown').replaceWith("<a id=\"type-dropdown\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+"<span class=\"caret\"><span>\n");
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ describe('Job Status Graph Directive', function() {
|
|||||||
var successfulSeries = filterDataSeries(0, lineData);
|
var successfulSeries = filterDataSeries(0, lineData);
|
||||||
var failedSeries = filterDataSeries(1, lineData);
|
var failedSeries = filterDataSeries(1, lineData);
|
||||||
|
|
||||||
console.log("test done");
|
|
||||||
expect(successfulSeries).to.eql(
|
expect(successfulSeries).to.eql(
|
||||||
[ {x: 1, y: 0, series: 0},
|
[ {x: 1, y: 0, series: 0},
|
||||||
{x: 2, y: 0, series: 0},
|
{x: 2, y: 0, series: 0},
|
||||||
|
|||||||
Reference in New Issue
Block a user