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>Date</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>
|
||||
{{#detectedSensors}}
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -132,6 +132,13 @@ public class ControllerManager implements HalSensorReportListener,
|
|||
return detectedSensors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all auto detected sensors.
|
||||
*/
|
||||
public void clearDetectedSensors(){
|
||||
detectedSensors.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by Controllers to report received Sensor data
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -88,6 +88,10 @@ public class SensorConfigHttpPage extends HalHttpPage {
|
|||
}
|
||||
break;
|
||||
|
||||
case "remove_all_detected_sensors":
|
||||
ControllerManager.getInstance().clearDetectedSensors();
|
||||
break;
|
||||
|
||||
// External Users
|
||||
case "create_external_user":
|
||||
user = new User();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue