瀏覽代碼

fix createnewjob

Kaoru FUZITA 9 年之前
父節點
當前提交
b24e8501d8

+ 7 - 0
src/main/java/org/codelibs/fess/Constants.java

@@ -317,6 +317,13 @@ public class Constants extends CoreLibConstants {
     public static final String[] PAGER_CONVERSION_RULE = { "allRecordCount", "pageSize", "currentPageNumber", "allPageCount",
             "existPrePage", "existNextPage" };
 
+    // crawler types
+    public static final String WEB_CRAWLER_TYPE = "web_crawling";
+
+    public static final String FILE_CRAWLER_TYPE = "file_crawling";
+
+    public static final String DATA_CRAWLER_TYPE = "data_crawling";
+
     // TODO remove searchParams
     public static final String[] COMMON_CONVERSION_RULE = new String[] { "searchParams", "crudMode", "createdBy", "createdTime",
             "updatedBy", "updatedTime" };

+ 9 - 1
src/main/java/org/codelibs/fess/app/web/admin/scheduler/AdminSchedulerAction.java

@@ -128,9 +128,17 @@ public class AdminSchedulerAction extends FessAdminAction {
                         scheduledJobForm.name =
                                 ComponentUtil.getMessageManager().getMessage(LaRequestUtil.getRequest().getLocale(),
                                         "labels." + type + "_job_title", name);
+                        String[] ids = new String[] { "", "", "" };
+                        if (Constants.WEB_CRAWLER_TYPE.equals(type)) {
+                            ids[0] = "\"" + id + "\"";
+                        } else if (Constants.FILE_CRAWLER_TYPE.equals(type)) {
+                            ids[1] = "\"" + id + "\"";
+                        } else if (Constants.DATA_CRAWLER_TYPE.equals(type)) {
+                            ids[2] = "\"" + id + "\"";
+                        }
                         scheduledJobForm.scriptData =
                                 ComponentUtil.getMessageManager().getMessage(LaRequestUtil.getRequest().getLocale(),
-                                        "labels.scheduledjob_script_template", "\"" + id + "\"", "", "");
+                                        "labels.scheduledjob_script_template", ids[0], ids[1], ids[2]);
                     });
                 });
     }