Mercurial > bottledash
annotate modules/web_view/display_issues_techintern.py @ 43:2e2981af7d2d
Use bottledash-specific graph template
This version differs from roundup_cc's graph.html in that is not a complete
HTML file but a snippet.
author | Gernot Schulz <gernot@intevation.de> |
---|---|
date | Sun, 31 Jan 2016 15:21:18 +0100 |
parents | 8935152f5e19 |
children | 8449509b7f6f |
rev | line source |
---|---|
16 | 1 #!/usr/bin/env python3 |
2 | |
3 """ Fetch issues from a roundup-tracker and save them in a databse. | |
4 | |
5 author: Sascha L. Teichmann <sascha.teichmann@intevation.de> | |
6 author: Bernhard Reiter <bernhard@intevation.de> | |
7 author: Sean Engelhardt <sean.engelhardt@intevation.de> | |
8 | |
9 (c) 2010,2015 by Intevation GmbH | |
10 | |
11 This is Free Software unter the terms of the | |
12 GNU GENERAL PUBLIC LICENSE Version 3 or later. | |
13 See http://www.gnu.org/licenses/gpl-3.0.txt for details | |
14 """ | |
15 | |
42
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
16 from sys import path |
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
17 import os |
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
18 |
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
19 path.append( |
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
20 os.path.join(os.path.dirname(os.path.realpath(__file__)), 'roundup_cc') |
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
21 ) |
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
22 |
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
23 from display_issues import * |
16 | 24 |
43
2e2981af7d2d
Use bottledash-specific graph template
Gernot Schulz <gernot@intevation.de>
parents:
42
diff
changeset
|
25 graph = os.path.dirname(os.path.realpath(__file__)) + '/bottledash_graph.html' |
2e2981af7d2d
Use bottledash-specific graph template
Gernot Schulz <gernot@intevation.de>
parents:
42
diff
changeset
|
26 |
16 | 27 def get_chart(target_div_name): |
42
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
28 html_string = compile_db_stats_html( |
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
29 rcd.DATABASE_TECH_INTERN, |
43
2e2981af7d2d
Use bottledash-specific graph template
Gernot Schulz <gernot@intevation.de>
parents:
42
diff
changeset
|
30 rcd.SELECT_ALL, |
2e2981af7d2d
Use bottledash-specific graph template
Gernot Schulz <gernot@intevation.de>
parents:
42
diff
changeset
|
31 graph |
42
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
32 ) |
16 | 33 |
34 html_string = html_string.replace( | |
35 'var d3jsInjectionTarget="X";', 'var d3jsInjectionTarget="' + target_div_name + '";') | |
36 | |
37 return html_string | |
38 | |
42
8935152f5e19
Remove roundup_cc fork; import from embedded roundup_cc clone
Gernot Schulz <gernot@intevation.de>
parents:
16
diff
changeset
|
39 # print(get_chart('techintern')) |