comparison views/hello_template.tpl @ 13:63b9f41c3008

made the charts a bit more modular - can now define the div_name and the script name in the .conf data
author sean
date Wed, 05 Aug 2015 12:37:33 +0200
parents 50f4c64834cb
children 3a9cb396905f
comparison
equal deleted inserted replaced
12:50f4c64834cb 13:63b9f41c3008
180 180
181 <div id = "content"> 181 <div id = "content">
182 <% 182 <%
183 for tile in tiles : 183 for tile in tiles :
184 type = "" 184 type = ""
185 text = "" 185 tile_content = ""
186 status = "" 186 status = ""
187 if tile["type"] == "mon" : 187 if tile["type"] == "mon" :
188 type = "statusmon" 188 type = "statusmon"
189 text = tile["source"] 189 tile_content = tile["source"]
190 if tile["status"] == "up" : 190 if tile["status"] == "up" :
191 status = "active" 191 status = "active"
192 elif tile["status"] == "down" : 192 elif tile["status"] == "down" :
193 status = "dead" 193 status = "dead"
194 end 194 end
195 elif tile["type"] == "d3js" : 195 elif tile["type"] == "d3js" :
196 type = "chart" 196 type = "chart"
197 status = "" 197 status = "techintern"
198 text = roundup_cc.make_chart(tile["status"]) 198 tile_content = roundup_cc.make_chart(tile["script"], tile["div_name"])
199 end 199 end
200 %> 200 %>
201 201
202 <div class = "tile {{type}} {{status}}"> 202 <div class = "tile {{type}} {{status}}">
203 {{!text}} 203 {{!tile_content}}
204 </div> 204 </div>
205 205
206 % end 206 % end
207 207
208 </div> 208 </div>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)