updated fix to resizing of dashboard

This commit is contained in:
Jared Tabor
2014-07-15 13:15:56 -04:00
parent 50d962d666
commit a35cd2d85e
5 changed files with 9 additions and 7 deletions

View File

@@ -75,7 +75,7 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb
nv.dev=false; nv.dev=false;
var winHeight = $(window).height(), 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); $('.graph-container').height(available_height/2);
// chart.update(); // chart.update();

View File

@@ -108,7 +108,7 @@ angular.module('HostGraphWidget', ['RestServices', 'Utilities'])
nv.addGraph({ nv.addGraph({
generate: function() { generate: function() {
var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, 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() chart = nv.models.lineChart()
.margin({top: 15, right: 75, bottom: 40, left: 85}) .margin({top: 15, right: 75, bottom: 40, left: 85})
.x(function(d,i) { return i ;}) .x(function(d,i) { return i ;})

View File

@@ -56,7 +56,7 @@ angular.module('HostPieChartWidget', ['RestServices', 'Utilities'])
nv.addGraph(function() { nv.addGraph(function() {
var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, 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() chart = nv.models.pieChart()
.margin({top: 5, right: 75, bottom: 40, left: 85}) .margin({top: 5, right: 75, bottom: 40, left: 85})
.x(function(d) { return d.label; }) .x(function(d) { return d.label; })

View File

@@ -125,7 +125,7 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities'])
nv.addGraph({ nv.addGraph({
generate: function() { generate: function() {
var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, 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() chart = nv.models.lineChart()
.margin({top: 5, right: 75, bottom: 40, left: 85}) //Adjust chart margins to give the x-axis some breathing room. .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; }) .x(function(d,i) { return i; })

View File

@@ -25,3 +25,5 @@
<div ng-include="'/static/partials/schedule_dialog.html'"></div> <div ng-include="'/static/partials/schedule_dialog.html'"></div>
<div ng-include="'/static/partials/logviewer.html'"></div> <div ng-include="'/static/partials/logviewer.html'"></div>
<div id="host-modal-dialog" style="display: none;" class="dialog-content"></div> <div id="host-modal-dialog" style="display: none;" class="dialog-content"></div>