view modules/web_view/display_issues_techintern.py @ 47:190a81a60e7e tip

Update README G: changed README.txt
author Gernot Schulz <gernot@intevation.de>
date Sun, 07 Feb 2016 13:26:32 +0100
parents ba41c0fbd6e7
children
line wrap: on
line source
#!/usr/bin/env python3

""" Fetch issues from a roundup-tracker and save them in a databse.

author: Sascha L. Teichmann <sascha.teichmann@intevation.de>
author: Bernhard Reiter <bernhard@intevation.de>
author: Sean Engelhardt <sean.engelhardt@intevation.de>

(c) 2010,2015 by Intevation GmbH

This is Free Software unter the terms of the
GNU GENERAL PUBLIC LICENSE Version 3 or later.
See http://www.gnu.org/licenses/gpl-3.0.txt for details
"""

from sys import path
import os

path.append(
        os.path.join(os.path.dirname(os.path.realpath(__file__)), 'roundup_cc')
    )

from display_issues import *

graph = os.path.dirname(os.path.realpath(__file__)) + '/bottledash_graph.html'

def get_chart(target_div_name):
    html_string = compile_db_stats_html(
        rcd.DATABASE_TECH_INTERN,
        rcd.SELECT_WHERE.format("timestamp > date('now', '-2 month')"),
        graph
    )

    html_string = html_string.replace(
        'var d3jsInjectionTarget="X";', 'var d3jsInjectionTarget="' + target_div_name + '";')

    return html_string

if __name__ == '__main__':
    print(get_chart('techintern'))
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)