github.com/munnerz/test-infra@v0.0.0-20190108210205-ce3d181dc989/gubernator/templates/pr_dashboard.html (about)

     1  % extends 'base.html'
     2  {% block title %}PR Dashboard{% endblock %}
     3  % block head
     4  <link rel="stylesheet" href="{{'octicons/octicons.css'|static}}" />
     5  <script src="{{'pr.js'|static}}"></script>
     6  {{ super() }}
     7  % endblock
     8  % block header
     9  	<h1>PR Dashboard</h1>
    10  % endblock
    11  % block content
    12  <form id="prdash-nav" onsubmit="document.location='/pr/' + document.getElementById('userBox').value; return false;">
    13  View
    14  {% if user %}<a href="/pr/all">All</a>{% else %}<b>All</b>{% endif %}
    15   | {% if user != login or not login %}<a href="/pr">Me</a>{% else %}<b>Me</b>{% endif %}
    16   | <input id="userBox" pattern='[-\w]+' name="user" type="textbox" placeholder="username" value="{{user or ''}}"}>
    17  <button>Switch User</button>
    18  </form>
    19  
    20  % if milestones
    21  <div id="milestone-nav">
    22  Filter Milestone: {% if milestone %}<a href="?">Any</a>{% else %}<b>Any</b>{% endif %}
    23  % for ms in milestones
    24  	% if ms == milestone
    25  		<b>{{ms}}</b>
    26  	% else
    27  		<a href="?milestone={{ms}}">{{ms}}</a>
    28  	% endif
    29  % endfor
    30  </div>
    31  % endif
    32  
    33  % for title, pred, search in cats
    34  	% set sub_prs = prs | select(pred)
    35  	% if title == 'Approvable' and not sub_prs
    36  		% continue
    37  	% endif
    38  	<h3 class="pr-section">
    39  	<a id="section-{{title|slugify}}"></a>
    40  	% if search
    41  	<a href="https://github.com/pulls?q={{search|quote_plus}}">{{title}}</a>
    42  	% else
    43  	{{title}}
    44  	% endif
    45  	({{sub_prs|length}})
    46  	% if title == 'Needs Attention' and acks
    47  		<button style='margin-left: 20px;' onclick='ack_clear()' alt='Reset "Needs Attention" ignores'>Clear Acks ({{acks|length}})</button>
    48  	% endif
    49  	</h3>
    50  	% if sub_prs
    51  	<table class="pr pr-dash">
    52  	<thead>
    53  		<tr><th>Repo<th>Number<th>Author<th>Status<th>&#9660; Updated<th>Assignees<th>Size<th>Title</tr>
    54  	</thead>
    55  		% for pr in sub_prs
    56  			% set pl = pr.payload
    57  			<tr id="{{title|slugify}} {{pr.repo}} {{pr.number}}" onclick="window.open('https://github.com/{{pr.repo}}/pull/{{pr.number}}', '_blank')">
    58  			<td>{{pr.repo|ltrim('kubernetes/')}}
    59  			<td>{{pr.number}}
    60  			<td>{{pl['author']}}
    61  			<td>{{pl|render_status(user)}}
    62  			<td>{{pr.updated_at|dt_to_epoch|timestamp('humantimestamp', '%b %e')}}
    63  			<td>{{pl['assignees']|join(", ")}}
    64  			<td>{{pl|classify_size}}
    65  			<td>{{pl['title']}}
    66  			% if title == "Needs Attention" and acks is not none
    67  				% set latest = pl|get_latest(user)
    68  				% if latest
    69  					<td><button onclick="ack(event, '{{pr.repo}}', {{pr.number}}, {{latest}});">ACK</button>
    70  				% endif
    71  			% endif
    72  		% endfor
    73  	</table>
    74  	% else
    75  		<p><h4 class="pr-section">No Results</h4>
    76  	% endif
    77  % endfor
    78  
    79  <div id="help">
    80    <p><b>Needs Attention</b> is a heuristic grouping based on a <a href="https://git.k8s.io/test-infra/gubernator/github/classifier.py#L397">simple state machine</a>. {% if user != login or not login %}<a href="/pr">Login</a> to use {% else %}Use {% endif %} the "ACK" button to remove a PR from "Needs Attention" until something new occurs.
    81  <p>Have a problem? <a href="https://github.com/kubernetes/test-infra/issues/new?title=PR%20Dashboard:&labels=area/gubernator&assignee=rmmh">File a bug!</a>
    82  </div>
    83  % endblock