This commit is contained in:
shatake 2014-10-22 12:32:54 +09:00
parent 37bd1a3cd8
commit 42091b4588
4 changed files with 10 additions and 43 deletions

View file

@ -32,12 +32,8 @@ import org.codelibs.core.util.DynamicProperties;
import org.codelibs.core.util.StringUtil;
import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SystemInfoAction implements Serializable {
private static final Logger logger = LoggerFactory
.getLogger(CrawlAction.class);
private static final long serialVersionUID = 1L;
@ -79,45 +75,6 @@ public class SystemInfoAction implements Serializable {
propItems.add(createItem(entry.getKey(), entry.getValue()));
}
if (crawlerProperties.isEmpty()) {
crawlerProperties.setProperty(Constants.DIFF_CRAWLING_PROPERTY, Constants.TRUE);
crawlerProperties.setProperty(Constants.USE_ACL_AS_ROLE, Constants.FALSE);
crawlerProperties.setProperty(Constants.SERVER_ROTATION_PROPERTY, Constants.FALSE);
crawlerProperties.setProperty(Constants.DAY_FOR_CLEANUP_PROPERTY, "1");
crawlerProperties.setProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5");
crawlerProperties.setProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE);
crawlerProperties.setProperty(Constants.USER_INFO_PROPERTY, Constants.TRUE);
crawlerProperties.setProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE);
crawlerProperties.setProperty(Constants.WEB_API_XML_PROPERTY, Constants.TRUE);
crawlerProperties.setProperty(Constants.WEB_API_JSON_PROPERTY, Constants.TRUE);
crawlerProperties.setProperty(Constants.DEFAULT_LABEL_VALUE_PROPERTY, StringUtil.EMPTY);
crawlerProperties.setProperty(Constants.APPEND_QUERY_PARAMETER_PROPERTY, Constants.FALSE);
crawlerProperties.setProperty(Constants.SUPPORTED_SEARCH_FEATURE_PROPERTY,
Constants.SUPPORTED_SEARCH_WEB);
crawlerProperties.setProperty(Constants.IGNORE_FAILURE_TYPE_PROPERTY,
Constants.DEFAULT_IGNORE_FAILURE_TYPE);
crawlerProperties.setProperty(Constants.FAILURE_COUNT_THRESHOLD_PROPERTY,
Constants.DEFAULT_FAILURE_COUNT);
crawlerProperties.setProperty(Constants.WEB_API_HOT_SEARCH_WORD_PROPERTY, Constants.TRUE);
crawlerProperties.setProperty(Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8);
crawlerProperties.setProperty(Constants.PURGE_SEARCH_LOG_DAY_PROPERTY,
Constants.DEFAULT_PURGE_DAY);
crawlerProperties.setProperty(Constants.PURGE_JOB_LOG_DAY_PROPERTY,
Constants.DEFAULT_PURGE_DAY);
crawlerProperties.setProperty(Constants.PURGE_USER_INFO_DAY_PROPERTY,
Constants.DEFAULT_PURGE_DAY);
crawlerProperties.setProperty(Constants.PURGE_BY_BOTS_PROPERTY,
Constants.DEFAULT_PURGE_BY_BOTS);
crawlerProperties.setProperty(Constants.NOTIFICATION_TO_PROPERTY, StringUtil.EMPTY);
crawlerProperties.setProperty(Constants.SUGGEST_SEARCH_LOG_PROPERTY, Constants.TRUE);
crawlerProperties.setProperty(Constants.PURGE_SUGGEST_SEARCH_LOG_DAY_PROPERTY, "30");
try {
crawlerProperties.store();
} catch (final Exception e) {
logger.error("Failed to initialize crawler parameters.", e);
}
}
for (final Map.Entry<Object, Object> entry : crawlerProperties
.entrySet()) {
fessPropItems.add(createItem(entry.getKey(), entry.getValue()));

View file

@ -1141,6 +1141,7 @@ labels.system_info_env_title=Env Properties
labels.system_info_prop_title=System Properties
labels.system_info_fess_prop_title=Fess Properties
labels.system_info_bug_report_title=Properties for Bug Report
labels.system_info_crawler_properties_does_not_exist=crawler.properties does not exist. Default values are applied.
# view/admin/fileAuthentication/index.jsp
labels.file_authentication_configuration=File Authentication

View file

@ -1141,6 +1141,7 @@ labels.system_info_env_title=\u74b0\u5883\u5909\u6570\u30d7\u30ed\u30d1\u30c6\u3
labels.system_info_prop_title=\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3
labels.system_info_fess_prop_title=Fess \u30d7\u30ed\u30d1\u30c6\u30a3
labels.system_info_bug_report_title=\u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u7528
labels.system_info_crawler_properties_does_not_exist=crawler.properties\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304c\u9069\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002
# view/admin/fileAuthentication/index.jsp
labels.file_authentication_configuration=\u30d5\u30a1\u30a4\u30eb\u8a8d\u8a3c

View file

@ -62,11 +62,19 @@
<table>
<tbody>
<tr>
<c:if test="${empty fessPropItems}">
<td><textarea id="fessPropData"
style="height: 300px;" class="xxlarge">
<bean:message key="labels.system_info_crawler_properties_does_not_exist" />
</textarea></td>
</c:if>
<c:if test="${!empty fessPropItems}">
<td><textarea id="fessPropData"
style="height: 300px;" class="xxlarge">
<c:forEach var="item" items="${fessPropItems}">${f:h(item.label)}=${f:h(item.value)}
</c:forEach>
</textarea></td>
</c:if>
</tr>
</tbody>
</table>