Search in sources :

Example 16 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction 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");
}
Also used : IAction(org.eclipse.jface.action.IAction) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction) Action(org.eclipse.jface.action.Action) AcknowledgeCustomTimeDialog(org.netxms.ui.eclipse.alarmviewer.dialogs.AcknowledgeCustomTimeDialog) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 17 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class SummaryTableWidget method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionExportToCsv = new ExportToCsvAction(viewPart, viewer, true);
    actionUseMultipliers = new Action(Messages.get().LastValues_UseMultipliers, Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            setUseMultipliers(!useMultipliers);
        }
    };
    actionUseMultipliers.setChecked(useMultipliers);
    actionForcePollAll = new Action(Messages.get().SummaryTableWidget_ForcePollForAllColumns) {

        @Override
        public void run() {
            forcePoll(true);
        }
    };
    actionShowObjectDetails = new Action(Messages.get().SummaryTableWidget_ShowObjectDetails) {

        @Override
        public void run() {
            showObjectDetails();
        }
    };
    // $NON-NLS-1$
    actionShowObjectDetails.setId("org.netxms.ui.eclipse.datacollection.popupActions.ShowObjectDetails");
}
Also used : ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction) Action(org.eclipse.jface.action.Action) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 18 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class TableToolResults method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionRefresh = new RefreshAction(this) {

        @Override
        public void run() {
            refreshTable();
        }
    };
    actionExportToCsv = new ExportToCsvAction(this, viewer, true);
    actionExportAllToCsv = new ExportToCsvAction(this, viewer, false);
}
Also used : RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 19 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class TableLastValuesView method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionRefresh = new RefreshAction(this) {

        @Override
        public void run() {
            refreshTable();
        }
    };
    actionExportAllToCsv = new ExportToCsvAction(this, viewer.getViewer(), false);
}
Also used : RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 20 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class SoftwareInventoryView method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionRefresh = new RefreshAction(this) {

        @Override
        public void run() {
            inventoryWidget.refresh();
        }
    };
    ViewerProvider vp = new ViewerProvider() {

        @Override
        public ColumnViewer getViewer() {
            return inventoryWidget.getViewer();
        }
    };
    actionExportToCsv = new ExportToCsvAction(this, vp, true);
    actionExportAllToCsv = new ExportToCsvAction(this, vp, false);
}
Also used : RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ViewerProvider(org.netxms.ui.eclipse.actions.ViewerProvider) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Aggregations

ExportToCsvAction (org.netxms.ui.eclipse.actions.ExportToCsvAction)21 RefreshAction (org.netxms.ui.eclipse.actions.RefreshAction)17 Action (org.eclipse.jface.action.Action)11 ActionHandler (org.eclipse.jface.commands.ActionHandler)5 IHandlerService (org.eclipse.ui.handlers.IHandlerService)5 IAction (org.eclipse.jface.action.IAction)1 AbstractNode (org.netxms.client.objects.AbstractNode)1 ViewerProvider (org.netxms.ui.eclipse.actions.ViewerProvider)1 AcknowledgeCustomTimeDialog (org.netxms.ui.eclipse.alarmviewer.dialogs.AcknowledgeCustomTimeDialog)1 ObjectSelectionDialog (org.netxms.ui.eclipse.objectbrowser.dialogs.ObjectSelectionDialog)1