fix createnewjob

This commit is contained in:
Kaoru FUZITA 2015-11-24 16:44:23 +09:00
parent 55f70f4062
commit b24e8501d8
2 changed files with 16 additions and 1 deletions

View file

@ -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" };

View file

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