Search in sources :

Example 56 with HostNode

use of com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode in project cubrid-manager by CUBRID.

the class HostMonitorPart method createFigure.

/**
	 * create a host figure
	 * 
	 * @return a host figure
	 */
protected IFigure createFigure() {
    HostMonitorFigure hostMonFigure = new HostMonitorFigure();
    HostNode hn = (HostNode) getModel();
    hostMonFigure.setStatus(true, hn.isConnected(), hn.getErrorMsg(), hn.hasNewErrorMsg());
    hostMonFigure.setTitle(hn.getName());
    hostMonFigure.setHint(new StringBuffer(" ").append(hn.getUserName()).append("@").append(hn.getIp()).append(":").append(hn.getPort()).append(" ").toString());
    return hostMonFigure;
}
Also used : HostMonitorFigure(com.cubrid.cubridmanager.ui.mondashboard.editor.figure.HostMonitorFigure) HostNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode)

Example 57 with HostNode

use of com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode in project cubrid-manager by CUBRID.

the class HostMonitorPart method refreshVisuals.

/**
	 * Refreshes this EditPart's <i>visuals</i>. This method is called by
	 * {@link #refresh()}, and may also be called in response to notifications
	 * from the model.
	 */
protected void refreshVisuals() {
    HostMonitorFigure fg = (HostMonitorFigure) this.getFigure();
    HostNode model = (HostNode) getModel();
    HAHostStatusInfo hostStatusInfo = model.getHostStatusInfo();
    fg.setTitle(model.getName());
    fg.setStatus(true, model.isConnected(), model.getErrorMsg(), model.hasNewErrorMsg());
    if (hostStatusInfo != null) {
        fg.setHostCpuUsage(hostStatusInfo.getCpuUsage());
        fg.setHostMemUsage(hostStatusInfo.getMemUsage());
        fg.setHostIO(hostStatusInfo.getIoWait());
    }
    super.refreshVisuals();
}
Also used : HAHostStatusInfo(com.cubrid.cubridmanager.core.mondashboard.model.HAHostStatusInfo) HostMonitorFigure(com.cubrid.cubridmanager.ui.mondashboard.editor.figure.HostMonitorFigure) HostNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode)

Aggregations

HostNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode)57 DatabaseNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.DatabaseNode)20 BrokerNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerNode)12 HostMonitorPart (com.cubrid.cubridmanager.ui.mondashboard.editor.parts.HostMonitorPart)10 DatabaseMonitorPart (com.cubrid.cubridmanager.ui.mondashboard.editor.parts.DatabaseMonitorPart)9 Dashboard (com.cubrid.cubridmanager.ui.mondashboard.editor.model.Dashboard)8 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)7 ArrayList (java.util.ArrayList)6 Point (org.eclipse.draw2d.geometry.Point)6 CMWizardDialog (com.cubrid.common.ui.spi.dialog.CMWizardDialog)4 AddHostAndDbWizard (com.cubrid.cubridmanager.ui.mondashboard.dialog.wizard.AddHostAndDbWizard)4 DataProvider (com.cubrid.cubridmanager.ui.mondashboard.editor.dispatcher.DataProvider)4 IViewPart (org.eclipse.ui.IViewPart)4 IViewReference (org.eclipse.ui.IViewReference)4 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)4 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)4 PartInitException (org.eclipse.ui.PartInitException)4 DefaultCubridNode (com.cubrid.common.ui.spi.model.DefaultCubridNode)3 ServerType (com.cubrid.cubridmanager.core.common.model.ServerType)3 HAHostStatusInfo (com.cubrid.cubridmanager.core.mondashboard.model.HAHostStatusInfo)3