aboutsummaryrefslogtreecommitdiffstats
path: root/templates/warningmgr/index.html
blob: 02d29b877f17510cdd15824a8fb8c979e9f88a98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{% extends "base.html" %}
{% load i18n %}

{% comment %}

  buildhistory-web - warning list page template

  Copyright (C) 2013-2015 Intel Corporation
  Licensed under the MIT license, see COPYING.MIT for details

{% endcomment %}


{% block content %}
{% autoescape on %}

{% if user.is_authenticated %}
    <form action="{% url "multi_action" %}" method="post">
    {% csrf_token %}
{% endif %}
{% if warning_list %}
    <table class="table table-striped table-bordered table-condensed">
    <tr>
{% if user.is_authenticated %}
        <th></th>
{% endif %}
        <th>Summary</th>
        <th>Status</th>
    </tr>
    {% for warningitem in warning_list %}
    {% ifchanged warningitem.build %}
    <tr>
        <td colspan="3">
            {% if warningitem.build.build_url %}<a href="{{ warningitem.build.build_url }}">{% endif %}
            Build {{ warningitem.build }}
            {% if warningitem.build.build_url %}</a>{% endif %}
        </td>
    </tr>
    {% endifchanged %}
    <tr>
{% if user.is_authenticated %}
        <td><input type="checkbox" name="selecteditems" value="{{ warningitem.id }}"></td>
{% endif %}
        <td><a href="{% url "warning_item" warningitem.id %}">{{ warningitem.summary }}</td>
        <td>
    {% if warningitem.status == "N" %}
    <span class="label label-warning">
    {% endif %}
    {% if warningitem.status == "A" %}
    <span class="label label-important">
    {% endif %}
    {% if warningitem.status == "I" %}
    <span class="label">
    {% endif %}
    {% if warningitem.status == "R" %}
    <span class="label label-info">
    {% endif %}
    {{ warningitem.get_status_display }}
    </span>
        </td>
    </tr>
    {% endfor %}
    </table>
    {% if is_paginated %}
        {% load pagination %}
        {% pagination page_obj %}
    {% endif %}
{% if user.is_authenticated and perms.warningmgr.change_warningitem %}
<div class="form-inline">
Action: <select name="action">
    <option value="" selected="selected">---------</option>
    <option value="actionreq">Action Required</option>
    <option value="resolve">Resolve</option>
    <option value="ignore">Ignore</option>
</select>
<button type="submit" class="btn" title="Run the selected action" name="index" value="0">Go</button>
</div>
</form>
{% endif %}
{% else %}
    {% if reviewed %}
    <p>No warnings have been reviewed.</p>
    {% else %}
    <p>No warnings are in the queue.</p>
    {% endif %}
{% endif %}

{% endautoescape %}

{% endblock %}