use of com.cubrid.cubridmanager.core.logs.task.DelManagerLogTask in project cubrid-manager by CUBRID.
the class RemoveAllManagerLogAction method run.
/**
* Remove all manager logs
*/
public void run() {
if (!CommonUITool.openConfirmBox(Messages.warningRemoveManagerLog)) {
return;
}
Object[] selected = this.getSelectedObj();
String sendStr;
if (((DefaultCubridNode) selected[0]).getId().indexOf("Access log") >= 0) {
sendStr = "deleteaccesslog";
} else {
sendStr = "deleteerrorlog";
}
DelManagerLogTask delAllLogTask = new DelManagerLogTask(((DefaultCubridNode) selected[0]).getServer().getServerInfo(), sendStr);
TaskExecutor taskExecutor = new CommonTaskExec(Messages.removeLogTaskName);
taskExecutor.addTask(delAllLogTask);
new ExecTaskWithProgress(taskExecutor).busyCursorWhile();
if (taskExecutor.isSuccess()) {
refreshLogEditor((ICubridNode) selected[0]);
CommonUITool.openInformationBox(Messages.msgSuccess, Messages.msgDeleteAllLog);
}
}
Aggregations