Merge pull request #30 from wez3/develop

Develop -> Master
This commit is contained in:
wez3 2017-01-02 19:16:05 +01:00 committed by GitHub
commit f51e9d71c1
5 changed files with 16 additions and 10 deletions

View File

@ -38,9 +38,8 @@ def loadPlugins():
try:
plugin[name] = imp.load_source(name, plugin_dir + i)
plugin[name].init()
except ImportError:
print "Error occured during loading imports for the plugin " + name + ". Please check whether all dependecies are installed"
sys.exit()
except ImportError as msg:
sys.exit("Error occured during loading imports for the plugin {}: {}".format(name, msg))
return plugin
@login_required()

View File

@ -68,6 +68,7 @@ def retrieveValue(page, component):
else:
for sk, sv in config[page][match.group(1)][match.group(2)].iteritems():
sv = strToList(sv)
sv.append(match.group(2))
dict[sk] = sv
except:
dict = {}

View File

@ -1,7 +1,7 @@
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Camera System</h2>
<h2 id="s_title_{{ count }}">Camera System</h2>
<ul class="nav navbar-right panel_toolbox">
<li><a class="close-link"><i class="fa fa-close"></i></a>
</li>
@ -10,14 +10,13 @@
</div>
<div style=";overflow: hidden">
<br>
{% for k, v in blockArray[count]["camera"].iteritems() %}
{% if v[1] %}
<script> $('#s_title_{{ count }}').html("{{ v[1] }}");</script>
{% endif %}
<form class="form-horizontal form-label-left" style="width: 80%; height: 80%; ">
<div class="form-group" style="">
<label class=""> {{ k }}</label>
<br>
<img id="cam_{{ count }}" style="-webkit-user-select: none; width: 100%; height: 100%; " src="{{v[0]|replace('&amp;', '&')}}" >
</div>
</form>
{% endfor %}

View File

@ -1,7 +1,7 @@
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Locatie</h2>
<h2 id="s_title_{{ count }}">Locatie</h2>
<ul class="nav navbar-right panel_toolbox">
<li><a class="close-link"><i class="fa fa-close"></i></a>
</li>
@ -21,6 +21,9 @@
$(document).ready(function() {
var location=[];
{% for k, v in blockArray[count]["map"].iteritems() %}
{% if v[1] %}
$('#s_title_{{ count }}').html("{{ v[1] }}");
{% endif %}
location.push("{{v[0]}}");
{% endfor %}
refreshMapLocation(location, "locationIframe-{{count}}");

View File

@ -2,7 +2,7 @@
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Schakelaars</h2>
<h2 id="s_title_{{ count }}">Schakelaars</h2>
<ul class="nav navbar-right panel_toolbox">
<li><a class="close-link"><i class="fa fa-close"></i></a>
</li>
@ -79,7 +79,11 @@ $(document).ready(function() {
var updateSwitches_block_{{count}}=[];
var updateDimmers_block_{{count}}=[];
var updateSetpoints_block_{{count}}=[];
{% for k, v in blockArray[count]["switches"].iteritems() %}
{% if v[2] %}
$('#s_title_{{ count }}').html("{{ v[2] }}");
{% endif %}
{% if v[1] == "switch" %}
$('input[id="switch_{{v[0]}}_block_{{count}}"]').on('switchChange.bootstrapSwitch', function(event, state) {
changeSwitch(this, {{v[0]}});