use of com.cubrid.cubridmanager.core.logs.model.LogContentInfo in project cubrid-manager by CUBRID.
the class CasRunnerResultViewDialog method connect.
/**
* each page of log connect
*
*/
public void connect() {
final GetLogListTask task = new GetLogListTask(selection.getServer().getServerInfo());
task.setPath(path + "." + String.valueOf(currentResultFileIndex - 1));
task.setDbName(dbName);
task.setStart(Long.toString(lineStart));
task.setEnd(Long.toString(lineEnd));
task.execute();
TaskExecutor taskExecutor = new CommonTaskExec(Messages.loadLogTaskName);
taskExecutor.addTask(task);
new ExecTaskWithProgress(taskExecutor).exec();
if (taskExecutor.isSuccess()) {
LogContentInfo logContentInfo = (LogContentInfo) task.getLogContent();
this.setinfo(logContentInfo, selection);
}
}
use of com.cubrid.cubridmanager.core.logs.model.LogContentInfo in project cubrid-manager by CUBRID.
the class ResetAdminLogAction method refreshLogEditor.
/**
*
* Refresh the log editor
*
* @param node ICubridNode
*/
private void refreshLogEditor(ICubridNode node) {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage activePage = window.getActivePage();
IEditorPart editor = activePage.findEditor(node);
if (null != editor) {
LogInfo logInfo = (LogInfo) node.getAdapter(LogInfo.class);
TaskExecutor taskExecutor = new CommonTaskExec(Messages.viewLogJobName);
GetLogListTask task = new GetLogListTask(node.getServer().getServerInfo());
task.setPath(logInfo.getPath());
task.setStart("1");
task.setEnd("100");
taskExecutor.addTask(task);
new ExecTaskWithProgress(taskExecutor).busyCursorWhile();
LogContentInfo logContentInfo = (LogContentInfo) task.getLogContent();
try {
editor = window.getActivePage().openEditor(node, LogEditorPart.ID);
((LogEditorPart) editor).setTableInfo(logContentInfo, true);
} catch (PartInitException e) {
LOGGER.error(e.getMessage(), e);
}
}
}
use of com.cubrid.cubridmanager.core.logs.model.LogContentInfo in project cubrid-manager by CUBRID.
the class TimeSetAction method run.
/**
* Open dialog
*/
public void run() {
TimeSetDialog timeSetDialog = new TimeSetDialog(getShell());
timeSetDialog.create();
timeSetDialog.getShell().setSize(580, 275);
if (timeSetDialog.open() == Dialog.OK) {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window == null) {
return;
}
Object[] obj = this.getSelectedObj();
if (!isSupported(obj[0])) {
setEnabled(false);
return;
}
ICubridNode node = (ICubridNode) obj[0];
LogInfo logInfo = (LogInfo) node.getAdapter(LogInfo.class);
GetLogListTask task = new GetLogListTask(node.getServer().getServerInfo());
task.setPath(logInfo.getPath());
task.setStart("1");
task.setEnd("100");
TaskExecutor taskExcutor = new CommonTaskExec(Messages.loadLogTaskName);
taskExcutor.addTask(task);
new ExecTaskWithProgress(taskExcutor).exec();
if (!taskExcutor.isSuccess()) {
return;
}
LogContentInfo logContentInfo = (LogContentInfo) task.getLogContent();
IEditorPart editor;
try {
editor = window.getActivePage().openEditor(node, LogEditorPart.ID);
((LogEditorPart) editor).setTableInfo(logContentInfo, true);
} catch (PartInitException e) {
LOGGER.error(e.getMessage(), e);
}
}
}
use of com.cubrid.cubridmanager.core.logs.model.LogContentInfo in project cubrid-manager by CUBRID.
the class LogsModelTest method testModelLogContentInfo.
public void testModelLogContentInfo() {
LogContentInfo bean = new LogContentInfo();
bean.setPath("path");
assertEquals(bean.getPath(), "path");
bean.setStart("start");
assertEquals(bean.getStart(), "start");
bean.setEnd("end");
assertEquals(bean.getEnd(), "end");
bean.setTotal("total");
assertEquals(bean.getTotal(), "total");
bean.getTaskName();
bean.getLine();
bean.addLine("");
}
use of com.cubrid.cubridmanager.core.logs.model.LogContentInfo in project cubrid-manager by CUBRID.
the class LogsModelTest method testModelLogContentInfo.
public void testModelLogContentInfo() {
LogContentInfo bean = new LogContentInfo();
bean.setPath("path");
assertEquals(bean.getPath(), "path");
bean.setStart("start");
assertEquals(bean.getStart(), "start");
bean.setEnd("end");
assertEquals(bean.getEnd(), "end");
bean.setTotal("total");
assertEquals(bean.getTotal(), "total");
bean.getTaskName();
bean.getLine();
bean.addLine("");
}
Aggregations