Search in sources :

Example 1 with AddMonitorInstanceDlg

use of com.cubrid.cubridmanager.ui.monitoring.dialog.AddMonitorInstanceDlg in project cubrid-manager by CUBRID.

the class EditMonitorInstanceAction method run.

/**
	 * Override the run method in order to open an instance of status monitor
	 * dialog
	 * 
	 */
public void run() {
    Object[] obj = this.getSelectedObj();
    ICubridNode selection = (ICubridNode) obj[0];
    String selectLbl = selection.getLabel();
    ServerInfo serverInfo = selection.getServer().getServerInfo();
    String prefix = QueryOptions.getPrefix(serverInfo);
    String selectionKey = prefix + QueryOptions.MONITOR_FOLDER_NAME + selectLbl;
    CubridStatusMonitorInstance instance = CubridStatusMonitorInstance.getInstance();
    StatusMonInstanceData monData = instance.getData(selectionKey);
    AddMonitorInstanceDlg addMonitorInstanceDlg = new AddMonitorInstanceDlg(getShell());
    addMonitorInstanceDlg.setSelection(selection);
    addMonitorInstanceDlg.setMonData(monData);
    addMonitorInstanceDlg.open();
}
Also used : CubridStatusMonitorInstance(com.cubrid.cubridmanager.ui.monitoring.editor.internal.CubridStatusMonitorInstance) ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) StatusMonInstanceData(com.cubrid.cubridmanager.ui.monitoring.editor.internal.StatusMonInstanceData) ICubridNode(com.cubrid.common.ui.spi.model.ICubridNode) AddMonitorInstanceDlg(com.cubrid.cubridmanager.ui.monitoring.dialog.AddMonitorInstanceDlg)

Example 2 with AddMonitorInstanceDlg

use of com.cubrid.cubridmanager.ui.monitoring.dialog.AddMonitorInstanceDlg in project cubrid-manager by CUBRID.

the class AddMonitorInstanceAction method run.

/**
	 * Override the run method in order to open an instance of status monitor
	 * dialog
	 *
	 */
public void run() {
    Object[] obj = this.getSelectedObj();
    ICubridNode selection = (ICubridNode) obj[0];
    AddMonitorInstanceDlg addMonitorInstanceDlg = new AddMonitorInstanceDlg(getShell());
    addMonitorInstanceDlg.setSelection(selection);
    addMonitorInstanceDlg.open();
    TreeViewer treeViewer = (TreeViewer) this.getSelectionProvider();
    CommonUITool.refreshNavigatorTree(treeViewer, selection);
}
Also used : TreeViewer(org.eclipse.jface.viewers.TreeViewer) ICubridNode(com.cubrid.common.ui.spi.model.ICubridNode) AddMonitorInstanceDlg(com.cubrid.cubridmanager.ui.monitoring.dialog.AddMonitorInstanceDlg)

Aggregations

ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)2 AddMonitorInstanceDlg (com.cubrid.cubridmanager.ui.monitoring.dialog.AddMonitorInstanceDlg)2 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)1 CubridStatusMonitorInstance (com.cubrid.cubridmanager.ui.monitoring.editor.internal.CubridStatusMonitorInstance)1 StatusMonInstanceData (com.cubrid.cubridmanager.ui.monitoring.editor.internal.StatusMonInstanceData)1 TreeViewer (org.eclipse.jface.viewers.TreeViewer)1