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