1 {% extends 'qcg/base.html' %}
6 <link href="{% static 'qcg/treegrid/css/jquery.treegrid.css' %}" rel="stylesheet">
13 .treegrid-expander:hover {
20 <script src="{% static 'qcg/treegrid/js/jquery.treegrid.js' %}"></script>
25 initialState: 'collapsed',
26 expanderExpandedClass: 'glyphicon glyphicon-chevron-down small',
27 expanderCollapsedClass: 'glyphicon glyphicon-chevron-right small',
28 onChange: function() {
29 $(this).find('.glyphicon-folder-open,.glyphicon-folder-close')
30 .toggleClass('glyphicon-folder-open').toggleClass('glyphicon-folder-close');
40 <h1 class="page-header">
41 {% block title %}Lista zadań{% endblock %}
44 <form class="row form-inline">
45 <div class="col-md-9 col-md-offset-1">
46 <div class="form-group">
47 <label class="sr-only" for="search">Szukaj w opisie lub uwagach</label>
48 <input type="text" class="form-control" id="search" placeholder="Szukaj w opisie lub uwagach">
50 <div class="form-group">
51 <label class="sr-only" for="status">Status</label>
52 <select class="form-control" id="status">
53 <option>Wybierz stan</option>
54 <option>PENDING</option>
55 <option>RUNNING</option>
56 <option>FAILED</option>
57 <option>FINISHED</option>
60 <div class="form-group">
61 <label class="sr-only" for="cluster">Klaster</label>
62 <select class="form-control" id="cluster">
63 <option>Wybierz klaster</option>
64 <option>Inula</option>
65 <option>Galera</option>
66 <option>Hydra</option>
71 <div class="col-md-1">
72 <button type="submit" class="btn btn-default">Filtruj</button>
79 <nav class="text-center" style="margin-bottom: 15px">
80 <form action="{{ request.path }}" method="get" class="form-inline" role="form" style="display: inline-block">
81 <div class="input-group input-group-sm">
82 <span class="input-group-btn">
83 {% if page.has_previous %}
84 <a href="{{ request.path }}?page={{ page.previous_page_number }}" class="btn btn-default">
86 <a href="#" class="btn btn-default disabled">
88 <span class="glyphicon glyphicon-chevron-left"></span>
91 <label class="sr-only" for="page">Strona</label>
92 <input type="text" class="form-control text-center" id="page" name="page" value="{{ page.number }}" style="width: 50px">
93 <span class="input-group-btn">
94 {% if page.has_next %}
95 <a href="{{ request.path }}?page={{ page.next_page_number }}" class="btn btn-default">
97 <a href="#" class="btn btn-default disabled">
99 <span class="glyphicon glyphicon-chevron-right"></span>
105 <a href="{{ request.path }}?page={{ num_pages }}">{{ num_pages }}</a>
108 <table class="table table-hover tree">
111 <th style="width: 80px"></th>
122 {% regroup page by job as jobs %}
124 {% for job in jobs %}
125 {% ifequal job.list|length 1 %}
126 {% with job.list.0 as task %}
127 <tr class="treegrid-{{ forloop.counter }}">
129 <a href="{% url 'job' %}">
130 <span class="glyphicon glyphicon-file" aria-hidden="true"></span>
134 <td>{{ task.note }}</td>
135 <td>{{ task.submission_time }}</td>
136 <td>{{ task.start_time }}</td>
137 <td>{{ task.finish_time }}</td>
138 <td>{{ task.get_status_display }}</td>
139 <td>{{ task.hosts|join:', ' }}</td>
143 <tr class="treegrid-{{ forloop.counter }}">
145 <a href="{% url 'job' %}">
146 <span class="glyphicon glyphicon-folder-close" aria-hidden="true"></span>
147 {# {{ job.grouper }}#}
150 <td>{{ job.grouper.note }}</td>
151 <td>{{ job.grouper.submission_time }}</td>
153 <td>{{ job.grouper.finish_time }}</td>
154 <td>{{ job.grouper.get_status_display }}</td>
158 {% for task in job.list %}
159 <tr class="treegrid-{{ forloop.parentloop.counter }}-{{ forloop.counter }} treegrid-parent-{{ forloop.parentloop.counter }}">
161 <a href="{% url 'job' %}">
162 <span class="glyphicon glyphicon-file" aria-hidden="true"></span>
166 <td>{{ task.note }}</td>
167 <td>{{ task.submission_time }}</td>
168 <td>{{ task.start_time }}</td>
169 <td>{{ task.finish_time }}</td>
170 <td>{{ task.get_status_display }}</td>
171 <td>{{ task.hosts|join:', ' }}</td>
179 <nav class="text-center">
180 <ul class="pagination">
181 {% if page.has_previous %}
183 <a href="{{ request.path }}?page={{ page.previous_page_number }}" aria-label="Previous">
184 <span aria-hidden="true"><span class="glyphicon glyphicon-chevron-left"></span> poprzednia</span>
189 <li{% ifequal page.number 1 %} class="active"{% endifequal %}>
190 <a href="{{ request.path }}?page=1">1</a>
193 {% if pages_range.0 > 2 %}
194 <li class="disabled"><span aria-hidden="true"><strong>…</strong></span></li>
197 {% for num in pages_range %}
198 <li{% ifequal page.number num %} class="active"{% endifequal %}>
199 <a href="{{ request.path }}?page={{ num }}">{{ num }}</a>
203 <li class="disabled"><span aria-hidden="true"><strong>z</strong></span></li>
204 <li><a href="{{ request.path }}?page={{ num_pages }}">{{ num_pages }}</a></li>
206 {% if page.has_next %}
208 <a href="{{ request.path }}?page={{ page.next_page_number }}" aria-label="Next">
209 <span aria-hidden="true">następna <span class="glyphicon glyphicon-chevron-right"></span></span>
216 {% endblock container %}