use of org.netxms.ui.eclipse.alarmviewer.dialogs.AcknowledgeCustomTimeDialog in project netxms by netxms.
the class AcknowledgeTimeEditor method addPressed.
/**
* Notifies that the Add button has been pressed.
*/
private void addPressed() {
setPresentsDefaultValue(false);
String input = null;
int time = 0;
AcknowledgeCustomTimeDialog dlg = new AcknowledgeCustomTimeDialog(getShell());
if (dlg.open() == Window.OK) {
time = dlg.getTime();
if (time > 0)
input = AlarmAcknowledgeTimeFunctions.timeToString(time);
}
if (input != null) {
int index = list.getItemCount();
list.add(input, index);
ListActions act = new ListActions();
act.action = ListActions.ADD;
act.element = index;
act.value = time;
actions.add(act);
}
}
use of org.netxms.ui.eclipse.alarmviewer.dialogs.AcknowledgeCustomTimeDialog in project netxms by netxms.
the class AlarmList method createActions.
/**
* Create actions
*/
private void createActions() {
actionComments = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.get().AlarmList_Comments, // $NON-NLS-1$
Activator.getImageDescriptor("icons/comments.png")) {
@Override
public void run() {
openAlarmDetailsView(AlarmComments.ID);
}
};
// $NON-NLS-1$
actionComments.setId("org.netxms.ui.eclipse.alarmviewer.popupActions.Comments");
actionShowAlarmDetails = new Action(Messages.get().AlarmList_ActionAlarmDetails) {
@Override
public void run() {
openAlarmDetailsView(AlarmDetails.ID);
}
};
// $NON-NLS-1$
actionShowAlarmDetails.setId("org.netxms.ui.eclipse.alarmviewer.popupActions.AlarmDetails");
actionAcknowledge = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.get().AlarmList_Acknowledge, // $NON-NLS-1$
Activator.getImageDescriptor("icons/acknowledged.png")) {
@Override
public void run() {
acknowledgeAlarms(false, 0);
}
};
// $NON-NLS-1$
actionAcknowledge.setId("org.netxms.ui.eclipse.alarmviewer.popupActions.Acknowledge");
actionStickyAcknowledge = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.get().AlarmList_StickyAck, // $NON-NLS-1$
Activator.getImageDescriptor("icons/acknowledged_sticky.png")) {
@Override
public void run() {
acknowledgeAlarms(true, 0);
}
};
// $NON-NLS-1$
actionStickyAcknowledge.setId("org.netxms.ui.eclipse.alarmviewer.popupActions.StickyAcknowledge");
actionResolve = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.get().AlarmList_Resolve, // $NON-NLS-1$
Activator.getImageDescriptor("icons/resolved.png")) {
@Override
public void run() {
resolveAlarms();
}
};
// $NON-NLS-1$
actionResolve.setId("org.netxms.ui.eclipse.alarmviewer.popupActions.Resolve");
actionTerminate = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.get().AlarmList_Terminate, // $NON-NLS-1$
Activator.getImageDescriptor("icons/terminated.png")) {
@Override
public void run() {
terminateAlarms();
}
};
// $NON-NLS-1$
actionTerminate.setId("org.netxms.ui.eclipse.alarmviewer.popupActions.Terminate");
actionCreateIssue = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.get().AlarmList_CreateTicket, // $NON-NLS-1$
Activator.getImageDescriptor("icons/helpdesk_ticket.png")) {
@Override
public void run() {
createIssue();
}
};
actionShowIssue = new Action(Messages.get().AlarmList_ShowTicketInBrowser, SharedIcons.BROWSER) {
@Override
public void run() {
showIssue();
}
};
actionUnlinkIssue = new Action(Messages.get().AlarmList_UnlinkTicket) {
@Override
public void run() {
unlinkIssue();
}
};
actionShowObjectDetails = new Action(Messages.get().AlarmList_ActionObjectDetails) {
@Override
public void run() {
showObjectDetails();
}
};
// $NON-NLS-1$
actionShowObjectDetails.setId("org.netxms.ui.eclipse.alarmviewer.popupActions.ShowObjectDetails");
actionExportToCsv = new ExportToCsvAction(viewPart, alarmViewer, true);
// time based sticky acknowledgement
timeAcknowledgeOther = new // $NON-NLS-1$ //$NON-NLS-2$
Action(// $NON-NLS-1$ //$NON-NLS-2$
"Other...", // $NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor("icons/acknowledged.png")) {
@Override
public void run() {
AcknowledgeCustomTimeDialog dlg = new AcknowledgeCustomTimeDialog(viewPart.getSite().getShell());
if (dlg.open() == Window.OK) {
int time = dlg.getTime();
if (time > 0)
acknowledgeAlarms(true, time);
}
}
};
// $NON-NLS-1$
timeAcknowledgeOther.setId("org.netxms.ui.eclipse.alarmviewer.popupActions.TimeAcknowledgeOther");
actionShowColor = new Action(Messages.get().AlarmList_ShowStatusColors, Action.AS_CHECK_BOX) {
@Override
public void run() {
labelProvider.setShowColor(actionShowColor.isChecked());
alarmViewer.refresh();
Activator.getDefault().getPreferenceStore().setValue("SHOW_ALARM_STATUS_COLORS", actionShowColor.isChecked());
}
};
actionShowColor.setChecked(labelProvider.isShowColor());
actionShowFilter = new Action("Show filter") {
@Override
public void run() {
enableFilter(actionShowFilter.isChecked());
}
};
actionShowFilter.setImageDescriptor(SharedIcons.FILTER);
actionShowFilter.setChecked(initShowfilter);
// $NON-NLS-1$
actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.alarmviewer.commands.show_filter_alarm_list");
}
Aggregations