diff options
author | Guilherme Salgado <guilherme.salgado@linaro.org> | 2011-07-19 08:56:25 -0300 |
---|---|---|
committer | Guilherme Salgado <guilherme.salgado@linaro.org> | 2011-07-19 08:56:25 -0300 |
commit | c8ff6892e767777ae931054ccddabfd1076b0454 (patch) | |
tree | 9109b27d759ec6bd3a0c99f9cd99cd40d1dfaef1 /templates | |
parent | 3cbaa5fac9324b08a567894e6ecfd82d62da1e94 (diff) |
Track AOSP patches and pull frontpage highlights from the blog
- We now have a script to pull changes submitted by any of our users from
review.source.android.com and include them in our statistics
- There's also a script which pulls blog posts from a certain category of the
Linaro blog and use the latest one on the frontpage.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/patchmetrics/frontpage.html | 43 | ||||
-rw-r--r-- | templates/patchmetrics/monthly-highlights.html | 17 | ||||
-rw-r--r-- | templates/patchwork/patch.html | 40 |
3 files changed, 72 insertions, 28 deletions
diff --git a/templates/patchmetrics/frontpage.html b/templates/patchmetrics/frontpage.html index 6375229..1b736de 100644 --- a/templates/patchmetrics/frontpage.html +++ b/templates/patchmetrics/frontpage.html @@ -61,26 +61,29 @@ of January 2011 and that this website went live in June 2011. Check the <a href="{% url patchmetrics.views.faq %}">FAQ</a> for answers to common questions.</p> -<div class="yui3-g"> - <div class="yui3-u-5-12" style="line-height: 2"> - <h2>Stats per project</h2> - {% for p in projects %} - <a href="{% url patchmetrics.views.project project_id=p.linkname %}" - >{{p.name}}</a> - {% if not forloop.last %} | {% endif %} - {% endfor %} - </div> - - <div class="yui3-u-1-12"></div> - - <div class="yui3-u-5-12" style="line-height: 2"> - <h2>Stats per team</h2> - {% for team in teams %} - <a href="{% url patchmetrics.views.team team_id=team.name %}" - >{{team.display_name}}</a> - {% if not forloop.last %} | {% endif %} - {% endfor %} - </div> +{% if monthly_highlight_post %} + <h2>Highlight of the month: {{ monthly_highlight_title }}</h2> + <p>{{ monthly_highlight_post|safe }}</p> + <p class="lesser" style="text-align: right"> + <a href="{% url patchmetrics.views.monthly_highlights %}" + >See previous highlights ...</a></p> +{% endif %} + +<div style="line-height: 2"> + <h2>Stats per project</h2> + {% for p in projects %} + <a href="{% url patchmetrics.views.project project_id=p.linkname %}" + >{{p.name}}</a> + {% if not forloop.last %} | {% endif %} + {% endfor %} +</div> +<div style="line-height: 2"> + <h2>Stats per team</h2> + {% for team in teams %} + <a href="{% url patchmetrics.views.team team_id=team.name %}" + >{{team.display_name}}</a> + {% if not forloop.last %} | {% endif %} + {% endfor %} </div> <h2>Latest patches submitted</h2> diff --git a/templates/patchmetrics/monthly-highlights.html b/templates/patchmetrics/monthly-highlights.html new file mode 100644 index 0000000..df5bdfa --- /dev/null +++ b/templates/patchmetrics/monthly-highlights.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %}Linaro patch metrics: Monthly highlights{% endblock %} +{% block heading %}Patch metrics{% endblock %} + +{% block body %} + +<h1>Monthly highlights</h1> + +{% for entry in entries %} + <h2 style="margin-bottom: 0"><a href="{{ entry.link }}">{{ entry.title }}</a></h2> + <span class="lesser">Posted on + {{ entry.updated_datetime|date:"DATE_FORMAT" }}</span> + <p>{{ entry.post|safe }}</p> +{% endfor %} + +{% endblock %} diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html index bba1dc5..68230ba 100644 --- a/templates/patchwork/patch.html +++ b/templates/patchwork/patch.html @@ -38,22 +38,34 @@ function toggle_headers(link_id, headers_id) <td>{{ patch.name }}</td></tr> </tr> <tr> - <th>Project</th> - <td><a href="{% url patchmetrics.views.project project_id=patch.project.linkname %}" - >{{project.name}}</a></td> - </tr> - <tr> <th>Date</th> <td>{{ patch.date }}</td> </tr> <tr> - <th>List thread</th> - <td><a href="http://mid.gmane.org/{{patch.msgid}}">{{patch.msgid}}</a></td> + {% if not patch.gerrit_change %} + <th>List thread</th> + <td><a href="http://mid.gmane.org/{{patch.msgid}}">{{patch.msgid}}</a></td> + {% else %} + <th>Gerrit change</th> + <td><a href="{{ patch.gerrit_change.url }}" + >{{patch.gerrit_change.gerrit_id }}</a></td> + {% endif %} + </tr> + <tr> + <th>Project</th> + <td><a href="{% url patchmetrics.views.project project_id=patch.project.linkname %}" + >{{project.name}}</a></td> </tr> <tr> <th>State</td> <td>{{ patch.state.name }}{% if patch.archived %}, archived{% endif %}</td> </tr> +{% if patch.date_last_state_change %} + <tr> + <th>Last updated</td> + <td>{{ patch.date_last_state_change }}</td> + </tr> +{% endif %} {% if patch.commit_ref %} <tr> <th>Commit</td> @@ -85,7 +97,7 @@ function toggle_headers(link_id, headers_id) <div class="patchforms"> -{% if patchform %} +{% if patchform and not patch.gerrit_change %} <div class="patchform patchform-properties"> <h3>Patch Properties</h3> <form method="post"> @@ -171,12 +183,23 @@ function toggle_headers(link_id, headers_id) </div> </div> +{% if patch.gerrit_change %} +<h2>Gerrit change</h2> +<p>This represents an AOSP change submitted via +<a href="https://review.source.android.com">Gerrit</a>; it is mirrored here +so that it is included in our statistics. You can see the actual patch and +discussions around it on Gerrit's +<a href="{{ patch.gerrit_change.url }}">change +#{{ patch.gerrit_change.gerrit_id }}</a>.</p> +{% endif %} + {% if patch.pull_url %} <h2>Pull-request</h2> <a class="patch-pull-url" href="{{patch.pull_url}}" >{{ patch.pull_url }}</a> {% endif %} +{% if patch.comments %} <h2>Comments</h2> {% for comment in patch.comments %} <div class="comment"> @@ -186,6 +209,7 @@ function toggle_headers(link_id, headers_id) </pre> </div> {% endfor %} +{% endif %} {% if patch.content %} <h2>Patch</h2> |