Merge "Introduce layer to Failed Tests"
This commit is contained in:
commit
feb0e20507
|
@ -120,6 +120,12 @@ function HomeController(
|
|||
});
|
||||
healthService.getRecentFailedTests().then(function(response) {
|
||||
vm.recentTests = response.data;
|
||||
angular.forEach(vm.recentTests, function(test) {
|
||||
if (!vm.recentRuns[test.link]) {
|
||||
vm.recentRuns[test.link] = [];
|
||||
}
|
||||
vm.recentRuns[test.link].push(test);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -131,6 +137,7 @@ function HomeController(
|
|||
vm.loaded = false;
|
||||
vm.hold = 0;
|
||||
vm.recentTests = [];
|
||||
vm.recentRuns = {};
|
||||
|
||||
configurePeriods();
|
||||
loadData();
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<div class="panel" ng-class="panelClass || 'panel-default'">
|
||||
<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">
|
||||
<h4 class="panel-title">
|
||||
<a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading">
|
||||
<span uib-accordion-header ng-class="{'text-muted': isDisabled}">
|
||||
<i ng-class="{'fa fa-minus-square-o': isOpen, 'fa fa-plus-square-o': !isOpen}"></i>
|
||||
{{heading | split:'/' | last:2 | join:'/'}}
|
||||
</span>
|
||||
</a>
|
||||
: <span class="text-info"><a target="_blank" href="{{heading}}"><fa name="external-link"></fa></a></span>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">
|
||||
<div class="panel-body" ng-transclude></div>
|
||||
</div>
|
||||
</div>
|
|
@ -43,39 +43,41 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Failed Tests in Last 10 Failed Runs</h3>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Failed Tests in Last 10 Failed Runs</h3>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<uib-accordion close-others="false">
|
||||
<div ng-repeat="(key, value) in home.recentRuns">
|
||||
<uib-accordion-group
|
||||
template-url="accordion-group-run.html"
|
||||
heading="{{ key }}"
|
||||
is-open="true">
|
||||
<table table-sort data="value"
|
||||
class="table table-hover default-cols">
|
||||
<thead>
|
||||
<tr>
|
||||
<th sort-field="test_id">Test ID</th>
|
||||
<th sort-field="start_time">Start Time</th>
|
||||
<th sort-default sort-field="stop_time">Stop Timie</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="(k, v) in value">
|
||||
<td><a ui-sref="test({ testId: v.test_id })"}>
|
||||
{{ v.test_id }}</a>
|
||||
</td>
|
||||
<td>{{ v.start_time | date:'M/d/yyyy HH:mm' }}</td>
|
||||
<td>{{ v.stop_time | date:'M/d/yyyy HH:mm' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</uib-accordion-group>
|
||||
</div>
|
||||
</uib-accordion>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table table-sort data="home.recentTests"
|
||||
class="table table-hover default-cols">
|
||||
<thead>
|
||||
<tr>
|
||||
<th sort-field="test_id">Test ID</th>
|
||||
<th sort-field="link">Run Link</th>
|
||||
<th sort-field="start_time">Start Time</th>
|
||||
<th sort-default sort-field="stop_time">Stop Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr table-ref="table" ng-repeat="testRun in table.dataSorted">
|
||||
<td><a ui-sref="test({ testId: testRun.test_id })"}>
|
||||
{{ testRun.test_id }}
|
||||
</td>
|
||||
<td>
|
||||
<a target="_blank" href="{{ testRun.link }}">
|
||||
{{ testRun.link | split:'/' | last:2 | join:'/' }}
|
||||
<fa name="external-link"></fa>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ testRun.start_time | date:'M/d/yyyy HH:mm' }}</td>
|
||||
<td>{{ testRun.stop_time | date:'M/d/yyyy HH:mm' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in New Issue