openstack-health/app/views/job.html

187 lines
8.8 KiB
HTML

<header class="bs-header">
<div class="container">
<h1 class="page-header">{{ job.name }} tests</h1>
<crumb-menu show-resolution="true" show-period="true">
<li>Job: {{ job.name }}</li>
</crumb-menu>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-lg-12">
<loading-indicator></loading-indicator>
<fresh-check></fresh-check>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading panel-controls">
<h3 class="panel-title">Tests</h3>
<div class="input-group">
<div class="input-group-addon"><i class="fa fa-search"></i></div>
<input type="text"
class="form-control"
placeholder="Search for test with regex"
ng-model="job.searchTest"
ng-model-options="{debounce: 250}"
ng-change="job.onSearchChange()"
uib-tooltip="You can see {{job.tests.length}} test(s). Details are at the bottom.">
</div>
</div>
<div class="panel-body">
<chart width="100%" height="250px">
<chart-axis name="x" opposes="y" type="time"
path=".x" align="bottom" orient="horizontal"
granular-format="%x %X"></chart-axis>
<chart-axis name="y" opposes="x" type="linear"
path=".y" align="left" orient="vertical"
draw="true"></chart-axis>
<chart-dataset name="passes"
title="Passes"
data="job.passes"></chart-dataset>
<chart-dataset name="failures"
title="Failures"
data="job.failures"></chart-dataset>
<chart-dataset name="skips"
title="Skips"
data="job.skips"></chart-dataset>
<chart-canvas-line dataset="passes"
axes="x y"
stroke="blue"
line-width="1"></chart-canvas-line>
<chart-canvas-line dataset="failures"
axes="x y"
stroke="red"
line-width="1"></chart-canvas-line>
<chart-canvas-line dataset="skips"
axes="x y"
stroke="violet"
line-width="1"></chart-canvas-line>
<chart-tooltip primary="x" secondary="y"></chart-tooltip>
</chart>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading panel-controls">
<h3 class="panel-title">Tests Failure Rate</h3>
<div class="input-group">
<div class="input-group-addon"><i class="fa fa-search"></i></div>
<input type="text"
class="form-control"
placeholder="Search for test with regex"
ng-model="job.searchTest"
ng-model-options="{debounce: 250}"
ng-change="job.onSearchChange()"
uib-tooltip="You can see {{job.tests.length}} test(s). Details are at the bottom.">
</div>
</div>
<div class="panel-body">
<chart width="100%" height="250px">
<chart-axis name="x" opposes="y" type="time"
path=".x" align="bottom" orient="horizontal"
granular-format="%x %X"></chart-axis>
<chart-axis name="y" opposes="x" type="linear"
path=".y" align="left" orient="vertical"
domain="[0, 1]" draw="true"></chart-axis>
<chart-dataset name="rate"
title="% Failures"
data="job.failRates"></chart-dataset>
<chart-canvas-line dataset="rate"
axes="x y"
stroke="red"
line-width="1"></chart-canvas-line>
<chart-tooltip primary="x" secondary="y"></chart-tooltip>
</chart>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Recent Runs</h3>
</div>
<div class="table-responsive">
<table table-sort data="job.recentRuns"
class="table table-hover default-cols">
<thead>
<tr>
<th sort-field="link">Link</th>
<th sort-field="status">Status</th>
<th sort-default sort-field="start_date">Run At</th>
</tr>
</thead>
<tbody>
<tr table-ref="table" ng-repeat="run in table.dataSorted"
ng-class="run.status == 'fail' ? 'danger' : 'success'">
<td>
<a target="_blank" href="{{ run.link }}">
{{ run.link }}
<fa name="external-link"></fa>
</a>
</td>
<td>{{ run.status }}</td>
<td>{{ run.start_date | date:'M/d/yyyy HH:mm' }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading panel-controls">
<h3 class="panel-title">Tests</h3>
<div class="input-group">
<div class="input-group-addon"><i class="fa fa-search"></i></div>
<input type="text"
class="form-control"
placeholder="Search for test with regex"
ng-model="job.searchTest"
ng-change="job.onSearchChange()">
</div>
</div>
<div class="table-responsive">
<table table-sort class="table table-hover default-cols" data="job.tests"
uib-popover-template="'templates/context-legend.html'"
popover-placement="top"
popover-trigger="mouseenter">
<thead>
<tr>
<th sort-field="name">Test Name</a></th>
<th sort-field="passes">Passes</th>
<th sort-field="failures">Failures</th>
<th sort-field="skips">Skips</th>
<th sort-default sort-field="failuresRate">% Failures</th>
<th sort-field="meanRuntime">Mean Runtime</th>
</tr>
</thead>
<tbody>
<tr table-ref="table" ng-repeat="test in table.dataSorted | regex:'name':job.searchTest"
ng-class="test.failuresRate / 100 | ctxcls">
<td><a ui-sref="test({ testId: test.name })">{{ test.name }}</a></td>
<td>{{ test.passes|number }}</td>
<td>{{ test.failures|number }}</td>
<td>{{ test.skips|number }}</td>
<td>{{ test.failuresRate|number:2 }}</td>
<td>{{ test.meanRuntime|number:2 }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>