浏览代码

add @Execute and fix typo

Shinsuke Sugaya 9 年之前
父节点
当前提交
9dd9594116

+ 1 - 1
src/main/java/org/codelibs/fess/app/service/ScheduledJobService.java

@@ -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();

+ 5 - 5
src/main/java/org/codelibs/fess/app/web/admin/system/AdminSystemAction.java

@@ -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)) {

+ 1 - 1
src/main/java/org/codelibs/fess/app/web/admin/wizard/AdminWizardAction.java

@@ -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();
             }