diff 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
line wrap: on
line diff
--- a/views/hello_template.tpl	Tue Aug 04 16:00:07 2015 +0200
+++ b/views/hello_template.tpl	Wed Aug 05 12:37:33 2015 +0200
@@ -182,11 +182,11 @@
         <%
             for tile in tiles :
             type = ""
-            text = ""
+            tile_content = ""
             status = ""
             if tile["type"] == "mon" :
                 type = "statusmon"
-                text = tile["source"]
+                tile_content = tile["source"]
                 if tile["status"] == "up" :
                     status = "active"
                 elif tile["status"] == "down" :
@@ -194,13 +194,13 @@
                 end
             elif tile["type"] == "d3js" :
                 type = "chart"
-                status = ""
-                text = roundup_cc.make_chart(tile["status"])
+                status = "techintern"
+                tile_content = roundup_cc.make_chart(tile["script"], tile["div_name"])
             end
         %>
 
         <div class = "tile {{type}} {{status}}">
-            {{!text}}
+            {{!tile_content}}
         </div>
 
         % end
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)