mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00

If a distro comparison update task fails (returning a non-zero value to indicate as such) we were not able to see this easily from the frontend. Show success/failure in the form of a label on the task page and general update list/detail, and if the task fails while we're watching then make the progress bar go red as well. Also make a distinction between the process failing (retcode > 0) and being terminated (retcode < 0, e.g. process was killed). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
64 lines
1.9 KiB
HTML
64 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
{% load static %}
|
|
{% load extrafilters %}
|
|
|
|
{% comment %}
|
|
|
|
layerindex-web - updates list page template
|
|
|
|
Copyright (C) 2016 Intel Corporation
|
|
Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
<!--
|
|
{% block title_append %} - updates{% endblock %}
|
|
-->
|
|
|
|
{% block content %}
|
|
{% autoescape on %}
|
|
|
|
<div class="row">
|
|
<div class="col-md-9 col-md-offset-1">
|
|
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Update date</th>
|
|
<th>Time</th>
|
|
<th>Errors</th>
|
|
<th>Warnings</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for update in updates %}
|
|
{% with error_count=update.error_count warning_count=update.warning_count %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'update' update.id %}">{{ update.started }}{% if update.reload %} (reload){% endif %}</a>
|
|
{% if update.finished and update.retcode %}<span id="status-label" class="label label-danger">{% if update.retcode < 0 %}TERMINATED{% elif update.retcode %}FAILED{% endif %}{% endif %}
|
|
</td>
|
|
<td>{% if update.finished %}{{ update.started|timesince2:update.finished }}{% else %}(in progress){% endif %}</td>
|
|
<td>{% if error_count %}<span class="badge badge-important">{{ error_count }}</span>{% endif %}</td>
|
|
<td>{% if warning_count %}<span class="badge badge-warning">{{ warning_count }}</span>{% endif %}</td>
|
|
</tr>
|
|
{% endwith %}
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
{% if is_paginated %}
|
|
{% load pagination %}
|
|
{% pagination page_obj %}
|
|
{% endif %}
|
|
|
|
{% endautoescape %}
|
|
|
|
{% endblock %}
|