From a35cd2d85eeeec012f6018f6263736f2879095da Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 15 Jul 2014 13:15:56 -0400 Subject: [PATCH] updated fix to resizing of dashboard --- awx/ui/static/js/controllers/Home.js | 2 +- awx/ui/static/js/widgets/HostGraph.js | 2 +- awx/ui/static/js/widgets/HostPieChart.js | 2 +- awx/ui/static/js/widgets/JobStatusGraph.js | 2 +- awx/ui/static/partials/home.html | 8 +++++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index d7201daa72..55e142b976 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -75,7 +75,7 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb nv.dev=false; var winHeight = $(window).height(), - available_height = winHeight - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 93; + available_height = winHeight - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 80; $('.graph-container').height(available_height/2); // chart.update(); diff --git a/awx/ui/static/js/widgets/HostGraph.js b/awx/ui/static/js/widgets/HostGraph.js index 4bc2cf0f60..f1c55106fd 100644 --- a/awx/ui/static/js/widgets/HostGraph.js +++ b/awx/ui/static/js/widgets/HostGraph.js @@ -108,7 +108,7 @@ angular.module('HostGraphWidget', ['RestServices', 'Utilities']) nv.addGraph({ generate: function() { var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, - height = $('.graph-container').height()*0.8, //nv.utils.windowSize().height/5, + height = $('.graph-container').height()*0.6, //nv.utils.windowSize().height/5, chart = nv.models.lineChart() .margin({top: 15, right: 75, bottom: 40, left: 85}) .x(function(d,i) { return i ;}) diff --git a/awx/ui/static/js/widgets/HostPieChart.js b/awx/ui/static/js/widgets/HostPieChart.js index edb8f5460c..3778b542e4 100644 --- a/awx/ui/static/js/widgets/HostPieChart.js +++ b/awx/ui/static/js/widgets/HostPieChart.js @@ -56,7 +56,7 @@ angular.module('HostPieChartWidget', ['RestServices', 'Utilities']) nv.addGraph(function() { var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, - height = $('.graph-container').height()*0.8, //nv.utils.windowSize().height/5, + height = $('.graph-container').height()*0.7, //nv.utils.windowSize().height/5, chart = nv.models.pieChart() .margin({top: 5, right: 75, bottom: 40, left: 85}) .x(function(d) { return d.label; }) diff --git a/awx/ui/static/js/widgets/JobStatusGraph.js b/awx/ui/static/js/widgets/JobStatusGraph.js index 607d5e8cd4..a0b78af553 100644 --- a/awx/ui/static/js/widgets/JobStatusGraph.js +++ b/awx/ui/static/js/widgets/JobStatusGraph.js @@ -125,7 +125,7 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities']) nv.addGraph({ generate: function() { var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, - height = $('.graph-container').height()*0.8, //nv.utils.windowSize().height/5, + height = $('.graph-container').height()*0.6, //nv.utils.windowSize().height/5, chart = nv.models.lineChart() .margin({top: 5, right: 75, bottom: 40, left: 85}) //Adjust chart margins to give the x-axis some breathing room. .x(function(d,i) { return i; }) diff --git a/awx/ui/static/partials/home.html b/awx/ui/static/partials/home.html index 4a1d407f62..3faf398429 100644 --- a/awx/ui/static/partials/home.html +++ b/awx/ui/static/partials/home.html @@ -12,8 +12,8 @@
-
-
+
+
@@ -24,4 +24,6 @@
- \ No newline at end of file + + +