diff options
2 files changed, 22 insertions, 0 deletions
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java index 926bfa2a48..ea49a5c006 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java @@ -186,10 +186,21 @@ public class NotificationsTabControl extends VHNotificationsTabControl IStructuredSelection ss = (IStructuredSelection)_tableViewer.getSelection(); if(!ss.isEmpty()) { + //clear selected Notifications serverRegistry.clearNotifications(_mbean, ss.toList()); } else if(_notifications != null) { + //clear all the notifications, if there are any + + //check the user is certain of this clear-all operation + int response = ViewUtility.popupOkCancelConfirmationMessage( + "Clear Notifications", "Clear all Notifications for this MBean?"); + if(response != SWT.OK) + { + return; + } + synchronized(this) { List<NotificationObject> newList = new ArrayList<NotificationObject>(); diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java index 5ebe0013bf..4e21e9e865 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java @@ -136,10 +136,21 @@ public class VHNotificationsTabControl extends TabControl IStructuredSelection ss = (IStructuredSelection)_tableViewer.getSelection(); if(!ss.isEmpty()) { + //clear selected Notifications serverRegistry.clearNotifications(null, ss.toList()); } else if(_notifications != null) { + //clear all the notifications, if there are any + + //check the user is certain of this clear-all operation + int response = ViewUtility.popupOkCancelConfirmationMessage( + "Clear Notifications", "Clear all Notifications for this VirtualHost?"); + if(response != SWT.OK) + { + return; + } + synchronized(this) { serverRegistry.clearNotifications(null, _notifications); |