Editing a Dashboard Template in the Designer in an HTML template
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.The designer's scripts and body can be emitted separately to fit your own HTML template, just like the viewer.
Emit the JS and HTML parts into a template.
How it works. Splitting the component into script and body lets you place the full dashboard designer inside a custom Jinja template.
Emit the JS and HTML parts into a template.
designer = StiDesigner()
if designer.processRequest(request):
return designer.getFrameworkResponse()
report = StiReport()
report.loadFile(url_for('static', filename='reports/WebsiteAnalytics.mrt'))
designer.report = report
js = designer.javascript.getHtml()
html = designer.getHtml()
return render_template('...html', designerJavaScript=js, designerHtml=html)designer.javascript.getHtml()+designer.getHtml()— the designer's script block and visual HTML.- Pass both to
render_templateto embed the designer in your own page layout.
How it works. Splitting the component into script and body lets you place the full dashboard designer inside a custom Jinja template.