diff --git a/management/daemon.py b/management/daemon.py index b53c3c40..7e0d4936 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -521,7 +521,7 @@ def privacy_status_set(): return "OK" # Mailgraph - +import base64 @app.route('/mailgraph/image.cgi', methods=['GET']) @authorized_personnel_only def mailgraph(): @@ -540,11 +540,8 @@ def mailgraph(): return ('Error generating mailgraph image: %s' % request.query_string, 500) headers, image_bytes = bin_out.split(b'\n\n', 1) - response = make_response(image_bytes) - for line in headers.splitlines(): - name, value = line.decode("utf8").split(':', 1) - response.headers[name] = value - return response + + return base64.b64encode(image_bytes) return ('Mailgraph: no image requested', 500) diff --git a/management/templates/mailgraph.html b/management/templates/mailgraph.html index 086aa9cc..25428509 100644 --- a/management/templates/mailgraph.html +++ b/management/templates/mailgraph.html @@ -7,24 +7,24 @@

Last Day

-

mailgraph

-

mailgraph

-

mailgraph

+

mailgraph

+

mailgraph

+

mailgraph

Last Week

-

mailgraph

-

mailgraph

-

mailgraph

+

mailgraph

+

mailgraph

+

mailgraph

Last Month

-

mailgraph

-

mailgraph

-

mailgraph

+

mailgraph

+

mailgraph

+

mailgraph

Last Year

-

mailgraph

-

mailgraph

-

mailgraph

+

mailgraph

+

mailgraph

+

mailgraph


@@ -34,7 +34,14 @@