openstack-health/app/views/grouped-runs.html

179 lines
8.6 KiB
HTML

<header class="bs-header">
<div class="container">
<h1 class="page-header">{{ groupedRuns.name }} jobs</h1>
<crumb-menu show-resolution="true" show-period="true">
<li>{{ groupedRuns.runMetadataKey }}: {{ groupedRuns.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">Total Jobs</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 job with regex"
ng-model="groupedRuns.searchJob"
ng-model-options="{debounce: 250}"
ng-change="groupedRuns.onSearchChange()"
uib-tooltip="You can see {{groupedRuns.jobs.length}} jobs(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="groupedRuns.passes"></chart-dataset>
<chart-dataset name="failures"
title="Failures"
data="groupedRuns.failures"></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-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">Job 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 job with regex"
ng-model="groupedRuns.searchJob"
ng-model-options="{debounce: 250}"
ng-change="groupedRuns.onSearchChange()"
uib-tooltip="You can see {{groupedRuns.jobs.length}} job(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"
granular-format=".3f"></chart-axis>
<chart-dataset name="rate"
title="% Failures"
data="groupedRuns.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="groupedRuns.recentRuns"
class="table table-hover default-cols">
<thead>
<tr>
<th sort-field="build_name">Job Name</th>
<th sort-field="status">Status</th>
<th sort-default sort-field="start_date">Run At</th>
<th sort-field="link">Link</th>
</tr>
</thead>
<tbody>
<tr table-ref="table" ng-repeat="run in table.dataSorted"
ng-class="run.status == 'fail' ? 'danger' : 'success'">
<td><a ui-sref="job({ jobName: run.build_name })">{{ run.build_name }}</a></td>
<td>{{ run.status }}</td>
<td>{{ run.start_date | date:'M/d/yyyy HH:mm' }}</td>
<td>
<a target="_blank" href="{{ run.link }}">
{{ run.link }}
<fa name="external-link"></fa>
</a>
</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">Jobs</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 job with regex"
ng-model="groupedRuns.searchJob"
ng-change="groupedRuns.onSearchChange()">
</div>
</div>
<div class="table-responsive">
<table table-sort class="table table-hover default-cols" data="groupedRuns.jobs"
uib-popover-template="'templates/context-legend.html'"
popover-placement="top"
popover-trigger="mouseenter">
<thead>
<tr>
<th sort-field="name">Job Name</th>
<th sort-field="passes">Passes</th>
<th sort-field="failures">Failures</th>
<th sort-default sort-field="failuresRate">% Failures</th>
</tr>
</thead>
<tbody>
<tr table-ref="table" ng-repeat="job in table.dataSorted | regex:'name':groupedRuns.searchJob"
ng-class="job.failuresRate / 100 | ctxcls">
<td><a ui-sref="job({ jobName: job.name })">{{ job.name }}</a></td>
<td>{{ job.passes }}</td>
<td>{{ job.failures }}</td>
<td>{{ job.failuresRate|number:2 }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>