view 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
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_ALL,
        graph
    )

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

    return html_string

# print(get_chart('techintern'))
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)