Compare commits

...

6 Commits
9.x ... 1.5.1

Author SHA1 Message Date
Tim Abbott
bd01b1e2e4 Release Zulip Server 1.5.1. 2017-02-07 11:24:57 -08:00
Tim Abbott
58a7f6085f stats: Include Zulip and realm name in heading. 2017-02-07 11:24:22 -08:00
Tim Abbott
3367593b52 analytics: Make page-content full height. 2017-02-07 11:24:22 -08:00
Rishi Gupta
1a92ec5d86 analytics: Update bar colors on message_sent_over_time. 2017-02-07 11:24:22 -08:00
Rishi Gupta
7a8d685a71 analytics: Remove portico header and footer from stats.html. 2017-02-07 11:24:22 -08:00
Tim Abbott
3c3a8747c3 upgrade: Stop trying to copy node_modules out of tarballs.
Now that we no longer use node_modules at all in production (it's only
used to generate static assets), we don't include `node_modules` in
the production tarballs, and thus we shouldn't attempt to copy
`node_modules` out of the production tarballs when installing.

Fixes a regression introduced in
d71f2e7b9b.
2017-02-07 10:36:38 -08:00
7 changed files with 33 additions and 27 deletions

View File

@@ -39,7 +39,8 @@ from typing import Any, Dict, List, Tuple, Optional, Sequence, Callable, Type, \
@zulip_login_required
def stats(request):
# type: (HttpRequest) -> HttpResponse
return render_to_response('analytics/stats.html')
return render_to_response('analytics/stats.html',
context=dict(realm_name = request.user.realm.name))
@has_request_variables
def get_chart_data(request, user_profile, chart_name=REQ(),

View File

@@ -4,6 +4,11 @@ All notable changes to the Zulip server are documented in this file.
### Unreleased
### 1.5.1 -- 2017-02-07
- Fix exception trying to copy node_modules during upgrade process.
- Improved styling of /stats page to remove useless login/register links.
### 1.5.0 -- 2017-02-06
Highlights:

View File

@@ -79,8 +79,6 @@ else:
logging.info("Installing static assets...")
subprocess.check_call(["cp", "-rT", os.path.join(deploy_path, 'prod-static/serve'),
'/home/zulip/prod-static'], preexec_fn=su_to_zulip)
# Sets up npm cache
setup_node_modules(npm_args=['--production'], copy_modules=True)
# Our next optimization is to check whether any migrations are needed
# before we start the critical section of the restart. This saves

View File

@@ -161,10 +161,10 @@ function hover(id) {
$('#hover_bots_value').hide();
}
// var human_colors = data.points[0].data.x.map(function () {
// return '#1f77b4';
// return '#5f6ea0';
// });
// var bot_colors = data.points[0].data.x.map(function () {
// return '#ff7f00';
// return '#b7b867';
// });
// human_colors[data.points[0].pointNumber] = '#185a88';
// bot_colors[data.points[0].pointNumber] = '#cc6600';
@@ -173,12 +173,12 @@ function hover(id) {
// Plotly.restyle(id, update_human, 0);
// Plotly.restyle(id, update_bot, 1);
// var legendBoxes = document.getElementById(id).getElementsByClassName("legendbar");
// Plotly.d3.select(legendBoxes[0]).style("fill", "#1f77b4");
// Plotly.d3.select(legendBoxes[1]).style("fill", "#ff7f00");
// Plotly.d3.select(legendBoxes[0]).style("fill", "#5f6ea0");
// Plotly.d3.select(legendBoxes[1]).style("fill", "#b7b867");
});
// myPlot.on('plotly_unhover', function () {
// var update_human = {marker:{color: '#1f77b4'}};
// var update_bot = {marker:{color: '#ff7f00'}};
// var update_human = {marker:{color: '#5f6ea0'}};
// var update_bot = {marker:{color: '#b7b867'}};
// Plotly.restyle(id, update_human, 0);
// Plotly.restyle(id, update_bot, 1);
// });
@@ -186,8 +186,8 @@ function hover(id) {
function fix_legend_colors() {
var legendBoxes = document.getElementById('id_messages_sent_over_time').getElementsByClassName("legendbar");
Plotly.d3.select(legendBoxes[0]).style("fill", "#1f77b4");
Plotly.d3.select(legendBoxes[1]).style("fill", "#ff7f00");
Plotly.d3.select(legendBoxes[0]).style("fill", "#5f6ea0");
Plotly.d3.select(legendBoxes[1]).style("fill", "#b7b867");
}
function populate_messages_sent_over_time(data) {
@@ -242,13 +242,13 @@ function populate_messages_sent_over_time(data) {
var date_formatter = function (date) {
return format_date(date, true);
};
var hourly_traces = messages_sent_over_time_traces(start_dates, data.realm, 'bar', date_formatter, '#1f77b4', '#ff7f00');
var hourly_traces = messages_sent_over_time_traces(start_dates, data.realm, 'bar', date_formatter, '#5f6ea0', '#b7b867');
var info = aggregate_data('day');
date_formatter = function (date) {
return format_date(date, false);
};
var daily_traces = messages_sent_over_time_traces(info.dates, info.values, 'bar', date_formatter, '#1f77b4', '#ff7f00');
var daily_traces = messages_sent_over_time_traces(info.dates, info.values, 'bar', date_formatter, '#5f6ea0', '#b7b867');
info = aggregate_data('week');
date_formatter = function (date) {
@@ -256,14 +256,14 @@ function populate_messages_sent_over_time(data) {
return "Week of " + format_date(date, false);
};
var human_colors = info.dates.map(function () {
return '#1f77b4';
return '#5f6ea0';
});
var bot_colors = info.dates.map(function () {
return '#ff7f00';
return '#b7b867';
});
human_colors[info.dates.length-1] = '#66b0e5';
bot_colors[info.dates.length-1] = '#ffa64d';
human_colors[info.dates.length-1] = '#afb7d0';
bot_colors[info.dates.length-1] = '#dbdcb3';
var weekly_traces = messages_sent_over_time_traces(info.dates, info.values, 'bar', date_formatter, human_colors, bot_colors);
var dates = data.end_times.map(function (timestamp) {
@@ -273,7 +273,7 @@ function populate_messages_sent_over_time(data) {
date_formatter = function (date) {
return format_date(date, true);
};
var cumulative_traces = messages_sent_over_time_traces(dates, values, 'scatter', date_formatter, '#1f77b4', '#ff7f00');
var cumulative_traces = messages_sent_over_time_traces(dates, values, 'scatter', date_formatter, '#5f6ea0', '#b7b867');
// Generate plot
var layout = messages_sent_over_time_layout();

View File

@@ -55,7 +55,6 @@ svg {
.page-content {
width: calc(100% - 300px - 8px);
height: calc(100vh - 94px);
overflow: auto;
display: inline-block;
vertical-align: top;

View File

@@ -1,11 +1,15 @@
{% extends "zerver/portico.html" %}
{% block portico_content %}
{% extends "zerver/base.html" %}
{% block customhead %}
{% stylesheet 'portico' %}
{% endblock %}
{% block content %}
<div class="app portico-page">
{{ minified_js('stats')|safe }}
{% stylesheet 'stats' %}
<html>
<body>
<div class="sidebar">
<nav class="nav">
<p class="nav-subtitle">Messages Sent</p>
@@ -18,7 +22,7 @@
</div>
<div class="page-content">
<div id="id_stats_errors" class="alert alert-error"></div>
<h1 class="analytics-page-header">Analytics</h1>
<h1 class="analytics-page-header">Zulip Analytics for {{ realm_name }}</h1>
<div class="center-container">
<div class="center-block">
<p class="graph-title" id="messages_timescale_anchor">Messages Sent Over Time</p>
@@ -79,7 +83,6 @@
</div>
</div>
</div>
</body>
</html>
</div>
{% endblock %}

View File

@@ -1,2 +1,2 @@
ZULIP_VERSION = "1.5.0"
ZULIP_VERSION = "1.5.1"
PROVISION_VERSION = '4.4'