1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

Take toolbar height into account on job status graph

This commit is contained in:
Joe Fiorini 2015-01-26 11:11:56 -05:00
parent 1c4b8c0676
commit 116e7b2118
2 changed files with 5 additions and 3 deletions

View File

@ -36,12 +36,14 @@ angular.module('DashboardGraphs')
var w = angular.element($window);
function adjustGraphSize() {
var parentHeight = element.parent().height();
var parentHeight = element.parent().parent().height();
var toolbarHeight = element.find('.toolbar').height();
var container = element.find('svg').parent();
var margins = job_status_chart.margin();
$(container).height(parentHeight - toolbarHeight - margins.bottom);
var newHeight = parentHeight - toolbarHeight - margins.bottom;
$(container).height(newHeight);
var graph = d3.select(element.find('svg')[0]);
var width = parseInt(graph.style('width')) - margins.left - margins.right;

View File

@ -1,5 +1,5 @@
<div class="graph-wrapper job-status-graph">
<div class="clearfix">
<div class="clearfix toolbar">
<div id="job-status-title" class="h6 pull-left">
<b>Job Status</b>
</div>