Mercurial > roundup-cc
comparison roundup_content_data/__init__.py @ 1:2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
new structure, cronjob-friendly
dynamic generation of search-strings, dynamic recognition of error-values,
ignores non-numeric priority-IDs
author | sean |
---|---|
date | Tue, 14 Apr 2015 13:32:12 +0200 |
parents | 3f139db894f1 |
children | 99e2e0e17103 |
comparison
equal
deleted
inserted
replaced
0:3f139db894f1 | 1:2df45f6ecd81 |
---|---|
14 See http://www.gnu.org/licenses/gpl-3.0.txt for details | 14 See http://www.gnu.org/licenses/gpl-3.0.txt for details |
15 """ | 15 """ |
16 | 16 |
17 import os | 17 import os |
18 | 18 |
19 #rather use a real database for productiv use. | 19 #Add desired sqlite databases here |
20 #this database NEEDS to chmod "777" or "666", wich is a major security issue | 20 DATABASE_REFERENCCE = os.path.dirname(os.path.realpath(__file__)) + "/test_reference.db" |
21 DATABASE_FILE = os.path.dirname(os.path.realpath(__file__)) + "/test.db" | 21 DATABASE_DEMO = os.path.dirname(os.path.realpath(__file__)) + "/demo.db" |
22 DATABASE_ERRORDB = os.path.dirname(os.path.realpath(__file__)) + "/errordatabase.db" | |
23 DATABASE_TECH_INTERN = os.path.dirname(os.path.realpath(__file__)) + "/tech_intern.db" | |
24 DATABASE_INT_TEST = os.path.dirname(os.path.realpath(__file__)) + "/int_test.db" | |
22 | 25 |
23 COLUMNS = [ | 26 COLUMNS= [ |
24 "critical", "urgent", "bug", "feature", "wish", | 27 "critical", "urgent", "bug", "feature", "wish", |
25 ] | 28 ] |
26 | |
27 | |
28 # types of errors | |
29 CRITICAL = 1 | |
30 URGENT = 2 | |
31 BUG = 3 | |
32 FEATURE = 4 | |
33 WISH = 5 | |
34 | |
35 | 29 |
36 data_dict = { | 30 data_dict = { |
37 "date": [], | 31 "date": [], |
38 "critical": [], | 32 "critical": [], |
39 "urgent": [], | 33 "urgent": [], |
40 "bug": [], | 34 "bug": [], |
41 "feature": [], | 35 "feature": [], |
42 "wish": [] | 36 "wish": [] |
43 } | 37 } |
44 | 38 |
39 #SQL | |
45 | 40 |
46 #SQL | 41 #DEMO System |
47 SELECT_ALL = """ | 42 SELECT_ALL = """ |
48 SELECT strftime("%Y-%m-%dT%H:%M:%S", timestamp), | 43 SELECT strftime("%Y-%m-%dT%H:%M:%S", timestamp), |
49 critical, | 44 critical, |
50 urgent, | 45 urgent, |
51 bug, | 46 bug, |
70 | 65 |
71 INSERT_NEW = """ | 66 INSERT_NEW = """ |
72 INSERT INTO issues (critical, urgent, bug, feature, wish) | 67 INSERT INTO issues (critical, urgent, bug, feature, wish) |
73 VALUES (?, ?, ?, ?, ?) | 68 VALUES (?, ?, ?, ?, ?) |
74 """ | 69 """ |
70 | |
71 #Referecen DB: | |
72 SELECT_ALL_REFERENCE = """ | |
73 SELECT strftime("%Y-%m-%dT%H:%M:%S", sample_time), | |
74 critical, | |
75 major, | |
76 crash, | |
77 normal, | |
78 minor, | |
79 wishlist | |
80 FROM issues | |
81 ORDER BY sample_time | |
82 """ |