]> git.ipfire.org Git - oddments/collecty.git/blame - src/collecty/constants.py
graphs: Increase default width to 960px
[oddments/collecty.git] / src / collecty / constants.py
CommitLineData
f37913e8 1#!/usr/bin/python3
bf012438
MT
2###############################################################################
3# #
4# collecty - A system statistics collection daemon for IPFire #
5# Copyright (C) 2012 IPFire development team #
6# #
7# This program is free software: you can redistribute it and/or modify #
8# it under the terms of the GNU General Public License as published by #
9# the Free Software Foundation, either version 3 of the License, or #
10# (at your option) any later version. #
11# #
12# This program is distributed in the hope that it will be useful, #
13# but WITHOUT ANY WARRANTY; without even the implied warranty of #
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15# GNU General Public License for more details. #
16# #
17# You should have received a copy of the GNU General Public License #
18# along with this program. If not, see <http://www.gnu.org/licenses/>. #
19# #
20###############################################################################
21
f37913e8 22from .i18n import _
73db5226 23
73241420
MT
24from .__version__ import *
25
bf012438 26DATABASE_DIR = "/var/lib/collecty"
73db5226 27
5913a52c 28DEFAULT_IMAGE_FORMAT = "SVG"
cb1ccb4f
MT
29DEFAULT_LOCALE = "en_GB.utf8"
30DEFAULT_TIMEZONE = "UTC"
73db5226 31
34318d08
MT
32SUPPORTED_IMAGE_FORMATS = ("SVG", "PNG", "PDF")
33
5913a52c 34GRAPH_DEFAULT_ARGUMENTS = (
f22adf17 35 # Change the background colour
dd2b8d53 36 "--color", "BACK#FFFFFFFF",
f22adf17 37
73db5226
MT
38 # Disable the border around the image.
39 "--border", "0",
40
41 # Let's width and height define the size of
42 # the entire image.
43 "--full-size-mode",
44
45 # Gives the curves a more organic look.
46 "--slope-mode",
47
48 # Show nicer labels.
49 "--dynamic-labels",
50
51 # Brand all generated graphs.
52 "--watermark", _("Created by collecty"),
c968f6d9 53)
73db5226 54
4d9ed86e
MT
55INTERVALS = {
56 None : "-3h",
57 "hour" : "-1h",
58 "day" : "-25h",
59 "month": "-30d",
60 "week" : "-360h",
61 "year" : "-365d",
62}
63
07218077 64GRAPH_DEFAULT_WIDTH = 960
73db5226 65GRAPH_DEFAULT_HEIGHT = 480
edf268c7 66
89c9cbc1 67# Default column widths
03619914
MT
68LABEL = "%-30s"
69EMPTY_LABEL = "%32s" % ""
97cb4bea
MT
70
71COLUMN = "%16s"
72PERCENTAGE = "%13.2lf%%"
73INTEGER = "%16.0lf"
74LARGE_INTEGER = "%14.0lf %s"
75FLOAT = "%14.2lf"
76LARGE_FLOAT = "%12.2lf %s"
8988e876
MT
77BPS = "%9.2lf %sbps"
78PPS = "%9.2lf %spps"
eb06d20a 79MS = "%11.2lf ms"
89c9cbc1 80
8988e876
MT
81EMPTY_LINE = "COMMENT: \\n"
82HEADLINE = "COMMENT:---- %s ----\\c"
89c9cbc1 83
edf268c7
MT
84THUMBNAIL_DEFAULT_WIDTH = 80
85THUMBNAIL_DEFAULT_HEIGHT = 20