comparison views/hello_template.tpl @ 11:7a573ec679a6

added more files, can now display charts a bit
author sean
date Tue, 04 Aug 2015 14:23:53 +0200
parents c8cb2aa0b72c
children 50f4c64834cb
comparison
equal deleted inserted replaced
10:d71f39618d6f 11:7a573ec679a6
1 <!-- This tempalte is a part of bottledash 1 <!-- This tempalte is a part of bottledash
2 author: sean engelhardt >sean.engelhardt@intevation.de 2 author: sean engelhardt >sean.engelhardt@intevation.de
3 License: GNU GPL >= v2. See LICENSE for details. --> 3 License: GNU GPL >= v2. See LICENSE for details. -->
4 4
5 <% 5 <%
6 6 import math, os, sys, subprocess, html.parser
7 import math 7
8 from datetime import date 8 from datetime import date
9 9
10 h = html.parser.HTMLParser()
11 PATH = os.path.abspath(os.path.dirname(sys.argv[0]))
12 sys.path.append(PATH + "/modules")
13 import roundup_cc
14
10 ################# 15 #################
11 # settings # 16 # settings #
12 ################# 17 #################
13 18
14
15 show_top_bar = settings["show_top_bar"] 19 show_top_bar = settings["show_top_bar"]
16 20
17
18 ################# 21 #################
19 # date and time # 22 # date and time #
20 ################# 23 #################
21
22 24
23 today = date.today() 25 today = date.today()
24 weekday = ("Montag", "Dienstag", "Mittwoch", "Donnerstag", 26 weekday = ("Montag", "Dienstag", "Mittwoch", "Donnerstag",
25 "Freitag", "Samstag", "Sonntag")[today.weekday()] 27 "Freitag", "Samstag", "Sonntag")[today.weekday()]
26 month_name = ("Januar", "Februar", "März", "Aprill", "Mai", 28 month_name = ("Januar", "Februar", "März", "Aprill", "Mai",
175 <b>{{weekday}}</b> {{today.day}}. {{month_name}} 177 <b>{{weekday}}</b> {{today.day}}. {{month_name}}
176 </div> 178 </div>
177 % end 179 % end
178 180
179 <div id = "content"> 181 <div id = "content">
180
181 <% 182 <%
182 for tile in tiles : 183 for tile in tiles :
183 type = "" 184 type = ""
184 text = "" 185 text = ""
185 status = "" 186 status = ""
189 if tile["status"] == "up" : 190 if tile["status"] == "up" :
190 status = "active" 191 status = "active"
191 elif tile["status"] == "down" : 192 elif tile["status"] == "down" :
192 status = "dead" 193 status = "dead"
193 end 194 end
194 elif tile["type"] == "d3.js" : 195 elif tile["type"] == "d3js" :
195 type = "chart" 196 type = "chart"
196 text = "place for a chart!" 197 status = ""
198 text = roundup_cc.get_tech_intern_chart()
199 #text = "<div id = KAKAK>HHOHOHOHOH </div>"
197 end 200 end
198 %> 201 %>
202
199 <div class = "tile {{type}} {{status}}"> 203 <div class = "tile {{type}} {{status}}">
200 {{text}} 204 {{!text}}
201 </div> 205 </div>
202 206
203 % end 207 % end
204 208
205 </div> 209 </div>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)