Search in sources :

Example 1 with HistoryFileHelp

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

the class HostSystemMonitorViewPart method init.

/**
	 * @param site IViewSite the view site
	 * @throws PartInitException if this view was not initialized successfully
	 * @see com.cubrid.common.ui.spi.part.CubridViewPart#init(org.eclipse.ui.IViewSite)
	 */
public void init(IViewSite site) throws PartInitException {
    super.init(site);
    hostStatDataProxy = new HostStatDataProxy();
    serverInfo = cubridNode.getServer().getServerInfo();
    if (serverInfo != null) {
        String hostAddress = serverInfo.getHostAddress();
        int monPort = serverInfo.getHostMonPort();
        historyFileName = HistoryComposite.HOST_SYSMON_HISTORY_FILE_PREFIX + hostAddress + "_" + monPort + HistoryComposite.HISTORY_SUFFIX;
        IPath histPath = CubridManagerCorePlugin.getDefault().getStateLocation();
        historyPath = histPath.toOSString() + File.separator + historyFileName;
        historyFileHelp = new HistoryFileHelp();
        historyFileHelp.setHistoryPath(historyPath);
        List<String> typeLst = new ArrayList<String>();
        for (HostStatEnum hostEnum : HostStatEnum.values()) {
            typeLst.add(hostEnum.getName());
        }
        typeNames = typeLst.toArray(new String[typeLst.size()]);
    }
}
Also used : HostStatEnum(com.cubrid.cubridmanager.core.monitoring.model.HostStatEnum) IPath(org.eclipse.core.runtime.IPath) ArrayList(java.util.ArrayList) HostStatDataProxy(com.cubrid.cubridmanager.core.monitoring.model.HostStatDataProxy) HistoryFileHelp(com.cubrid.cubridmanager.ui.mondashboard.editor.HistoryFileHelp)

Example 2 with HistoryFileHelp

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

the class DbSystemMonitorHistoryViewPart method init.

/**
	 *
	 * @see org.eclipse.ui.IViewPart#init(org.eclipse.ui.IViewSite)
	 * @param site The IViewSite
	 * @exception PartInitException if this view was not initialized
	 *            successfully
	 */
public void init(IViewSite site) throws PartInitException {
    super.init(site);
    cpuValueMap = new TreeMap<String, String>();
    memoryValueMap = new TreeMap<String, String>();
    setCpuSeriesKey(new String[] { DbProcStatEnum.USER_PERCENT.name(), DbProcStatEnum.KERNEL_PERCENT.name() });
    setMemorySeriesKey(new String[] { DbProcStatEnum.MEM_PHYSICAL.name() });
    serverInfo = cubridNode.getServer().getServerInfo();
    String hostAddress = serverInfo.getHostAddress();
    int monPort = serverInfo.getHostMonPort();
    historyFileName = HistoryComposite.DB_SYSMON_HISTORY_FILE_PREFIX + dbName + "@" + hostAddress + "_" + monPort + HistoryComposite.HISTORY_SUFFIX;
    IPath path = CubridManagerCorePlugin.getDefault().getStateLocation();
    historyPath = path.toOSString() + File.separator + historyFileName;
    historyFileHelp = new HistoryFileHelp();
    historyFileHelp.setHistoryPath(historyPath);
}
Also used : IPath(org.eclipse.core.runtime.IPath) HistoryFileHelp(com.cubrid.cubridmanager.ui.mondashboard.editor.HistoryFileHelp)

Example 3 with HistoryFileHelp

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

the class DbSystemMonitorViewPart method init.

/**
	 * @param site IViewSite the view site
	 * @throws PartInitException if this view was not initialized successfully
	 * @see com.cubrid.common.ui.spi.part.CubridViewPart#init(org.eclipse.ui.IViewSite)
	 */
public void init(IViewSite site) throws PartInitException {
    super.init(site);
    dbProcStatProxy = new DbProcStatProxy();
    hostStatDataProxy = new HostStatDataProxy();
    serverInfo = cubridNode.getServer().getServerInfo();
    if (serverInfo != null) {
        String hostAddress = serverInfo.getHostAddress();
        int monPort = serverInfo.getHostMonPort();
        historyFileName = HistoryComposite.DB_SYSMON_HISTORY_FILE_PREFIX + dbName + "@" + hostAddress + "_" + monPort + HistoryComposite.HISTORY_SUFFIX;
        IPath histPath = CubridManagerCorePlugin.getDefault().getStateLocation();
        historyPath = histPath.toOSString() + File.separator + historyFileName;
        historyFileHelp = new HistoryFileHelp();
        historyFileHelp.setHistoryPath(historyPath);
        List<String> typeLst = new ArrayList<String>();
        for (DbProcStatEnum dbProcEnum : DbProcStatEnum.values()) {
            typeLst.add(dbProcEnum.getName());
        }
        typeNames = typeLst.toArray(new String[typeLst.size()]);
    }
}
Also used : DbProcStatEnum(com.cubrid.cubridmanager.core.monitoring.model.DbProcStatEnum) IPath(org.eclipse.core.runtime.IPath) DbProcStatProxy(com.cubrid.cubridmanager.core.monitoring.model.DbProcStatProxy) ArrayList(java.util.ArrayList) HostStatDataProxy(com.cubrid.cubridmanager.core.monitoring.model.HostStatDataProxy) HistoryFileHelp(com.cubrid.cubridmanager.ui.mondashboard.editor.HistoryFileHelp)

Example 4 with HistoryFileHelp

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

the class HostSystemMonitorHistoryViewPart method init.

/**
	 *
	 * @see org.eclipse.ui.IViewPart#init(org.eclipse.ui.IViewSite)
	 * @param site The IViewSite
	 * @exception PartInitException if this view was not initialized
	 *            successfully
	 */
public void init(IViewSite site) throws PartInitException {
    super.init(site);
    cpuValueMap = new TreeMap<String, String>();
    iowaitValueMap = new TreeMap<String, String>();
    memoryValueMap = new TreeMap<String, String>();
    setCpuSeriesKey(new String[] { HostStatEnum.USER.name(), HostStatEnum.KERNEL.name() });
    setIowaitSeriesKey(new String[] { HostStatEnum.IOWAIT.name() });
    setMemorySeriesKey(new String[] { HostStatEnum.MEMPHY_USED.name() });
    ServerInfo serverInfo = cubridNode.getServer().getServerInfo();
    String hostAddress = serverInfo.getHostAddress();
    int monPort = serverInfo.getHostMonPort();
    historyFileName = HistoryComposite.HOST_SYSMON_HISTORY_FILE_PREFIX + hostAddress + "_" + monPort + HistoryComposite.HISTORY_SUFFIX;
    IPath path = CubridManagerCorePlugin.getDefault().getStateLocation();
    historyPath = path.toOSString() + File.separator + historyFileName;
    historyFileHelp = new HistoryFileHelp();
    historyFileHelp.setHistoryPath(historyPath);
}
Also used : IPath(org.eclipse.core.runtime.IPath) ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) HistoryFileHelp(com.cubrid.cubridmanager.ui.mondashboard.editor.HistoryFileHelp)

Aggregations

HistoryFileHelp (com.cubrid.cubridmanager.ui.mondashboard.editor.HistoryFileHelp)4 IPath (org.eclipse.core.runtime.IPath)4 HostStatDataProxy (com.cubrid.cubridmanager.core.monitoring.model.HostStatDataProxy)2 ArrayList (java.util.ArrayList)2 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)1 DbProcStatEnum (com.cubrid.cubridmanager.core.monitoring.model.DbProcStatEnum)1 DbProcStatProxy (com.cubrid.cubridmanager.core.monitoring.model.DbProcStatProxy)1 HostStatEnum (com.cubrid.cubridmanager.core.monitoring.model.HostStatEnum)1