1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

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;
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();

View File

@ -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 ;})

View File

@ -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; })

View File

@ -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; })

View File

@ -12,8 +12,8 @@
<div id="dash-counts" class="col-sm-12 col-xs-12"></div>
</div>
<div class="row">
<div class="left-side col-sm-6 col-xs-12"><div id="dash-job-status-graph" class="graph-container"></div></div>
<div class="right-side col-sm-6 col-xs-12"><div id="dash-host-status-graph" class="graph-container"></div></div>
<div class="left-side col-sm-6 col-xs-12"><div id="dash-job-status-graph" class="graph-container"></div></div>
<div class="right-side col-sm-6 col-xs-12"><div id="dash-host-status-graph" class="graph-container"></div></div>
</div>
<div class="row">
<div id="dash-jobs-list" class="left-side col-sm-6 col-xs-12"></div>
@ -24,4 +24,6 @@
<div ng-include="'/static/partials/schedule_dialog.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>