2013-07-29 23:03:31 +02:00
|
|
|
{% extends "zerver/base.html" %}
|
2012-11-09 00:09:58 +01:00
|
|
|
|
2013-02-25 02:59:59 +01:00
|
|
|
{% load compressed %}
|
Reuse minified JS from previous deploys
This is a big change affecting lots of areas:
* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
update-prod-static, is used to copy minified JS from a previous
deploy (i.e., a previous git checkout), if the source files have
not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
than Pipeline's compressed_js
Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.
Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.
(Based on code review, this commit has been revised to:
* Warn if git returns an error in minify-js
* Add missing output redirects in update-prod-static
* Use DEPLOY_ROOT instead of manually constructing that directory
* Use old style formatting)
(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-03 22:42:25 +02:00
|
|
|
{% load minified_js %}
|
2013-02-25 02:59:59 +01:00
|
|
|
|
2012-11-09 00:09:58 +01:00
|
|
|
{# User Activity. #}
|
|
|
|
|
2012-12-05 19:24:00 +01:00
|
|
|
{% block customhead %}
|
|
|
|
{{ block.super }}
|
Reuse minified JS from previous deploys
This is a big change affecting lots of areas:
* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
update-prod-static, is used to copy minified JS from a previous
deploy (i.e., a previous git checkout), if the source files have
not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
than Pipeline's compressed_js
Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.
Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.
(Based on code review, this commit has been revised to:
* Warn if git returns an error in minify-js
* Add missing output redirects in update-prod-static
* Use DEPLOY_ROOT instead of manually constructing that directory
* Use old style formatting)
(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-03 22:42:25 +02:00
|
|
|
{% minified_js 'activity' %}
|
2013-02-25 02:59:59 +01:00
|
|
|
{% compressed_css 'activity' %}
|
2012-12-05 19:24:00 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2012-11-09 00:09:58 +01:00
|
|
|
{% block content %}
|
|
|
|
|
2013-09-25 23:47:54 +02:00
|
|
|
{% if realm %}
|
|
|
|
<a class="show-all" href="?">Home</a>
|
|
|
|
<h4>{{ realm}}</h4>
|
|
|
|
<br />
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2012-12-05 17:57:12 +01:00
|
|
|
<ul class="nav nav-tabs">
|
2013-09-25 18:10:56 +02:00
|
|
|
{% for name, activity in data %}
|
2013-09-26 00:15:12 +02:00
|
|
|
<li {% if forloop.first %} class="active" {% endif %}>
|
2012-12-05 17:57:12 +01:00
|
|
|
<a href="#{{ name }}" data-toggle="tab">{{ name }}</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
2012-11-09 00:09:58 +01:00
|
|
|
|
2013-09-25 18:10:56 +02:00
|
|
|
{% for name, activity in data %}
|
2012-12-05 17:57:12 +01:00
|
|
|
|
2013-09-26 00:15:12 +02:00
|
|
|
<div class="tab-pane {% if forloop.first %} active {% endif %}" id="{{ name }}">
|
2012-11-09 00:09:58 +01:00
|
|
|
<h2>{{ name }} usage</h2>
|
2012-11-09 21:16:14 +01:00
|
|
|
<table class="table sortable table-striped table-bordered">
|
2013-09-25 23:47:54 +02:00
|
|
|
|
2012-11-09 21:16:14 +01:00
|
|
|
<thead class="activity_head">
|
2012-11-09 00:09:58 +01:00
|
|
|
<tr>
|
2013-09-25 23:47:54 +02:00
|
|
|
|
|
|
|
{% if realm %}
|
2013-01-18 19:29:53 +01:00
|
|
|
<th>Name</th>
|
|
|
|
<th>Email</th>
|
2013-09-25 23:47:54 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if summary_mode %}
|
2012-12-13 00:04:00 +01:00
|
|
|
<th>Realm</th>
|
2013-09-25 23:47:54 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2012-11-09 21:16:14 +01:00
|
|
|
<th>Last send_message</th>
|
2013-02-13 16:50:35 +01:00
|
|
|
<th>Messages sent</th>
|
2012-12-04 22:14:44 +01:00
|
|
|
{% if activity.has_pointer %}
|
2012-11-09 21:16:14 +01:00
|
|
|
<th>Last update_pointer</th>
|
2012-12-05 16:24:52 +01:00
|
|
|
<th>Pointer updates</th>
|
2012-11-09 00:09:58 +01:00
|
|
|
{% endif %}
|
2013-02-13 16:50:35 +01:00
|
|
|
<th>Last get_updates</th>
|
2012-11-09 00:09:58 +01:00
|
|
|
</tr>
|
2012-11-09 21:16:14 +01:00
|
|
|
</thead>
|
2013-09-25 23:47:54 +02:00
|
|
|
|
2012-11-09 21:16:14 +01:00
|
|
|
<tbody>
|
2012-12-05 00:05:10 +01:00
|
|
|
{% for email, row in activity.sorted_rows %}
|
2013-09-24 23:11:56 +02:00
|
|
|
<tr class="{{ row.class }}" data-type="{{ row.type }}" data-realm="{{ row.realm }}">
|
2013-09-25 23:47:54 +02:00
|
|
|
|
|
|
|
{% if realm %}
|
2013-01-18 19:29:53 +01:00
|
|
|
<td><strong>{{ row.full_name }}</strong></td>
|
2013-02-11 16:33:16 +01:00
|
|
|
<td><strong>{{ row.email }}</strong></td>
|
2013-09-25 23:47:54 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if summary_mode %}
|
2013-09-24 23:11:56 +02:00
|
|
|
<td>
|
2013-09-25 23:47:54 +02:00
|
|
|
<a class="realm" href="?realm={{ row.realm }}">
|
2013-09-24 23:11:56 +02:00
|
|
|
<strong>{{ row.realm }}</strong>
|
|
|
|
<a>
|
|
|
|
</td>
|
2013-09-25 23:47:54 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2013-02-13 17:02:47 +01:00
|
|
|
<td sorttable_customkey="{{ row.send_message_last|date:'YmdHi' }}">{{ row.send_message_last|date:"M d, H:i" }}</td>
|
2013-02-13 16:50:35 +01:00
|
|
|
<td class="number">{{ row.send_message_count }}</td>
|
2012-12-04 22:14:44 +01:00
|
|
|
{% if activity.has_pointer %}
|
2013-02-13 17:02:47 +01:00
|
|
|
<td sorttable_customkey="{{ row.update_pointer_last|date:'YmdHi' }}">{{ row.update_pointer_last|date:"M d, H:i" }}</td>
|
2012-12-05 16:41:10 +01:00
|
|
|
<td class="number">{{ row.update_pointer_count }}</td>
|
2012-11-09 00:09:58 +01:00
|
|
|
{% endif %}
|
2013-02-13 17:02:47 +01:00
|
|
|
<td sorttable_customkey="{{ row.get_updates_last|date:'YmdHi' }}">{{ row.get_updates_last|date:"M d, H:i" }}</td>
|
2012-11-09 00:09:58 +01:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2012-11-09 21:16:14 +01:00
|
|
|
</tbody>
|
2012-11-09 00:09:58 +01:00
|
|
|
</table>
|
2012-12-05 17:57:12 +01:00
|
|
|
</div>
|
2012-11-09 00:09:58 +01:00
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
2012-12-05 17:57:12 +01:00
|
|
|
</div>
|
|
|
|
|
2012-11-09 00:09:58 +01:00
|
|
|
{% endblock %}
|