adjusted row heights on dashboard, jobs, and portal mode.

adjusted row heights due to change to button font size.
This commit is contained in:
Jared Tabor
2015-04-06 15:33:08 -04:00
parent 96df8a6d37
commit ed3dab91bf
10 changed files with 60 additions and 46 deletions

View File

@@ -217,7 +217,13 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $routePa
page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33); page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33);
header = Math.max($('#completed_jobs_table thead').height(), 24); header = Math.max($('#completed_jobs_table thead').height(), 24);
height = Math.floor(available_height / 2) - header - page_row - search_row - 30; height = Math.floor(available_height / 2) - header - page_row - search_row - 30;
row_height = (docw < 1350) ? 47 : 44; // row_height = (docw < 1350) ? 47 : 44;
if(docw < 1424){
row_height = 55;
}
else {
row_height = 44;
}
max_rows = Math.floor(height / row_height); max_rows = Math.floor(height / row_height);
max_rows = (max_rows < 5) ? 5 : max_rows; max_rows = (max_rows < 5) ? 5 : max_rows;
} }

View File

@@ -117,7 +117,7 @@ export function PortalController($scope, $compile, $routeParams, $rootScope, $lo
row_height = 47; row_height = 47;
} }
else { else {
row_height = 35; row_height = 44;
} }
max_rows = Math.floor(height / row_height); max_rows = Math.floor(height / row_height);
if (max_rows < 5){ if (max_rows < 5){

View File

@@ -100,12 +100,12 @@ export default
awToolTip: 'Delete the job', awToolTip: 'Delete the job',
dataPlacement: 'top' dataPlacement: 'top'
}, },
job_details: { // job_details: {
mode: 'all', // mode: 'all',
ngClick: "viewJobLog(completed_job.id)", // ngClick: "viewJobLog(completed_job.id)",
awToolTip: 'View job details', // awToolTip: 'View job details',
dataPlacement: 'top' // dataPlacement: 'top'
}, // },
stdout: { stdout: {
mode: 'all', mode: 'all',
href: '/#/jobs/{{ completed_job.id }}/stdout', href: '/#/jobs/{{ completed_job.id }}/stdout',

View File

@@ -40,7 +40,7 @@ export default
sourceModel: 'organization', sourceModel: 'organization',
sourceField: 'name', sourceField: 'name',
excludeModal: true, excludeModal: true,
columnClass: 'col-md-4 hidden-sm hidden-xs' columnClass: 'col-md-3 hidden-sm hidden-xs'
} }
}, },
@@ -61,7 +61,6 @@ export default
awToolTip: 'Edit credential', awToolTip: 'Edit credential',
dataPlacement: 'top' dataPlacement: 'top'
}, },
"delete": { "delete": {
ngClick: "deleteCustomInv(source_script.id, source_script.name)", ngClick: "deleteCustomInv(source_script.id, source_script.name)",
icon: 'fa-trash', icon: 'fa-trash',

View File

@@ -102,12 +102,12 @@ export default
dataPlacement: 'top', dataPlacement: 'top',
ngShow: "job.status != 'running'" ngShow: "job.status != 'running'"
}, },
job_details: { // job_details: {
mode: 'all', // mode: 'all',
ngClick: "viewJobLog(job.id)", // ngClick: "viewJobLog(job.id)",
awToolTip: 'View job details', // awToolTip: 'View job details',
dataPlacement: 'top' // dataPlacement: 'top'
}, // },
stdout: { stdout: {
mode: 'all', mode: 'all',
href: '/#/jobs/{{ job.id }}/stdout', href: '/#/jobs/{{ job.id }}/stdout',

View File

@@ -84,12 +84,12 @@ export default
awToolTip: 'Cancel the job', awToolTip: 'Cancel the job',
dataPlacement: 'top' dataPlacement: 'top'
}, },
job_details: { // job_details: {
mode: 'all', // mode: 'all',
ngClick: "viewJobLog(queued_job.id)", // ngClick: "viewJobLog(queued_job.id)",
awToolTip: 'View job details', // awToolTip: 'View job details',
dataPlacement: 'top', // dataPlacement: 'top',
ngShow: "queued_job.type == 'job'" // ngShow: "queued_job.type == 'job'"
} // }
} }
}); });

View File

@@ -85,12 +85,12 @@ export default
awToolTip: 'Cancel the job', awToolTip: 'Cancel the job',
dataPlacement: 'top' dataPlacement: 'top'
}, },
job_details: { // job_details: {
mode: 'all', // mode: 'all',
ngClick: "viewJobLog(running_job.id)", // ngClick: "viewJobLog(running_job.id)",
awToolTip: 'View job details', // awToolTip: 'View job details',
dataPlacement: 'top' // dataPlacement: 'top'
}, // },
stdout: { stdout: {
mode: 'all', mode: 'all',
href: '/#/jobs/{{ running_job.id }}/stdout', href: '/#/jobs/{{ running_job.id }}/stdout',

View File

@@ -135,23 +135,26 @@ angular.module('DashboardJobsWidget', ['RestServices', 'Utilities'])
page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33); page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33);
header = Math.max($('#completed_jobs_table thead').height(), 41); header = Math.max($('#completed_jobs_table thead').height(), 41);
height = Math.floor(available_height) - header - page_row - search_row -30 ; height = Math.floor(available_height) - header - page_row - search_row -30 ;
if (docw < 765 && docw >= 493) { // if (docw < 765 && docw >= 493) {
row_height = 27; // row_height = 27;
} // }
else if (docw < 493) { if (docw < 480) {
row_height = 47;
}
else if (docw < 865) {
row_height = 87; row_height = 87;
} }
else if (docw < 925) { else if (docw < 767) {
row_height = 67; row_height = 44;
}
else if (docw < 926) {
row_height = 87;
}
else if (docw < 1200) {
row_height = 44;
} }
else if (docw < 1415) { else if (docw < 1415) {
row_height = 47; row_height = 55;
} }
else { else {
row_height = 27; row_height = 44;
} }
max_rows = Math.floor(height / row_height); max_rows = Math.floor(height / row_height);
if (max_rows < 5){ if (max_rows < 5){

View File

@@ -141,7 +141,7 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities'])
$('.portal-container').height(available_height); $('.portal-container').height(available_height);
search_row = Math.max($('.search-row:eq(0)').outerHeight(), 50); search_row = Math.max($('.search-row:eq(0)').outerHeight(), 50);
page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33); page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33);
header = 0; //Math.max($('#completed_jobs_table thead').height(), 41); header = 100; //Math.max($('#completed_jobs_table thead').height(), 41);
height = Math.floor(available_height) - header - page_row - search_row ; height = Math.floor(available_height) - header - page_row - search_row ;
if (docw < 765 && docw >= 493) { if (docw < 765 && docw >= 493) {
row_height = 27; row_height = 27;
@@ -149,17 +149,23 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities'])
else if (docw < 493) { else if (docw < 493) {
row_height = 47; row_height = 47;
} }
else if (docw < 768) {
row_height = 44;
}
else if (docw < 865) { else if (docw < 865) {
row_height = 87; row_height = 87;
} }
else if (docw < 925) { else if (docw < 925) {
row_height = 67; row_height = 67;
} }
else if (docw < 992) {
row_height = 55;
}
else if (docw < 1415) { else if (docw < 1415) {
row_height = 47; row_height = 47;
} }
else { else {
row_height = 35; row_height = 44;
} }
max_rows = Math.floor(height / row_height); max_rows = Math.floor(height / row_height);
if (max_rows < 5){ if (max_rows < 5){

View File

@@ -30,20 +30,20 @@
<div id="dash-counts" class="col-sm-12 col-xs-12"></div> <div id="dash-counts" class="col-sm-12 col-xs-12"></div>
</div> </div>
<div class="row"> <div class="row">
<div class="left-side col-sm-6 col-xs-12"> <div class="left-side col-lg-6 col-md-12">
<div id="dash-job-status-graph" auto-size-module class="graph-container"> <div id="dash-job-status-graph" auto-size-module class="graph-container">
<job-status-graph data="graphData.jobStatus" period="month" job-type="all"></job-status-graph> <job-status-graph data="graphData.jobStatus" period="month" job-type="all"></job-status-graph>
</div> </div>
</div> </div>
<div class="right-side col-sm-6 col-xs-12"> <div class="right-side col-lg-6 col-md-12">
<div id="dash-host-status-graph" auto-size-module class="graph-container"> <div id="dash-host-status-graph" auto-size-module class="graph-container">
<host-status-graph data="dashboardData"></host-status-graph> <host-status-graph data="dashboardData"></host-status-graph>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div id="dash-jobs-list" class="left-side col-sm-6 col-xs-12"></div> <div id="dash-jobs-list" class="left-side col-lg-6 col-md-12"></div>
<div class="right-side col-sm-6 col-xs-12"> <div class="right-side col-lg-6 col-md-12">
<div id="dash-host-count-graph" auto-size-module class="graph-container"> <div id="dash-host-count-graph" auto-size-module class="graph-container">
<host-count-graph ng-if="user_is_superuser" data="graphData.hostCounts"></host-count-graph> <host-count-graph ng-if="user_is_superuser" data="graphData.hostCounts"></host-count-graph>
</div> </div>