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

This enables the user to clear current search content and restore the orginial status. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
202 lines
5.8 KiB
HTML
202 lines
5.8 KiB
HTML
{% extends "rrs/base_toplevel.html" %}
|
|
{% load i18n %}
|
|
{% load staticfiles %}
|
|
|
|
{% load url from future %}
|
|
|
|
{% comment %}
|
|
|
|
rrs-web - maintainers page template
|
|
|
|
Copyright (C) 2015 Intel Corporation
|
|
Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
{% endcomment %}
|
|
|
|
{% block navs %}
|
|
{% endblock %}
|
|
|
|
{% block content_inner %}
|
|
<div class="navbar navbar-table-controls">
|
|
<div class="navbar-inner table-controls">
|
|
<ul class="nav">
|
|
<li class="dropdown">
|
|
<span class="badge" style="margin-top:11px;"></span>
|
|
</li>
|
|
</ul>
|
|
<form id="form-search" class="pull-right input-append">
|
|
<input type="text" class="input-xlarge" placeholder="Search maintainers" id="filter">
|
|
<a class="add-on btn" id="clear-search-btn">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
<button type="submit" value="Search" class="btn btn-info" id="btn-search">Search</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="no_maintainers_alert" class="alert" style="display:none">
|
|
No maintainers found <a href="#" id="view-all-maintainers" style="margin-left:10px;">View all maintainers</a>
|
|
</div>
|
|
<table class="table table-bordered table-hover" id="statistics-table">
|
|
<thead>
|
|
<tr>
|
|
<th class="sorted">Maintainer</th>
|
|
<th class="muted">Assigned recipes</th>
|
|
<th class="muted">Up-to-date</th>
|
|
<th class="muted">Not updated</th>
|
|
<th class="muted">Can't be updated</th>
|
|
<th class="muted">Unknown</th>
|
|
<th class="muted">% done</th>
|
|
|
|
{% for i in intervals %}
|
|
{% if current_interval == forloop.counter0 %}
|
|
<th class="current-wk">
|
|
{% else %}
|
|
<th class="muted">
|
|
{% endif %}
|
|
{{ i }}
|
|
</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for ml in maintainer_list %}
|
|
<tr>
|
|
<td>
|
|
{{ ml.name }}
|
|
</td>
|
|
<td>
|
|
<a href="{% url 'recipes' release_name milestone_name %}?maintainer_name={{ ml.name|urlencode }}">
|
|
{{ ml.recipes_all }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{% url 'recipes' release_name milestone_name %}?upstream_status={{ "Up-to-date"|urlencode }}&maintainer_name={{ ml.name|urlencode }}">
|
|
{{ ml.recipes_up_to_date }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{% url 'recipes' release_name milestone_name %}?upstream_status={{ "Not updated"|urlencode }}&maintainer_name={{ ml.name|urlencode }}">
|
|
{{ ml.recipes_not_updated }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{% url 'recipes' release_name milestone_name %}?upstream_status={{ "Can't be updated"|urlencode }}&maintainer_name={{ ml.name|urlencode }}">
|
|
{{ ml.recipes_cant_be_updated }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{% url 'recipes' release_name milestone_name %}?upstream_status={{ "Unknown"|urlencode }}&maintainer_name={{ ml.name|urlencode }}">
|
|
{{ ml.recipes_unknown }}
|
|
</a>
|
|
</td>
|
|
<td>{{ ml.percentage_done }}</td>
|
|
{% for number in ml.interval_statistics %}
|
|
{% if current_interval == forloop.counter0 %}
|
|
<td class="current-wk">
|
|
{% else %}
|
|
<td class="muted">
|
|
{% endif %}
|
|
{{ number }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<style>
|
|
th.header {
|
|
background-image: url({{ STATIC_URL }}/img/small.gif);
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
background-repeat: no-repeat;
|
|
background-position: center left;
|
|
padding-left: 20px;
|
|
border-right: 1px solid #dad9c7;
|
|
margin-left: -1px;
|
|
}
|
|
th.headerSortUp {
|
|
background-image: url({{ STATIC_URL }}/img/small_asc.gif);
|
|
}
|
|
th.headerSortDown {
|
|
background-image: url({{ STATIC_URL }}/img/small_desc.gif);
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{% static "js/uitablefilter.js" %}"></script>
|
|
<script src="{% static "js/jquery.tablesorter.js" %}"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
statisticsTable = $('#statistics-table');
|
|
|
|
function updateMaintainerCount() {
|
|
$('#statistics-table').show()
|
|
$('#no_maintainers_alert').hide()
|
|
|
|
count = 0
|
|
$('tr:visible').each(function() {
|
|
count++
|
|
});
|
|
|
|
if (count == 1) {
|
|
$('#statistics-table').hide()
|
|
$('#no_maintainers_alert').show()
|
|
}
|
|
|
|
if (count == 2) {
|
|
$('.badge').html("1 maintainer");
|
|
} else {
|
|
$('.badge').html((count - 1) + " maintainers")
|
|
}
|
|
}
|
|
|
|
$("#form-search").submit(function( event ) {
|
|
search_text = $("#filter").val()
|
|
$.uiTableFilter(statisticsTable, search_text);
|
|
updateMaintainerCount()
|
|
event.preventDefault();
|
|
});
|
|
|
|
function clearSearch() {
|
|
$.uiTableFilter(statisticsTable, '');
|
|
$("#filter").val('')
|
|
updateMaintainerCount()
|
|
}
|
|
|
|
$("#view-all-maintainers").click(function() {
|
|
clearSearch()
|
|
});
|
|
|
|
$("#clear-search-btn").click(function() {
|
|
clearSearch()
|
|
});
|
|
|
|
{% if maintainer_count > 0 %}
|
|
$(statisticsTable).tablesorter({
|
|
sortList: [[0,0]],
|
|
headers: {
|
|
1: { sorter: false },
|
|
2: { sorter: false },
|
|
3: { sorter: false },
|
|
4: { sorter: false },
|
|
5: { sorter: false },
|
|
6: { sorter: false },
|
|
7: { sorter: false },
|
|
8: { sorter: false },
|
|
9: { sorter: false },
|
|
10: { sorter: false },
|
|
11: { sorter: false },
|
|
12: { sorter: false },
|
|
13: { sorter: false },
|
|
14: { sorter: false },
|
|
}
|
|
});
|
|
{% endif %}
|
|
|
|
updateMaintainerCount()
|
|
});
|
|
</script>
|
|
{% endblock %}
|