comparison display_issues_demo.py @ 25:7161ce4e7ab1

The web-based display is dynamically generated. * All graphs are passed in one object. All graphs are passed in one object. The graphs are generated iteratiev and assigned a color. * roundup_cc.py can count how many issues are in which state.
author Magnus Schieder <mschieder@intevation.de>
date Mon, 12 Nov 2018 18:03:26 +0100
parents 89469aa41fe1
children 761ee2351f58
comparison
equal deleted inserted replaced
24:89469aa41fe1 25:7161ce4e7ab1
14 """ 14 """
15 import configparser 15 import configparser
16 import argparse 16 import argparse
17 from display_issues import * 17 from display_issues import *
18 18
19 STATES = "unread, deferred, chatting, need_eg, in_progress, testing, done_cbb, resolved"
20
19 parser = argparse.ArgumentParser() 21 parser = argparse.ArgumentParser()
20 parser.add_argument("config_file", type=str, metavar="[config file]") 22 parser.add_argument("config_file", type=str, metavar="[config file]")
21 args = parser.parse_args() 23 args = parser.parse_args()
22 24
23 config = configparser.ConfigParser() 25 config = configparser.ConfigParser()
24 config.read(args.config_file) 26 config.read(args.config_file)
25 27
26 db = config.get("DB", "DatabaseFile") 28 db = config.get("DB", "DatabaseFile")
27 keywords = config.get("SEARCH", "Keywords", fallback="") 29 keywords = config.get("SEARCH", "Keywords", fallback="")
30
31
32
28 status = config.get("SEARCH", "Status", fallback="") 33 status = config.get("SEARCH", "Status", fallback="")
29 columns = config.get("SEARCH", "Columns", fallback="critical, urgent, bug, feature, wish") 34 columns = config.get("SEARCH", "Columns", fallback="critical, urgent, bug, feature, wish")
30 noPrio = config.get("SEARCH", "IncludeNoPrio", fallback=False) 35 noPrio = config.get("SEARCH", "IncludeNoPrio", fallback=False)
36 search = config.get("SEARCH", "Search", fallback="prio")
37 if search == "status":
38 if status == "":
39 columns = STATES
40 else:
41 columns = status
42 noPrio = False
43
31 if noPrio: 44 if noPrio:
32 columns += ", None" 45 columns += ", None"
33 46
34 cgitb.enable() # (optional) HTML traceback to browser 47 cgitb.enable() # (optional) HTML traceback to browser
35 #render_db_stats_as_html("./demo1.db", rcd.SELECT_ALL) 48 #render_db_stats_as_html("./demo1.db", rcd.SELECT_ALL)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)