tartiflette/www/template_pullrequests.html

202 lines
7.5 KiB
HTML
Raw Normal View History

2017-03-08 14:24:58 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
2017-03-13 01:46:23 +01:00
<title>Yunohost Pull Requests Dashboard</title>
2017-03-08 14:24:58 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="css/bootstrap.css" media="screen">
<link rel="stylesheet" href="skins/eden.css" media="screen">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<style>
.navbar-holder-dark{
padding: 20px 20px 200px 20px;
background: #333333;
}
.container {
width:1250px;
2017-03-08 15:35:17 +01:00
}
2017-03-13 01:46:23 +01:00
.column-pr-id {
width:230px;
2017-03-13 01:46:23 +01:00
text-align:center;
}
.column-pr-title {
2017-03-08 15:35:17 +01:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 400px;
2017-03-08 14:24:58 +01:00
}
2017-03-13 01:46:23 +01:00
.column-pr-created {
width:170px;
}
.column-pr-labels {
}
2017-03-08 14:24:58 +01:00
</style>
</head>
<body>
<div class="container">
<div class="page-header" id="banner">
<div class="row">
<h1>Yunohost Pull Requests Dashboard</h1>
</div>
</div>
2017-03-09 01:57:10 +01:00
2017-03-08 14:24:58 +01:00
<h3>What should you review ?</h3>
<div class="row">
<div class="col-md-offset-3 col-md-6">
<div class="bs-component">
2017-03-08 18:26:40 +01:00
<ul id="select-team" class="nav nav-pills">
2017-03-09 01:57:10 +01:00
<li id="select-team-all" class="active">
<a href="javascript:void(0)" onclick="filter('')">All <span class="badge">{{ data.teams.all }}</span></a>
2017-03-08 17:31:22 +01:00
</li>
2017-03-09 01:57:10 +01:00
<li id="select-team-core"><a href="javascript:void(0)" onclick="filter('team-core')">Core <span class="badge">{{ data.teams.core }}</span></a></li>
<li id="select-team-apps"><a href="javascript:void(0)" onclick="filter('team-apps')">Apps <span class="badge">{{ data.teams.apps }}</span></a/li>
<li id="select-team-infra"><a href="javascript:void(0)" onclick="filter('team-infra')">Infra / dist<span class="badge">{{ data.teams.infra }}</span></a></li>
<li id="select-team-doc" ><a href="javascript:void(0)" onclick="filter('team-doc')">Doc<span class="badge">{{ data.teams.doc }}</span></a></li>
2017-03-08 14:24:58 +01:00
</ul>
</div>
</div>
2017-03-08 18:26:40 +01:00
</div>
<div class="row">
2017-03-08 14:24:58 +01:00
<div class="col-md-12">
2017-03-08 18:26:40 +01:00
<table id="thePRlist" class="table table-striped table-responsive">
2017-03-08 14:24:58 +01:00
<thead>
<tr>
<th></th>
<th>Title</th>
<th>Created</th>
<th>Labels</th>
</tr>
</thead>
<tbody>
2017-03-08 17:31:22 +01:00
{% for pr in data.prs %}
2017-03-12 05:02:58 +01:00
<tr class="{% for team in pr.teams %}team-{{ team }} {% endfor %}">
2017-03-13 01:46:23 +01:00
<td class="column-pr-id">
<a class="btn
{% if pr.priority >= 90 %}btn-warning{% else %}
{% if pr.priority >= 40 %}btn-primary{% else %}
{% if pr.priority >= -10 %}btn-info{% else %}
{% if pr.priority >= -60 %}btn-default{% else %}
2017-03-08 14:24:58 +01:00
btn-link{% endif %}
{% endif %}
{% endif %}
{% endif %}"
2017-03-13 01:46:23 +01:00
href="{{ pr.url }}">{{ pr.id }}</a>
</td>
<td class="column-pr-title"><strong>{{ pr.title }}</strong></td>
<td class="column-pr-created">{{ pr.createdDaysAgo }} days ago</td>
<td class="column-pr-labels">
2017-03-08 14:24:58 +01:00
{% for label in pr.labels %}
<span class="label
2017-03-13 01:46:23 +01:00
{% if label == "important" %}label-danger{%else%}
{% if label == "opinion needed" %}label-warning{%else%}
{% if label == "small decision" %}label-info{%else%}
{% if label == "medium decision" %}label-info{%else%}
{% if label == "big decision" %}label-info{%else%}
{% if label == "work needed" %}label-primary{%else%}
{% if label == "inactive" %}label-default{%else%}
{% if label == "postponed" %}label-default{%else%}
{% if label == "dying" %}label-danger{%else%}
label-primary
{%endif%}{%endif%}{%endif%}{%endif%}{%endif%}{%endif%}{%endif%}{%endif%}{%endif%}
2017-03-08 14:24:58 +01:00
">{{ label }}</span>
&nbsp;
{% endfor %}
</td>
{% endfor %}
</tbody>
</table>
</div>
</div>
2017-03-09 01:57:10 +01:00
<h3>WTF is this shit? How is priority defined?</h3>
<div class="row">
<div class="col-md-12">
<strong>With labels</strong>
<ul>
<li>"important" = top priority</li>
<li>"opinion-needed" = medium priority</li>
<li>"inactive/postponed" = very low priority</li>
</ul>
<p>PR with 'work needed' have a small malus in priority</p>
<p>PR with 'dying' status have a small bonus in priority</p>
2017-03-09 01:57:10 +01:00
<strong>Then with creation time</strong>
<p>older PRs have higher priority than newer PR</p>
<strong>'Dying' status</strong>
<p>A PR is considered "dying" if it has been created more than 60
days ago and not updated since 30 days. This is meant to be an incentive to
either revive it or flag it as inactive/postponed... </p>
2017-03-09 01:57:10 +01:00
</div>
</div>
2017-03-08 14:24:58 +01:00
<footer>
<div class="row">
<div class="col-lg-12">
<hr/>
<p>CSS Skin/boilerplate/whatever you call it : <a href="http://scripteden.com/download/eden-ui-bootstrap-3-skin/" rel="nofollow">Eden UI</a>. Generated with <a href="https://github.com/YunoHost/tartiflette">Tartiflette</a>!</p>
2017-03-08 14:24:58 +01:00
</div>
</div>
</footer>
</div>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
2017-03-08 18:26:40 +01:00
<script>
function filter(team) {
// Declare variables
var input, filter, table, tr, td, i;
table = document.getElementById("thePRlist");
tr = table.getElementsByTagName("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 0; i < tr.length; i++)
{
if (team == '') { tr[i].style.display = ""; }
else if (tr[i].classList == "") { tr[i].style.display = ""; }
else if (tr[i].classList.contains(team)) { tr[i].style.display = ""; }
else { tr[i].style.display = "none"; }
}
selector = document.getElementById("select-team");
li = selector.getElementsByTagName("li");
2017-03-09 01:57:10 +01:00
if (team == "") { team = "team-all"; }
2017-03-08 18:26:40 +01:00
for (i = 0; i < li.length; i++)
{
if (li[i].getAttribute("id") == "select-".concat(team))
{
li[i].classList.add("active");
}
2017-03-09 01:57:10 +01:00
else
{
li[i].classList.remove("active");
}
2017-03-08 18:26:40 +01:00
}
}
</script>
2017-03-08 14:24:58 +01:00
</body>
</html>