Add an option for the visualisation web interface to auto-refresh
Change-Id: Iee39e5c221a57d7e418a236b546cd790cd3902b3
diff --git a/config/config.py b/config/config.py
index 9b5fc57..3694196 100644
--- a/config/config.py
+++ b/config/config.py
@@ -79,6 +79,7 @@
'name': None,
'password': None,
'port': None,
+ 'refresh': None,
'server': None,
'username': None,
})
@@ -207,6 +208,15 @@
except:
raise ConfigError('Invalid visualisation configuration (enabled)')
+ try:
+ self.visualisation.refresh = config.get(section, 'refresh')
+ if self.visualisation.refresh is not None:
+ self.visualisation.refresh = int(self.visualisation.refresh)
+ except ConfigParser.NoOptionError:
+ pass
+ except:
+ raise ConfigError('Invalid visualisation configuration (refresh)')
+
else:
match = sw_regex.match(section)
if match: