Added clear detected events button
This commit is contained in:
parent
a3a7409808
commit
88d2b2cebf
4 changed files with 19 additions and 0 deletions
|
|
@ -59,6 +59,13 @@
|
|||
<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_events">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
</form>
|
||||
</th>
|
||||
</thead>
|
||||
{{#detectedEvents}}
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
<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">
|
||||
|
|
|
|||
|
|
@ -265,6 +265,13 @@ public class ControllerManager implements HalSensorReportListener,
|
|||
return detectedEvents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all auto detected events.
|
||||
*/
|
||||
public void clearDetectedEvents(){
|
||||
detectedEvents.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by Controllers to report received Event data
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@ public class EventConfigHttpPage extends HalHttpPage {
|
|||
AlertLevel.ERROR, "Unknown event id: "+id, AlertTTL.ONE_VIEW));
|
||||
}
|
||||
break;
|
||||
|
||||
case "remove_all_detected_events":
|
||||
ControllerManager.getInstance().clearDetectedEvents();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue