fix #89
This commit is contained in:
parent
04d105e64a
commit
9fbe1eac44
5 changed files with 51 additions and 0 deletions
|
@ -16,11 +16,18 @@
|
|||
|
||||
package jp.sf.fess.action.admin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import jp.sf.fess.Constants;
|
||||
import jp.sf.fess.crud.action.admin.BsJobLogAction;
|
||||
import jp.sf.fess.crud.util.SAStrutsUtil;
|
||||
import jp.sf.fess.helper.SystemHelper;
|
||||
|
||||
import org.seasar.struts.annotation.Execute;
|
||||
|
||||
public class JobLogAction extends BsJobLogAction {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -31,4 +38,14 @@ public class JobLogAction extends BsJobLogAction {
|
|||
public String getHelpLink() {
|
||||
return systemHelper.getHelpLink("jobLog");
|
||||
}
|
||||
|
||||
@Execute(validator = false, input = "error.jsp")
|
||||
public String deleteall() {
|
||||
final List<String> jobStatusList = new ArrayList<String>();
|
||||
jobStatusList.add(Constants.OK);
|
||||
jobStatusList.add(Constants.FAIL);
|
||||
jobLogService.deleteByJobStatus(jobStatusList);
|
||||
SAStrutsUtil.addSessionMessage("success.joblog_delete_all");
|
||||
return displayList(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ package jp.sf.fess.service;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jp.sf.fess.crud.service.BsJobLogService;
|
||||
|
@ -78,4 +79,11 @@ public class JobLogService extends BsJobLogService implements Serializable {
|
|||
new DeleteOption<JobLogCB>().allowNonQueryDelete());
|
||||
}
|
||||
|
||||
public void deleteByJobStatus(final List<String> jobStatusList) {
|
||||
final JobLogCB cb = new JobLogCB();
|
||||
cb.query().setJobStatus_InScope(jobStatusList);
|
||||
jobLogBhv.varyingQueryDelete(cb,
|
||||
new DeleteOption<JobLogCB>().allowNonQueryDelete());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ success.delete_file=Deleted {0} file.
|
|||
success.user_info_delete_all=Deleted user information.
|
||||
success.job_started=Started job {0}.
|
||||
success.job_stopped=Stopped job {0}.
|
||||
success.joblog_delete_all=Deleted job logs.
|
||||
|
||||
# labels
|
||||
labels.authRealm=Realm
|
||||
|
@ -1334,6 +1335,8 @@ labels.joblog_startTime=Start Time
|
|||
labels.joblog_target=Target
|
||||
labels.joblog_title_confirm=Confirm
|
||||
labels.joblog_title_details=Details
|
||||
labels.joblog_delete_all_link=Delete All
|
||||
labels.joblog_delete_all_confirmation=Do you want to delete all?
|
||||
|
||||
# dict
|
||||
labels.dict_configuration=Dictionary List
|
||||
|
|
|
@ -104,6 +104,7 @@ success.delete_file=\u30d5\u30a1\u30a4\u30eb {0} \u3092\u524a\u9664\u3057\u307e\
|
|||
success.user_info_delete_all= \u5229\u7528\u8005\u60c5\u5831\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002
|
||||
success.job_started=\u30b8\u30e7\u30d6 {0} \u3092\u958b\u59cb\u3057\u307e\u3057\u305f\u3002
|
||||
success.job_stopped=\u30b8\u30e7\u30d6 {0} \u3092\u505c\u6b62\u3057\u307e\u3057\u305f\u3002
|
||||
success.joblog_delete_all=\u30b8\u30e7\u30d6\u30ed\u30b0\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002
|
||||
|
||||
# labels
|
||||
labels.authRealm=\u8a8d\u8a3c\u30ec\u30eb\u30e0
|
||||
|
@ -1332,6 +1333,8 @@ labels.joblog_startTime=\u958b\u59cb\u6642\u523b
|
|||
labels.joblog_target=\u5bfe\u8c61
|
||||
labels.joblog_title_confirm=\u78ba\u8a8d
|
||||
labels.joblog_title_details=\u8a73\u7d30
|
||||
labels.joblog_delete_all_link=\u3059\u3079\u3066\u524a\u9664
|
||||
labels.joblog_delete_all_confirmation=\u524a\u9664\u3057\u307e\u3059\u304b?
|
||||
|
||||
# dict
|
||||
labels.dict_configuration=\u8f9e\u66f8\u4e00\u89a7
|
||||
|
|
|
@ -69,6 +69,26 @@
|
|||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="span12 center">
|
||||
<script>
|
||||
<!--
|
||||
function confirmToDeleteAll() {
|
||||
if (confirm('<bean:message key="labels.joblog_delete_all_confirmation"/>')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
<s:link href="deleteall" onclick="return confirmToDeleteAll();"
|
||||
styleClass="btn">
|
||||
<bean:message key="labels.joblog_delete_all_link" />
|
||||
</s:link>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- Page Navigation: BEGIN --%>
|
||||
<div class="row center">
|
||||
<div class="pagination">
|
||||
|
|
Loading…
Add table
Reference in a new issue