diff --git a/src/se/koc/hal/page/PCConfigureHttpPage.java b/src/se/koc/hal/page/PCConfigureHttpPage.java index 32c6307d..7161b214 100755 --- a/src/se/koc/hal/page/PCConfigureHttpPage.java +++ b/src/se/koc/hal/page/PCConfigureHttpPage.java @@ -120,8 +120,9 @@ public class PCConfigureHttpPage extends HalHttpPage { // Output Templator tmpl = new Templator(FileUtil.find("web-resource/configure.tmpl")); tmpl.set("user", localUser); - tmpl.set("localSensor", Sensor.getLocalSensors(db)); + tmpl.set("localSensors", Sensor.getLocalSensors(db)); tmpl.set("localSensorConf", sensorConfigurations); + tmpl.set("detectedSensors", ControllerManager.getInstance().getDetectedSensors()); tmpl.set("extUsers", User.getExternalUsers(db)); tmpl.set("extSensor", Sensor.getExternalSensors(db)); diff --git a/web-resource/configure.tmpl b/web-resource/configure.tmpl index 3a2c23a7..1d1e67fc 100755 --- a/web-resource/configure.tmpl +++ b/web-resource/configure.tmpl @@ -47,7 +47,7 @@ - {{#localSensor}} + {{#localSensors}} {{.name}} {{.type}} @@ -76,7 +76,32 @@ - {{/localSensor}} + {{/localSensors}} + + +
+

Sensors that has been automatically detected.

+ + + + + + {{#detectedSensors}} + + + + + + {{/detectedSensors}}
TypeConfiguration
{{.getClass().getName()}}{{.}} +
+ +
+
@@ -193,7 +218,7 @@ // Update dynamic inputs $("#sensorModal #sensor-data-conf").html(sensorDataConf[$(this).val()]); }); - // event + // click event $("#sensorModal").on('show.bs.modal', function (event) { var button = $(event.relatedTarget); var modal = $(this);