Browse Source

allow background image to be chosen from config.

Signed-off-by: root <root@ipekatrinadei.ipe.kit.edu>
root 7 years ago
parent
commit
877171ee91
6 changed files with 8 additions and 2 deletions
  1. 1 0
      core.py
  2. BIN
      static/background.png
  3. 1 0
      static/background.png
  4. BIN
      static/cps_01.png
  5. BIN
      static/cps_02.png
  6. 6 2
      status.html

+ 1 - 0
core.py

@@ -252,6 +252,7 @@ class StatusHandler(tornado.web.RequestHandler):
             return
         
 	data = {
+            "background": config['background'],
             "style": style_data,
             "varname": varname_data
         }

BIN
static/background.png


+ 1 - 0
static/background.png

@@ -0,0 +1 @@
+cps_02.png

BIN
static/cps_01.png


BIN
static/cps_02.png


+ 6 - 2
status.html

@@ -121,9 +121,13 @@ data-cond="{{ data['style'][key]['cond'] }}"
 {% else %}
 {% end %}
 
-    
 
-<img src="{{ static_url('background.png') }}"></img>    
+
+{% if "background" in data %}
+<img src="{{ static_url( data['background'] ) }}"></img>    
+{% else %}
+<img src="{{ static_url( 'background.png' ) }}"></img>
+{% end %}
 
    
 <!-- java script -->