comparison display_issues.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
comparison
equal deleted inserted replaced
24:89469aa41fe1 25:7161ce4e7ab1
49 base_html_data = html_chart_file.read() 49 base_html_data = html_chart_file.read()
50 50
51 if "None" not in columns: 51 if "None" not in columns:
52 data_dict["None"] = [0] 52 data_dict["None"] = [0]
53 53
54
55 js_data_dickt ="{"
56 for col in columns.split(", "):
57 js_data_dickt += col + ":[" + make_js_object_string(data_dict[col]) + "],"
58 js_data_dickt += "}"
59
54 base_html_data = (base_html_data 60 base_html_data = (base_html_data
55 .replace("status", status) 61 .replace("status", status)
56 .replace("keywords", keywords) 62 .replace("keywords", keywords)
57 .replace("var critical=[];", "var critical=[" + make_js_object_string(data_dict["critical"]) + "]") 63 .replace("js_data_dickt", js_data_dickt)
58 .replace("var urgent=[];", "var urgent=[" + make_js_object_string(data_dict["urgent"]) + "]")
59 .replace("var bug=[];", "var bug=[" + make_js_object_string(data_dict["bug"]) + "]")
60 .replace("var feature=[];", "var feature=[" + make_js_object_string(data_dict["feature"]) + "]")
61 .replace("var wish=[];", "var wish=[" + make_js_object_string(data_dict["wish"]) + "]")
62 .replace("var noPrio=[];", "var noPrio=[" + make_js_object_string(data_dict["None"]) + "]")
63 .replace("var timestamp=[];", "var timestamp=[" + make_js_object_date(data_dict["date"]) + "]")) 64 .replace("var timestamp=[];", "var timestamp=[" + make_js_object_date(data_dict["date"]) + "]"))
64 65
65 return base_html_data 66 return base_html_data
66 67
67 def compile_db_stats_html(db_file, sql_select, columns, status="", keywords="", graph=None): 68 def compile_db_stats_html(db_file, sql_select, columns, status="", keywords="", graph=None):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)