diff dash.py @ 25:05e5441c5160

charts will now be displayed as they should!
author sean
date Fri, 14 Aug 2015 00:31:48 +0200
parents 7d431b779512
children af280057d5fa
line wrap: on
line diff
--- a/dash.py	Thu Aug 13 16:34:46 2015 +0200
+++ b/dash.py	Fri Aug 14 00:31:48 2015 +0200
@@ -79,7 +79,7 @@
 
 ###write the default condfig file if there is none
 def write_default_config():
-    print("there is no Config file! Creating one...")
+    logger.info("No config-file found. create new config file")
     file = open(CONFIG_PATH, "w")
     file.write("""
 ### bottledash default configuration
@@ -104,6 +104,7 @@
 
 [settings]
 show_top_bar=False
+rows=2
 
 # Tiles:
 # example:
@@ -123,9 +124,6 @@
 #   source (<IP> or <FQDN>) [required for mon-types]
 #     ONLY FOR MON-Type tiles!
 #     tells the tile which resource to watch
-#   default: none
-#
-#   status: (up / down) [required]
 #     ONLY FOR DEBUGGING PURPOSE - WILL BE REMOVED LATER
 #     simulates up and down events for mon-type-tiles
 #
@@ -135,21 +133,21 @@
 #
 [tile1]
 type=mon
-source=192.168.0.2
-status=down
+source=red2.rgb.intevation.de
+status="dynamic"
 
 [tile2]
 type=mon
 source=192.168.2.3
-status=up
+status="dynamic"
 
 [tile3]
 type=mon
 source=192.168.4.3
-status=up
+status="dynamic"
 
 [tile4]
-type=d3js
+type=web_view
 div_name=techintern
 script=display_issues_techintern
 """)
@@ -181,7 +179,7 @@
     logger.info('Status : ' + str(status))
     # log_tile_status()
 
-    return "thanks for informing bottledash! :: " + str(service) + " is " + str(status) + " !"
+    return ":: " + str(service) + " is " + str(status) + " !"
 
 
 @post('/ask-systemstate')
@@ -189,7 +187,7 @@
     global tiles
     service = request.forms.get('service')
 
-    print("service: " + service)
+    # print("service: " + service)
 
     try:
         for tile in tiles:
@@ -212,4 +210,4 @@
 
 read_config()
 # print(tiles)
-run(host='localhost', port=8080, debug=True)
+run(host='localhost', port=8080, debug=False, quiet=True)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)