sean@3: <%
sean@3: import math
sean@3: break_tile_lines = math.ceil(len(tiles)/2)
sean@3: tilecounter = 1
sean@3: vp_size = 1;
sean@3:
sean@3: if len(tiles) <= 2:
sean@3: vp_size = "6vw"
sean@3: elif len(tiles) >2 and len(tiles) <=4 :
sean@3: vp_size = "5vw"
sean@3: elif len(tiles) >4 and len(tiles) <=6 :
sean@3: vp_size = "4vw"
sean@3: elif len(tiles) >6 and len(tiles) <=8 :
sean@3: vp_size = "3vw"
sean@3: end
sean@3: %>
sean@2:
sean@2:
sean@2:
sean@2:
sean@2:
sean@3: % for tile in tiles :
sean@3: % type = ""
sean@3: % text = ""
sean@3: % status = ""
sean@3: % if tile["type"] == "mon" :
sean@3: % type = "statusmon"
sean@3: % text = tile["source"]
sean@3: % if tile["status"] == "up" :
sean@3: % status = "active"
sean@3: % elif tile["status"] == "down" :
sean@3: % status = "dead"
sean@3: % end
sean@3: % elif tile["type"] == "d3.js" :
sean@3: % type = "chart"
sean@3: % text = "place for a chart!"
sean@3: % end
sean@2:
sean@3:
sean@3: {{text}}
sean@3:
sean@3:
sean@3: % if tilecounter == break_tile_lines:
sean@3:
sean@3: % end
sean@3:
sean@3: % tilecounter += 1
sean@3: % end
sean@2:
sean@2: