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>Date</th>
|
||||||
<th>Data</th>
|
<th>Data</th>
|
||||||
<th>Configuration</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>
|
</thead>
|
||||||
{{#detectedEvents}}
|
{{#detectedEvents}}
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Data</th>
|
<th>Data</th>
|
||||||
|
<th>Configuration</th>
|
||||||
<th>
|
<th>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<button type="submit" class="btn btn-danger btn-xs pull-right" name="action" value="remove_all_detected_sensors">
|
<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;
|
return detectedEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes all auto detected events.
|
||||||
|
*/
|
||||||
|
public void clearDetectedEvents(){
|
||||||
|
detectedEvents.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by Controllers to report received Event data
|
* 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));
|
AlertLevel.ERROR, "Unknown event id: "+id, AlertTTL.ONE_VIEW));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "remove_all_detected_events":
|
||||||
|
ControllerManager.getInstance().clearDetectedEvents();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue