add @Execute and fix typo

This commit is contained in:
Shinsuke Sugaya 2015-10-04 07:17:05 +09:00
parent f777365267
commit 9dd9594116
3 changed files with 7 additions and 7 deletions

View file

@ -135,7 +135,7 @@ public class ScheduledJobService implements Serializable {
jobScheduler.register(scheduledJob);
}
public List<ScheduledJob> getCrawloerJobList() {
public List<ScheduledJob> getCrawlerJobList() {
return scheduledJobBhv.selectList(cb -> {
cb.query().setCrawler_Equal(Constants.T);
cb.query().addOrderBy_SortOrder_Asc();

View file

@ -70,8 +70,8 @@ public class AdminSystemAction extends FessAdminAction {
// Index
// ==============
@Execute
public HtmlResponse index(final SystemForm form) {
return asHtml(path_AdminSystem_IndexJsp).renderWith(data -> {
public HtmlResponse index() {
return asHtml(path_AdminSystem_IndexJsp).useForm(SystemForm.class).renderWith(data -> {
data.register("clusterName", fessEsClient.getClusterName());
data.register("clusterStatus", fessEsClient.getStatus());
data.register("crawlerRunning", isCrawlerRunning());
@ -80,10 +80,10 @@ public class AdminSystemAction extends FessAdminAction {
}
@Token(save = false, validate = true)
// @Execute(validator = true, input = "index")
@Execute
public HtmlResponse start(final SystemForm form) {
if (!jobHelper.isCrawlProcessRunning()) {
final List<ScheduledJob> scheduledJobList = scheduledJobService.getCrawloerJobList();
final List<ScheduledJob> scheduledJobList = scheduledJobService.getCrawlerJobList();
for (final ScheduledJob scheduledJob : scheduledJobList) {
scheduledJob.start();
}
@ -97,7 +97,7 @@ public class AdminSystemAction extends FessAdminAction {
}
@Token(save = false, validate = true)
//@Execute(validator = true, input = "index")
@Execute
public HtmlResponse stop(final SystemForm form) {
if (jobHelper.isCrawlProcessRunning()) {
if (StringUtil.isNotBlank(form.sessionId)) {

View file

@ -280,7 +280,7 @@ public class AdminWizardAction extends FessAdminAction {
@Execute
public HtmlResponse startCrawling(final StartCrawlingForm form) {
if (!jobHelper.isCrawlProcessRunning()) {
final List<ScheduledJob> scheduledJobList = scheduledJobService.getCrawloerJobList();
final List<ScheduledJob> scheduledJobList = scheduledJobService.getCrawlerJobList();
for (final ScheduledJob scheduledJob : scheduledJobList) {
new Thread(() -> new TriggeredJob().execute(scheduledJob)).start();
}