Add summary info to home page (mockup, WIP).

This patch adds basic summary information to the tempest dataset
summary on the home page. Additionally, it allows the summarized
dataset to be selected by clicking an item from the "additional
datasets" list.

Currently these values are filled with bogus data while the design
is finalized; summary data will need to be added to datasets as
part of stackviz-export before this is merged.

Change-Id: Ic08a4dd86b36f513acf8e50c1fb7d7a102876e1c
This commit is contained in:
Tim Buckley 2015-11-02 16:19:28 -07:00 committed by Austin Clark
parent 78a49c401c
commit 7c003a4a41
3 changed files with 95 additions and 11 deletions

View File

@ -9,6 +9,7 @@ function HomeCtrl(datasetService) {
// ViewModel
var vm = this;
vm.focus = 0;
datasetService.list().then(function(response) {
vm.tempest = response.data.tempest;

View File

@ -1,15 +1,90 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{{ dataset.name }}</h3>
<h3 class="panel-title">
{{ dataset.name }} <span class="text-muted" style="font-size: 65%;">1/23/2015</span>
</h3>
</div>
<div class="panel-body">
More details go here
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Overview</h3>
</div>
<div class="panel-body">
<div class="col-xs-4 text-center">
<span class="huge">1:23:45</span>
<br>
runtime
</div>
<div class="col-xs-4 text-center">
<span class="huge">1234</span>
<br>
tests run
</div>
<div class="col-xs-4 text-center">
<span class="huge text-danger">5</span>
<br>
failed
</div>
</div>
</div>
<div class="row">
</div>
<br>
<div class="panel panel-danger">
<div class="panel panel-heading">
<h3 class="panel-title">Failures</h3>
</div>
<div class="panel-body">
<div class="row">
<table class="table table-striped">
<thead>
<tr>
<th>Short Name</th>
<th>Full Name</th>
<th>Runtime (seconds)</th>
</tr>
</thead>
<tbody>
<tr>
<td>run_with_json_attach</td>
<td>tempest.api.obj.class.run_with_json_attach</td>
<td>45.78</td>
</tr>
<tr>
<td>attach_detach_volume</td>
<td>tempest.api.cinder.class.attach_detach_volume</td>
<td>12.33</td>
</tr>
<tr>
<td>delete_root_dir</td>
<td>tempest.api.obj.class.delete_root_dir</td>
<td>133.98</td>
</tr>
<tr>
<td>test_tester_test</td>
<td>tempest.api.cinder.class.test.test.test_tester_test</td>
<td>3.50</td>
</tr>
<tr>
<td>erupt_supervolcano</td>
<td>tempest.bondvillian.evil.doomsday.erupt_supervolcano</td>
<td>7.11</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="panel-footer clearfix">
<div class="btn-group pull-right">
<a type="button"
class="btn btn-default"
ui-sref="timeline({datasetId: dataset.id})">Timeline</a>
ui-sref="timeline({datasetId: dataset.id})">Details</a>
</div>
</div>
</div>

View File

@ -15,7 +15,7 @@
</div>
<div class="row" ng-if="!!home.tempest.length">
<div class="col-lg-8">
<tempest-summary ng-if="home.tempest.length >= 1" dataset="home.tempest[0]"></tempest-summary>
<tempest-summary ng-if="home.tempest.length >= 1" dataset="home.tempest[home.focus]"></tempest-summary>
</div>
<div class="col-lg-4" ng-if="home.tempest.length > 1">
<div class="panel panel-default">
@ -23,14 +23,22 @@
<h3 class="panel-title">Additional Datasets</h3>
</div>
<div class="list-group">
<a class="list-group-item"
ng-repeat="dataset in home.tempest"
ng-if="$index > 0"
ui-sref="timeline({datasetId: dataset.id})">
<ul class="list-group">
<li class="list-group-item"
ng-repeat="dataset in home.tempest"
ng-if="$index != home.focus"
ng-click="home.focus = $index"
style="cursor: pointer">
{{ dataset.name }}
</a>
</div>
<small class="text-muted">1/23/2015</small>
<a class="btn btn-default btn-xs pull-right"
ui-sref="timeline({datasetId: dataset.id})">
Details
</a>
</li>
</ul>
</div>
</div>
</div>