Added clear button for detected sensors
This commit is contained in:
parent
68e695da67
commit
208655b465
3 changed files with 18 additions and 1 deletions
|
|
@ -60,7 +60,13 @@
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Data</th>
|
<th>Data</th>
|
||||||
<th>Configuration</th>
|
<th>
|
||||||
|
<form method="POST">
|
||||||
|
<button type="submit" class="btn btn-danger btn-xs pull-right" name="action" value="remove_all_detected_sensors">
|
||||||
|
<span class="glyphicon glyphicon-trash"></span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</th>
|
||||||
</thead>
|
</thead>
|
||||||
{{#detectedSensors}}
|
{{#detectedSensors}}
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,13 @@ public class ControllerManager implements HalSensorReportListener,
|
||||||
return detectedSensors;
|
return detectedSensors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes all auto detected sensors.
|
||||||
|
*/
|
||||||
|
public void clearDetectedSensors(){
|
||||||
|
detectedSensors.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by Controllers to report received Sensor data
|
* Called by Controllers to report received Sensor data
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,10 @@ public class SensorConfigHttpPage extends HalHttpPage {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "remove_all_detected_sensors":
|
||||||
|
ControllerManager.getInstance().clearDetectedSensors();
|
||||||
|
break;
|
||||||
|
|
||||||
// External Users
|
// External Users
|
||||||
case "create_external_user":
|
case "create_external_user":
|
||||||
user = new User();
|
user = new User();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue