Search in sources :

Example 1 with AnalyzeCasLogTopResultInfo

use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.

the class GetCasLogTopResultTask method getAnalyzeCasLogTopResultList.

/**
	 * get result from the response
	 * 
	 * @return AnalyzeCasLogTopResultInfo
	 */
public AnalyzeCasLogTopResultInfo getAnalyzeCasLogTopResultList() {
    TreeNode response = getResponse();
    if (response == null || (this.getErrorMsg() != null && getErrorMsg().trim().length() > 0)) {
        return null;
    }
    AnalyzeCasLogTopResultInfo analyzeCasLogTopResultList = new AnalyzeCasLogTopResultInfo();
    if (response != null && response.getValue("logstringlist") != null && response.getValue("logstringlist").equals("start")) {
        String[] results = response.getValues("logstring");
        for (int j = 0; j < results.length; j++) {
            String str = results[j];
            analyzeCasLogTopResultList.addLogString(str);
        }
    }
    return analyzeCasLogTopResultList;
}
Also used : TreeNode(com.cubrid.cubridmanager.core.common.socket.TreeNode) AnalyzeCasLogTopResultInfo(com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo)

Example 2 with AnalyzeCasLogTopResultInfo

use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.

the class LogsModelTest method testModelAnalyzeCasLogTopResultInfo.

public void testModelAnalyzeCasLogTopResultInfo() {
    AnalyzeCasLogTopResultInfo bean = new AnalyzeCasLogTopResultInfo();
    assertEquals(bean.getTaskName(), "getcaslogtopresult");
    bean.addLogString("a");
    assertEquals(bean.getLogString().get(0), "a");
}
Also used : AnalyzeCasLogTopResultInfo(com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo)

Example 3 with AnalyzeCasLogTopResultInfo

use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.

the class ManagerLogInfoListTest method testModelAnalyzeCasLogTopResultInfo.

public void testModelAnalyzeCasLogTopResultInfo() {
    AnalyzeCasLogTopResultInfo bean = new AnalyzeCasLogTopResultInfo();
    assertEquals(bean.getTaskName(), "getcaslogtopresult");
    bean.addLogString("a");
    assertEquals(bean.getLogString().get(0), "a");
}
Also used : AnalyzeCasLogTopResultInfo(com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo)

Example 4 with AnalyzeCasLogTopResultInfo

use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.

the class LogsModelTest method testModelAnalyzeCasLogTopResultInfo.

public void testModelAnalyzeCasLogTopResultInfo() {
    AnalyzeCasLogTopResultInfo bean = new AnalyzeCasLogTopResultInfo();
    assertEquals(bean.getTaskName(), "getcaslogtopresult");
    bean.addLogString("a");
    bean.addLogString("b");
    assertEquals(bean.getLogString().get(0), "a");
}
Also used : AnalyzeCasLogTopResultInfo(com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo)

Example 5 with AnalyzeCasLogTopResultInfo

use of com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo in project cubrid-manager by CUBRID.

the class SqlLogAnalyzeResultDialog method connect.

/**
	 * each page of log connect
	 *
	 * @param qindex String
	 * @param queryString StringBuffer
	 * @return queryString
	 */
public StringBuilder connect(String qindex, StringBuilder queryString) {
    final GetCasLogTopResultTask task = new GetCasLogTopResultTask(node.getServer().getServerInfo());
    task.setFileName(resultFile);
    task.setQindex(qindex);
    TaskExecutor taskExecutor = new CommonTaskExec(Messages.loadLogTaskName);
    taskExecutor.addTask(task);
    new ExecTaskWithProgress(taskExecutor).exec();
    if (taskExecutor.isSuccess() && task.getAnalyzeCasLogTopResultList() != null) {
        AnalyzeCasLogTopResultInfo resultInfo = (AnalyzeCasLogTopResultInfo) task.getAnalyzeCasLogTopResultList();
        if (resultInfo != null && resultInfo.getLogString() != null) {
            for (String logString : resultInfo.getLogString()) {
                queryString.append(logString + "\n");
            }
        }
    }
    return queryString;
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) TaskExecutor(com.cubrid.common.ui.spi.progress.TaskExecutor) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) AnalyzeCasLogTopResultInfo(com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo) GetCasLogTopResultTask(com.cubrid.cubridmanager.core.logs.task.GetCasLogTopResultTask)

Aggregations

AnalyzeCasLogTopResultInfo (com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo)5 CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)1 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)1 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)1 TreeNode (com.cubrid.cubridmanager.core.common.socket.TreeNode)1 GetCasLogTopResultTask (com.cubrid.cubridmanager.core.logs.task.GetCasLogTopResultTask)1