ciwatch/ciwatch/templates/project.html.jinja

110 lines
4.2 KiB
Django/Jinja

<html>
<head>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<div class="container">
{% include '_header.html.jinja' %}
{% include '_usage.html.jinja' %}
{% include '_contact.html.jinja' %}
<div class="alert alert-info">Viewing results for {{ project.name }} from the past {{ request.args.get('time', time_option) }}.</div>
</div>
<div class="btn-group">
<div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Switch project
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{% for proj in projects %}
<li><a href="{{ url_for('project', project=proj.name, time=request.args.get('time', time_option)) }}">{{ proj.name }}</a></li>
{% endfor %}
</ul>
</div>
<div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Past {{ time_option }}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{% for option in time_options %}
<li><a href="{{ url_for('project', project=project.name, time=option) }}">{{ option }}</a></li>
{% endfor %}
</ul>
</div>
<button id="verified-1-button" class="btn btn-default" type="button" data-toggle="button">Highlight Jenkins -1 votes</button>
</div>
<br>
<div class="table">
<table id="results" class="table table-bordered table-condensed">
<colgroup></colgroup>
{% for patch_set in patch_sets %}
{% if patch_set.verified is not none and not patch_set.verfied %}
<colgroup class="verified-1"></colgroup>
{% else %}
<colgroup></colgroup>
{% endif %}
{% endfor %}
<tbody>
<tr>
<td>Patch Set</td>
{% for patch_set in patch_sets %}
<td style="text-align:center;">
<a href="https://review.openstack.org/#/c/{{ "/".join(patch_set.ref.split("/")[-2:]) }}"
data-toggle="popover" data-html="true" data-placement="bottom" title="Commit Message"
data-content="{{ patch_set.commit_message|nl2br }}">
<span class="fa fa-external-link"></span>
</a>
</td>
{% endfor %}
</tr>
{% for owner, results in user_results.iteritems() %}
<tr class="ci-user"><td colspan="{{ patch_sets|length + 1}}" class="ci-user">{{ owner.name }}</td></tr>
{% for ci in results %}
<tr>
<td class="ci-name">{{ ci["name"] }}</td>
{% for comment in ci["results"] %}
<td class="result">
{% if comment is not none %}
<a href="{{ comment.log_url }}">
{% if comment.result == "SUCCESS" %}
<p class="success"><span class="glyphicon glyphicon-ok"></span></p>
{% elif comment.result == "FAILURE" %}
<p class="failure"><span class="glyphicon glyphicon-remove"></span></p>
{% elif comment.result == "UNSTABLE" %}
<p class="unstable"><span class="fa fa-exclamation-triangle"></span></p>
{% elif comment.result == "NOT_REGISTERED" %}
<p class="unregistered">N</p>
{% endif %}
</a>
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
<tr class="blank-row"></tr>
{% endfor %}
</tbody>
</table>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="{{ url_for('static', filename='hover.js') }}"></script>
<script src="{{ url_for('static', filename='verified.js') }}"></script>
</body>
</html>