Merge "Improve status table CSS."

This commit is contained in:
Jenkins 2016-02-24 14:37:57 +00:00 committed by Gerrit Code Review
commit 418966616d
4 changed files with 66 additions and 36 deletions

View File

@ -25,7 +25,9 @@ function chartBarHorizontal() {
var svg = d3.select(el[0]).append('svg') var svg = d3.select(el[0]).append('svg')
.attr('width', attrs.width) .attr('width', attrs.width)
.attr('height', attrs.height); .attr('height', attrs.height)
.style('width', attrs.width + 'px')
.style('height', attrs.height + 'px');
var update = function(data) { var update = function(data) {
if (typeof data === 'undefined') { if (typeof data === 'undefined') {

View File

@ -0,0 +1,31 @@
table.status-table {
width: 100%;
overflow: auto;
thead {
white-space: nowrap;
th[sort-field="name"] {
width: 100%;
}
th:not(:first-child) {
min-width: 75px;
}
th:last-child {
@extend .hidden-xs;
@extend .hidden-sm;
min-width: 300px;
max-width: 300px;
}
}
tbody {
td:last-child {
@extend .hidden-xs;
@extend .hidden-sm;
}
}
}

View File

@ -6,4 +6,5 @@
@import 'nv.d3'; @import 'nv.d3';
@import 'header'; @import 'header';
@import 'footer'; @import 'footer';
@import 'breadcrumbs' @import 'breadcrumbs';
@import 'openstack-health';

View File

@ -84,8 +84,7 @@
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title">Project status</h3> <h3 class="panel-title">Project status</h3>
</div> </div>
<div class="panel-body"> <table table-sort class="table table-hover status-table" data="home.projects">
<table table-sort class="table table-hover" data="home.projects">
<thead> <thead>
<tr> <tr>
<th field="number" class="text-center">#</th> <th field="number" class="text-center">#</th>
@ -94,7 +93,7 @@
<th sort-field="failures" class="text-center">Failures</th> <th sort-field="failures" class="text-center">Failures</th>
<th sort-field="passRate" class="text-center">% Passes</th> <th sort-field="passRate" class="text-center">% Passes</th>
<th sort-default sort-field="failRate" class="text-center">% Failures</th> <th sort-default sort-field="failRate" class="text-center">% Failures</th>
<th field="barGraph" class="text-center" style="min-width:320px">Bar Graph</th> <th class="text-center">Bar Graph</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -109,10 +108,8 @@
<td class="text-right">{{p.passRate*100|number:2}}</td> <td class="text-right">{{p.passRate*100|number:2}}</td>
<td class="text-right">{{p.failRate*100|number:2}}</td> <td class="text-right">{{p.failRate*100|number:2}}</td>
<td> <td>
<div id="chart"> <chart-bar-horizontal data="p.data" width="300" height="20">
<chart-bar-horizontal data="p.data" height="20">
</chart-bar-horizontal> </chart-bar-horizontal>
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -121,4 +118,3 @@
</div> </div>
</div> </div>
</div> </div>
</div>