From dde42b04f21e3c3790e5daea948b8419ea995243 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 18 Jul 2014 14:38:31 -0400 Subject: [PATCH] removed borders that show up on dashboard screen before user logs in --- awx/ui/static/js/controllers/Home.js | 13 ++++++++++--- awx/ui/static/js/widgets/DashboardJobs.js | 2 +- awx/ui/static/js/widgets/HostPieChart.js | 4 +--- awx/ui/static/js/widgets/JobStatusGraph.js | 2 +- awx/ui/static/less/new-dashboard.less | 4 +++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index fb9e74676c..2fb009685c 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -15,7 +15,7 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb ClearScope('home'); - var buttons, html, e, waitCount, loadedCount; + var buttons, html, e, waitCount, loadedCount,borderStyles; // Add buttons to the top of the Home page. We're using lib/ansible/generator_helpers.js-> Buttons() // to build buttons dynamically and insure all styling and icons match the rest of the application. @@ -75,10 +75,17 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb $scope.removeDashboardReady = $scope.$on('dashboardReady', function (e, data) { nv.dev=false; + + borderStyles = {"border": "1px solid #A9A9A9", + "border-radius": "4px", + "padding": "5px", + "margin-bottom": "15px"}; + $('.graph-container').css(borderStyles); + 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() - 120; $('.graph-container').height(available_height/2); - // chart.update(); + // // chart.update(); DashboardCounts({ scope: $scope, diff --git a/awx/ui/static/js/widgets/DashboardJobs.js b/awx/ui/static/js/widgets/DashboardJobs.js index 54c062e2d5..4d94bd732f 100644 --- a/awx/ui/static/js/widgets/DashboardJobs.js +++ b/awx/ui/static/js/widgets/DashboardJobs.js @@ -122,7 +122,7 @@ angular.module('DashboardJobsWidget', ['RestServices', 'Utilities']) var docw = $(window).width(), box_height, available_height, search_row, page_row, height, header, row_height; - available_height = Math.floor(($(window).height() - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 93)/2); + available_height = Math.floor(($(window).height() - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 120)/2); $('.dashboard-jobs-list-container').height(available_height); search_row = Math.max($('.search-row:eq(0)').outerHeight(), 50); page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33); diff --git a/awx/ui/static/js/widgets/HostPieChart.js b/awx/ui/static/js/widgets/HostPieChart.js index 66e8cb05ea..ceb7dab65d 100644 --- a/awx/ui/static/js/widgets/HostPieChart.js +++ b/awx/ui/static/js/widgets/HostPieChart.js @@ -34,8 +34,6 @@ angular.module('HostPieChartWidget', ['RestServices', 'Utilities']) // html += "\n"; - - element = angular.element(document.getElementById(target)); element.html(html); $compile(element)(scope); @@ -89,7 +87,7 @@ angular.module('HostPieChartWidget', ['RestServices', 'Utilities']) } else{ 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() - 120; $('.graph-container:eq(1)').height(available_height/2); $('.host-pie-chart svg').replaceWith(''); diff --git a/awx/ui/static/js/widgets/JobStatusGraph.js b/awx/ui/static/js/widgets/JobStatusGraph.js index 92783e1e72..43119f5365 100644 --- a/awx/ui/static/js/widgets/JobStatusGraph.js +++ b/awx/ui/static/js/widgets/JobStatusGraph.js @@ -176,7 +176,7 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities']) } else{ 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() - 120; $('.graph-container').height(available_height/2); chart.update(); } diff --git a/awx/ui/static/less/new-dashboard.less b/awx/ui/static/less/new-dashboard.less index 7b606f6b16..b34eac2d06 100644 --- a/awx/ui/static/less/new-dashboard.less +++ b/awx/ui/static/less/new-dashboard.less @@ -30,15 +30,17 @@ border: 1px solid @grey; border-radius: 4px; padding: 5px; - } +/* .graph-container{ border: 1px solid @grey; border-radius: 4px; padding: 5px; margin-bottom: 15px; } +due to the login screen showing on top of the dashboard, we're hiding the borders until after the user logs in*/ + .count-container{ border: 1px solid @grey; border-radius: 4px;