summaryrefslogtreecommitdiffstats
path: root/modules-available
diff options
context:
space:
mode:
authorSimon Rettberg2018-01-11 13:08:12 +0100
committerSimon Rettberg2018-01-11 13:08:12 +0100
commit48826a186b6b4bf4eecea95851d46864007b7965 (patch)
treefcaa5da64b9455ef2e5a2cc0a1594435e607b2ed /modules-available
parent[statistics] Add "replace machines" feature (not linked to anywhere yet) (diff)
downloadslx-admin-48826a186b6b4bf4eecea95851d46864007b7965.tar.gz
slx-admin-48826a186b6b4bf4eecea95851d46864007b7965.tar.xz
slx-admin-48826a186b6b4bf4eecea95851d46864007b7965.zip
[locationinfo] URL: Add field to specify reload interval in minutes
Diffstat (limited to 'modules-available')
-rw-r--r--modules-available/locationinfo/inc/locationinfo.inc.php3
-rw-r--r--modules-available/locationinfo/page.inc.php2
-rw-r--r--modules-available/locationinfo/templates/page-config-panel-url.html22
3 files changed, 26 insertions, 1 deletions
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php
index e3d7db3d..38e271fe 100644
--- a/modules-available/locationinfo/inc/locationinfo.inc.php
+++ b/modules-available/locationinfo/inc/locationinfo.inc.php
@@ -130,6 +130,9 @@ class LocationInfo
if ($data && $data['insecure-ssl']) {
ConfigHolder::add('SLX_BROWSER_INSECURE', '1');
}
+ if ($data && $data['reload-minutes']) {
+ ConfigHolder::add('SLX_BROWSER_RELOAD_SECS', $data['reload-minutes'] * 60);
+ }
}
ConfigHolder::add('SLX_BROWSER_URL', 'http://' . $_SERVER['SERVER_ADDR'] . '/panel/' . $panelUuid);
ConfigHolder::add('SLX_ADDONS', '', 1000);
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index 22a21951..777b84db 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -362,6 +362,7 @@ class Page_LocationInfo extends Page
$conf = array(
'url' => Request::post('url', 'https://www.bwlehrpool.de/', 'string'),
'insecure-ssl' => Request::post('insecure-ssl', 0, 'int'),
+ 'reload-minutes' => max(0, Request::post('reloadminutes', 0, 'int')),
);
return array('config' => $conf, 'locationids' => []);
}
@@ -887,6 +888,7 @@ class Page_LocationInfo extends Page
'panelname' => $panel['panelname'],
'url' => $config['url'],
'ssl_checked' => $config['insecure-ssl'] ? 'checked' : '',
+ 'reloadminutes' => (int)$config['reload-minutes'],
));
} else {
Render::addTemplate('page-config-panel-summary', array(
diff --git a/modules-available/locationinfo/templates/page-config-panel-url.html b/modules-available/locationinfo/templates/page-config-panel-url.html
index 401214bd..cca81509 100644
--- a/modules-available/locationinfo/templates/page-config-panel-url.html
+++ b/modules-available/locationinfo/templates/page-config-panel-url.html
@@ -55,7 +55,10 @@
<label for="input-ssl">{{lang_insecureSsl}}</label>
</div>
<div class="col-sm-7">
- <input id="input-ssl" type="checkbox" name="insecure-ssl" {{ssl_checked}} value="1">
+ <div class="checkbox">
+ <input id="input-ssl" type="checkbox" name="insecure-ssl" {{ssl_checked}} value="1">
+ <label></label>
+ </div>
</div>
<div class="col-sm-2">
<a class="btn btn-default helptext" title="{{lang_ignoreSslTooltip}}">
@@ -64,6 +67,23 @@
</div>
</div>
</div>
+
+ <div class="list-group-item">
+ <div class="row">
+ <div class="col-sm-3">
+ <label for="input-reload">{{lang_reloadIntervalMins}}</label>
+ </div>
+ <div class="col-sm-7">
+ <input class="form-control" id="input-reload" type="number" min="0" max="999" name="reloadminutes" pattern="\d*" value="{{reloadminutes}}">
+ </div>
+ <div class="col-sm-2">
+ <a class="btn btn-default helptext" title="{{lang_reloadIntervalTooltip}}">
+ <span class="glyphicon glyphicon-question-sign"></span>
+ </a>
+ </div>
+ </div>
+ </div>
+
</div>
</div>
</div>