diff --git a/src/main/java/org/codelibs/fess/app/pager/SearchLogPager.java b/src/main/java/org/codelibs/fess/app/pager/SearchLogPager.java new file mode 100644 index 000000000..430f5151d --- /dev/null +++ b/src/main/java/org/codelibs/fess/app/pager/SearchLogPager.java @@ -0,0 +1,138 @@ +/* + * Copyright 2012-2018 CodeLibs Project and the Others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.codelibs.fess.app.pager; + +import java.io.Serializable; +import java.util.List; + +import org.codelibs.fess.util.ComponentUtil; + +public class SearchLogPager implements Serializable { + + private static final long serialVersionUID = 1L; + + public static final String LOG_TYPE_SEARCH = "search"; + + public static final String LOG_TYPE_CLICK = "click"; + + public static final String LOG_TYPE_FAVORITE = "favorite"; + + public static final int DEFAULT_PAGE_SIZE = 20; + + public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1; + + private int allRecordCount; + + private int allPageCount; + + private boolean existPrePage; + + private boolean existNextPage; + + private List pageNumberList; + + private int pageSize; + + private int currentPageNumber; + + public String logType; + + public String id; + + public void clear() { + allRecordCount = 0; + allPageCount = 0; + existPrePage = false; + existNextPage = false; + pageSize = getDefaultPageSize(); + currentPageNumber = getDefaultCurrentPageNumber(); + + id = null; + logType = LOG_TYPE_SEARCH; + + } + + protected int getDefaultCurrentPageNumber() { + return DEFAULT_CURRENT_PAGE_NUMBER; + } + + public int getAllRecordCount() { + return allRecordCount; + } + + public void setAllRecordCount(final int allRecordCount) { + this.allRecordCount = allRecordCount; + } + + public int getAllPageCount() { + return allPageCount; + } + + public void setAllPageCount(final int allPageCount) { + this.allPageCount = allPageCount; + } + + public boolean isExistPrePage() { + return existPrePage; + } + + public void setExistPrePage(final boolean existPrePage) { + this.existPrePage = existPrePage; + } + + public boolean isExistNextPage() { + return existNextPage; + } + + public void setExistNextPage(final boolean existNextPage) { + this.existNextPage = existNextPage; + } + + public int getPageSize() { + if (pageSize <= 0) { + pageSize = getDefaultPageSize(); + } + return pageSize; + } + + public void setPageSize(final int pageSize) { + this.pageSize = pageSize; + } + + public int getCurrentPageNumber() { + if (currentPageNumber <= 0) { + currentPageNumber = getDefaultCurrentPageNumber(); + } + return currentPageNumber; + } + + public void setCurrentPageNumber(final int currentPageNumber) { + this.currentPageNumber = currentPageNumber; + } + + public List getPageNumberList() { + return pageNumberList; + } + + public void setPageNumberList(final List pageNumberList) { + this.pageNumberList = pageNumberList; + } + + protected int getDefaultPageSize() { + return ComponentUtil.getFessConfig().getPagingPageSizeAsInteger(); + } + +} diff --git a/src/main/java/org/codelibs/fess/app/service/SearchLogService.java b/src/main/java/org/codelibs/fess/app/service/SearchLogService.java index b3e9e109d..60913a72c 100644 --- a/src/main/java/org/codelibs/fess/app/service/SearchLogService.java +++ b/src/main/java/org/codelibs/fess/app/service/SearchLogService.java @@ -17,21 +17,64 @@ package org.codelibs.fess.app.service; import javax.annotation.Resource; +import org.codelibs.core.beans.util.BeanUtil; +import org.codelibs.fess.Constants; +import org.codelibs.fess.app.pager.SearchLogPager; +import org.codelibs.fess.es.log.exbhv.ClickLogBhv; +import org.codelibs.fess.es.log.exbhv.FavoriteLogBhv; import org.codelibs.fess.es.log.exbhv.SearchLogBhv; import org.codelibs.fess.helper.SystemHelper; +import org.codelibs.fess.mylasta.direction.FessConfig; +import org.dbflute.cbean.result.PagingResultBean; public class SearchLogService { @Resource private SearchLogBhv searchLogBhv; + @Resource + private ClickLogBhv clickLogBhv; + + @Resource + private FavoriteLogBhv favoriteLogBhv; + @Resource private SystemHelper systemHelper; + @Resource + protected FessConfig fessConfig; + public void deleteBefore(final int days) { searchLogBhv.queryDelete(cb -> { cb.query().setRequestedAt_LessEqual(systemHelper.getCurrentTimeAsLocalDateTime().minusDays(days)); }); } + public PagingResultBean getSearchLogList(SearchLogPager pager) { + final PagingResultBean list; + if (SearchLogPager.LOG_TYPE_CLICK.equalsIgnoreCase(pager.logType)) { + list = clickLogBhv.selectPage(cb -> { + cb.paging(pager.getPageSize(), pager.getCurrentPageNumber()); + cb.query().addOrderBy_RequestedAt_Desc(); + }); + } else if (SearchLogPager.LOG_TYPE_FAVORITE.equalsIgnoreCase(pager.logType)) { + list = favoriteLogBhv.selectPage(cb -> { + cb.paging(pager.getPageSize(), pager.getCurrentPageNumber()); + cb.query().addOrderBy_CreatedAt_Desc(); + }); + } else { + list = searchLogBhv.selectPage(cb -> { + cb.paging(pager.getPageSize(), pager.getCurrentPageNumber()); + cb.query().addOrderBy_RequestedAt_Desc(); + }); + } + + // update pager + BeanUtil.copyBeanToBean(list, pager, option -> option.include(Constants.PAGER_CONVERSION_RULE)); + pager.setPageNumberList(list.pageRange(op -> { + op.rangeSize(fessConfig.getPagingPageRangeSizeAsInteger()); + }).createPageNumberList()); + + return list; + } } diff --git a/src/main/java/org/codelibs/fess/app/web/admin/searchlog/AdminSearchlogAction.java b/src/main/java/org/codelibs/fess/app/web/admin/searchlog/AdminSearchlogAction.java new file mode 100644 index 000000000..173699a01 --- /dev/null +++ b/src/main/java/org/codelibs/fess/app/web/admin/searchlog/AdminSearchlogAction.java @@ -0,0 +1,179 @@ +/* + * Copyright 2012-2018 CodeLibs Project and the Others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.codelibs.fess.app.web.admin.searchlog; + +import javax.annotation.Resource; + +import org.codelibs.fess.Constants; +import org.codelibs.fess.app.pager.SearchLogPager; +import org.codelibs.fess.app.service.SearchLogService; +import org.codelibs.fess.app.web.base.FessAdminAction; +import org.codelibs.fess.util.RenderDataUtil; +import org.lastaflute.web.Execute; +import org.lastaflute.web.response.HtmlResponse; +import org.lastaflute.web.response.render.RenderData; +import org.lastaflute.web.ruts.process.ActionRuntime; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author shinsuke + */ +public class AdminSearchlogAction extends FessAdminAction { + + private static final Logger logger = LoggerFactory.getLogger(AdminSearchlogAction.class); + + // =================================================================================== + // Attribute + // ========= + @Resource + private SearchLogService searchLogService; + @Resource + private SearchLogPager searchLogPager; + + // =================================================================================== + // Hook + // ====== + @Override + protected void setupHtmlData(final ActionRuntime runtime) { + super.setupHtmlData(runtime); + runtime.registerData("helpLink", systemHelper.getHelpLink(fessConfig.getOnlineHelpNameSearchlog())); + } + + // =================================================================================== + // Search Execute + // ============== + @Execute + public HtmlResponse index() { + saveToken(); + return asListHtml(); + } + + @Execute + public HtmlResponse list(final Integer pageNumber, final SearchForm form) { + saveToken(); + searchLogPager.setCurrentPageNumber(pageNumber); + return asHtml(path_AdminSearchlog_AdminSearchlogJsp).renderWith(data -> { + searchPaging(data, form); + }); + } + + @Execute + public HtmlResponse search(final SearchForm form) { + saveToken(); + copyBeanToBean(form, searchLogPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE)); + return asHtml(path_AdminSearchlog_AdminSearchlogJsp).renderWith(data -> { + searchPaging(data, form); + }); + } + + @Execute + public HtmlResponse reset(final SearchForm form) { + saveToken(); + searchLogPager.clear(); + return asHtml(path_AdminSearchlog_AdminSearchlogJsp).renderWith(data -> { + searchPaging(data, form); + }); + } + + @Execute + public HtmlResponse back(final SearchForm form) { + saveToken(); + return asHtml(path_AdminSearchlog_AdminSearchlogJsp).renderWith(data -> { + searchPaging(data, form); + }); + } + + protected void searchPaging(final RenderData data, final SearchForm form) { + RenderDataUtil.register(data, "searchLogItems", searchLogService.getSearchLogList(searchLogPager)); // page navi + + // restore from pager + copyBeanToBean(searchLogPager, form, op -> op.include("logType")); + } + + // =================================================================================== + // Edit Execute + // ============ + + // ----------------------------------------------------- + // Details + // ------- + // @Execute + // public HtmlResponse details(final int crudMode, final String id) { + // verifyCrudMode(crudMode, CrudMode.DETAILS); + // saveToken(); + // return statsService.getCrawlingInfo(id).map(entity -> { + // return asHtml(path_AdminCrawlinginfo_AdminCrawlinginfoDetailsJsp).useForm(EditForm.class, op -> { + // op.setup(form -> { + // copyBeanToBean(entity, form, copyOp -> { + // copyOp.excludeNull(); + // }); + // form.crudMode = crudMode; + // }); + // }).renderWith(data -> { + // RenderDataUtil.register(data, "crawlingInfoParamItems", statsService.getCrawlingInfoParamList(id)); + // }); + // }).orElseGet(() -> { + // throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml()); + // return null; + // }); + // } + + // ----------------------------------------------------- + // Actually Crud + // ------------- + + @Execute + public HtmlResponse deleteall() { + verifyToken(() -> asListHtml()); + searchLogPager.clear(); + saveInfo(messages -> messages.addSuccessCrawlingInfoDeleteAll(GLOBAL)); + return redirect(getClass()); + } + + // =================================================================================== + // Assist Logic + // ============ + + // =================================================================================== + // Small Helper + // ============ + protected void verifyCrudMode(final int crudMode, final int expectedMode) { + if (crudMode != expectedMode) { + throwValidationError(messages -> { + messages.addErrorsCrudInvalidMode(GLOBAL, String.valueOf(expectedMode), String.valueOf(crudMode)); + }, () -> asListHtml()); + } + } + + // =================================================================================== + // JSP + // ========= + + private HtmlResponse asListHtml() { + return asHtml(path_AdminSearchlog_AdminSearchlogJsp).renderWith(data -> { + RenderDataUtil.register(data, "searchLogItems", searchLogService.getSearchLogList(searchLogPager)); // page navi + }).useForm(SearchForm.class, setup -> { + setup.setup(form -> { + copyBeanToBean(searchLogPager, form, op -> op.include("id")); + }); + }); + } + + private HtmlResponse asDetailsHtml() { + return asHtml(path_AdminCrawlinginfo_AdminCrawlinginfoDetailsJsp); + } +} diff --git a/src/main/java/org/codelibs/fess/app/web/admin/searchlog/EditForm.java b/src/main/java/org/codelibs/fess/app/web/admin/searchlog/EditForm.java new file mode 100644 index 000000000..3d490e736 --- /dev/null +++ b/src/main/java/org/codelibs/fess/app/web/admin/searchlog/EditForm.java @@ -0,0 +1,61 @@ +/* + * Copyright 2012-2018 CodeLibs Project and the Others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.codelibs.fess.app.web.admin.searchlog; + +import javax.validation.constraints.Size; + +import org.lastaflute.web.validation.Required; +import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure; + +/** + * @author shinsuke + * @author Shunji Makino + */ +public class EditForm { + + @ValidateTypeFailure + public int crudMode; + + @Required + @Size(max = 10) + public String logType; + + @Required + @Size(max = 1000) + public String id; + + @Required + @Size(max = 20) + public String sessionId; + + @Size(max = 20) + public String name; + + public String expiredTime; + + @ValidateTypeFailure + public Long createdTime; + + public void initialize() { + + id = null; + sessionId = null; + name = null; + expiredTime = null; + createdTime = null; + + } +} diff --git a/src/main/java/org/codelibs/fess/app/web/admin/searchlog/SearchForm.java b/src/main/java/org/codelibs/fess/app/web/admin/searchlog/SearchForm.java new file mode 100644 index 000000000..2bed0d27c --- /dev/null +++ b/src/main/java/org/codelibs/fess/app/web/admin/searchlog/SearchForm.java @@ -0,0 +1,25 @@ +/* + * Copyright 2012-2018 CodeLibs Project and the Others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.codelibs.fess.app.web.admin.searchlog; + +/** + * @author shinsuke + */ +public class SearchForm { + + public String logType; + +} diff --git a/src/main/java/org/codelibs/fess/es/log/exentity/ClickLog.java b/src/main/java/org/codelibs/fess/es/log/exentity/ClickLog.java index 4ca23cd58..ffca8c820 100644 --- a/src/main/java/org/codelibs/fess/es/log/exentity/ClickLog.java +++ b/src/main/java/org/codelibs/fess/es/log/exentity/ClickLog.java @@ -52,6 +52,10 @@ public class ClickLog extends BsClickLog { fields.put(key, value); } + public String getLogMessage() { + return getUrl(); + } + @Override public Map toSource() { final Map sourceMap = super.toSource(); diff --git a/src/main/java/org/codelibs/fess/es/log/exentity/FavoriteLog.java b/src/main/java/org/codelibs/fess/es/log/exentity/FavoriteLog.java index 5ab4c215f..b750750a1 100644 --- a/src/main/java/org/codelibs/fess/es/log/exentity/FavoriteLog.java +++ b/src/main/java/org/codelibs/fess/es/log/exentity/FavoriteLog.java @@ -52,6 +52,14 @@ public class FavoriteLog extends BsFavoriteLog { fields.put(key, value); } + public String getLogMessage() { + return getUrl(); + } + + public LocalDateTime getRequestedAt() { + return getCreatedAt(); + } + @Override public Map toSource() { final Map sourceMap = super.toSource(); diff --git a/src/main/java/org/codelibs/fess/es/log/exentity/SearchLog.java b/src/main/java/org/codelibs/fess/es/log/exentity/SearchLog.java index 77b8d9f5b..018de6dd1 100644 --- a/src/main/java/org/codelibs/fess/es/log/exentity/SearchLog.java +++ b/src/main/java/org/codelibs/fess/es/log/exentity/SearchLog.java @@ -100,6 +100,10 @@ public class SearchLog extends BsSearchLog { fields.put(key, value); } + public String getLogMessage() { + return getSearchWord(); + } + @Override public Map toSource() { final Map sourceMap = super.toSource(); diff --git a/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java b/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java index e4eb32e3f..6fb53510e 100644 --- a/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java +++ b/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java @@ -316,6 +316,12 @@ public interface FessHtmlPath { /** The path of the HTML: /admin/searchlist/admin_searchlist_edit.jsp */ HtmlNext path_AdminSearchlist_AdminSearchlistEditJsp = new HtmlNext("/admin/searchlist/admin_searchlist_edit.jsp"); + /** The path of the HTML: /admin/searchlog/admin_searchlog.jsp */ + HtmlNext path_AdminSearchlog_AdminSearchlogJsp = new HtmlNext("/admin/searchlog/admin_searchlog.jsp"); + + /** The path of the HTML: /admin/searchlog/admin_searchlog_details.jsp */ + HtmlNext path_AdminSearchlog_AdminSearchlogDetailsJsp = new HtmlNext("/admin/searchlog/admin_searchlog_details.jsp"); + /** The path of the HTML: /admin/suggest/admin_suggest.jsp */ HtmlNext path_AdminSuggest_AdminSuggestJsp = new HtmlNext("/admin/suggest/admin_suggest.jsp"); diff --git a/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java b/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java index 6c866a574..275e4cc2b 100644 --- a/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java +++ b/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java @@ -455,6 +455,9 @@ public class FessLabels extends UserMessages { /** The key of the message: Account Filter */ public static final String LABELS_LDAP_ACCOUNT_FILTER = "{labels.ldapAccountFilter}"; + /** The key of the message: Group Filter */ + public static final String LABELS_LDAP_GROUP_FILTER = "{labels.ldapGroupFilter}"; + /** The key of the message: memberOf Attribute */ public static final String LABELS_LDAP_MEMBEROF_ATTRIBUTE = "{labels.ldapMemberofAttribute}"; @@ -2388,6 +2391,9 @@ public class FessLabels extends UserMessages { /** The key of the message: Account Filter */ public static final String LABELS_ldap_account_filter = "{labels.ldap_account_filter}"; + /** The key of the message: Group Filter */ + public static final String LABELS_ldap_group_filter = "{labels.ldap_group_filter}"; + /** The key of the message: memberOf Attribute */ public static final String LABELS_ldap_memberof_attribute = "{labels.ldap_memberof_attribute}"; diff --git a/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java b/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java index af55bdb49..e886805a6 100644 --- a/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java +++ b/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java @@ -1123,6 +1123,9 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction /** The key of the configuration. e.g. suggest */ String ONLINE_HELP_NAME_SUGGEST = "online.help.name.suggest"; + /** The key of the configuration. e.g. searchlog */ + String ONLINE_HELP_NAME_SEARCHLOG = "online.help.name.searchlog"; + /** The key of the configuration. e.g. ja */ String ONLINE_HELP_SUPPORTED_LANGS = "online.help.supported.langs"; @@ -4981,6 +4984,13 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction */ String getOnlineHelpNameSuggest(); + /** + * Get the value for the key 'online.help.name.searchlog'.
+ * The value is, e.g. searchlog
+ * @return The value of found property. (NotNull: if not found, exception but basically no way) + */ + String getOnlineHelpNameSearchlog(); + /** * Get the value for the key 'online.help.supported.langs'.
* The value is, e.g. ja
@@ -7737,6 +7747,10 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction return get(FessConfig.ONLINE_HELP_NAME_SUGGEST); } + public String getOnlineHelpNameSearchlog() { + return get(FessConfig.ONLINE_HELP_NAME_SEARCHLOG); + } + public String getOnlineHelpSupportedLangs() { return get(FessConfig.ONLINE_HELP_SUPPORTED_LANGS); } @@ -8572,6 +8586,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction defaultMap.put(FessConfig.ONLINE_HELP_NAME_ESREQ, "esreq"); defaultMap.put(FessConfig.ONLINE_HELP_NAME_ACCESSTOKEN, "accesstoken"); defaultMap.put(FessConfig.ONLINE_HELP_NAME_SUGGEST, "suggest"); + defaultMap.put(FessConfig.ONLINE_HELP_NAME_SEARCHLOG, "searchlog"); defaultMap.put(FessConfig.ONLINE_HELP_SUPPORTED_LANGS, "ja"); defaultMap.put(FessConfig.SUGGEST_POPULAR_WORD_SEED, "0"); defaultMap.put(FessConfig.SUGGEST_POPULAR_WORD_TAGS, ""); diff --git a/src/main/resources/fess_config.properties b/src/main/resources/fess_config.properties index 7b2a87c40..dc739fee1 100644 --- a/src/main/resources/fess_config.properties +++ b/src/main/resources/fess_config.properties @@ -572,6 +572,7 @@ online.help.name.upgrade=upgrade online.help.name.esreq=esreq online.help.name.accesstoken=accesstoken online.help.name.suggest=suggest +online.help.name.searchlog=searchlog online.help.supported.langs=ja diff --git a/src/main/resources/fess_label.properties b/src/main/resources/fess_label.properties index 30fde1f0d..83a4a31b6 100644 --- a/src/main/resources/fess_label.properties +++ b/src/main/resources/fess_label.properties @@ -179,6 +179,7 @@ labels.menu_system_info=Config Info labels.menu_crawling_info=Crawling Info labels.menu_log=Log Files labels.menu_jobLog=Job Log +labels.menu_searchLog=Search Log labels.menu_failure_url=Failure URL labels.menu_search_list=Search labels.menu_backup=Back Up @@ -909,3 +910,11 @@ labels.advance_search_timestamp_pastday=past 24 hours labels.advance_search_timestamp_pastweek=past week labels.advance_search_timestamp_pastmonth=past month labels.advance_search_timestamp_pastyear=past year +labels.searchlog_configuration=Search Log +labels.searchlog_title=Search Log +labels.searchlog_log_type=Log Type +labels.searchlog_log_type_search=Search Log +labels.searchlog_log_type_click=Click Log +labels.searchlog_log_type_favorite=Favorite Log +labels.searchlog_log_message=Message +labels.searchlog_requested_time=Time diff --git a/src/main/resources/fess_label_en.properties b/src/main/resources/fess_label_en.properties index 4d2290180..850a1e612 100644 --- a/src/main/resources/fess_label_en.properties +++ b/src/main/resources/fess_label_en.properties @@ -179,6 +179,7 @@ labels.menu_system_info=Config Info labels.menu_crawling_info=Crawling Info labels.menu_log=Log Files labels.menu_jobLog=Job Log +labels.menu_searchLog=Search Log labels.menu_failure_url=Failure URL labels.menu_search_list=Search labels.menu_backup=Back Up @@ -909,3 +910,11 @@ labels.advance_search_timestamp_pastday=past 24 hours labels.advance_search_timestamp_pastweek=past week labels.advance_search_timestamp_pastmonth=past month labels.advance_search_timestamp_pastyear=past year +labels.searchlog_configuration=Search Log +labels.searchlog_title=Search Log +labels.searchlog_log_type=Log Type +labels.searchlog_log_type_search=Search Log +labels.searchlog_log_type_click=Click Log +labels.searchlog_log_type_favorite=Favorite Log +labels.searchlog_log_message=Message +labels.searchlog_requested_time=Time diff --git a/src/main/resources/fess_label_ja.properties b/src/main/resources/fess_label_ja.properties index ee81d23d3..7dc02f33c 100644 --- a/src/main/resources/fess_label_ja.properties +++ b/src/main/resources/fess_label_ja.properties @@ -171,6 +171,7 @@ labels.menu_system_info=設定情報 labels.menu_crawling_info=クロール情報 labels.menu_log=ログファイル labels.menu_jobLog=ジョブログ +labels.menu_searchLog=検索ログ labels.menu_failure_url=障害URL labels.menu_search_list=検索 labels.menu_backup=バックアップ @@ -911,3 +912,11 @@ labels.advance_search_timestamp_pastday=24時間以内 labels.advance_search_timestamp_pastweek=1週間以内 labels.advance_search_timestamp_pastmonth=1ヶ月以内 labels.advance_search_timestamp_pastyear=1年以内 +labels.searchlog_configuration=検索ログ +labels.searchlog_title=検索ログ +labels.searchlog_log_type=ログ種別 +labels.searchlog_log_type_search=検索ログ +labels.searchlog_log_type_click=クリックログ +labels.searchlog_log_type_favorite=お気に入りログ +labels.searchlog_log_message=メッセージ +labels.searchlog_requested_time=時刻 diff --git a/src/main/webapp/WEB-INF/view/admin/searchlog/admin_searchlog.jsp b/src/main/webapp/WEB-INF/view/admin/searchlog/admin_searchlog.jsp new file mode 100644 index 000000000..271c36f77 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/searchlog/admin_searchlog.jsp @@ -0,0 +1,125 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +<la:message key="labels.admin_brand_title" /> | <la:message + key="labels.searchlog_configuration" /> + + + +
+ + + + + +
+
+

+ +

+ +
+
+
+
+
+
+

+ +

+
+ +
+ <%-- Message --%> +
+ +
${msg}
+
+ +
+ +
+ +
+ + + + + +
+
+
+
+ + +
+
+
+ <%-- List --%> + +
+
+ + +
+
+
+ +
+
+ + + + + + + + + + + + + + + +
${f:h(data.requestedAt)}${f:h(data.logMessage)}
+
+
+ + +
+
+ +
+ +
+
+
+
+ +
+ + + + diff --git a/src/main/webapp/WEB-INF/view/admin/searchlog/admin_searchlog_details.jsp b/src/main/webapp/WEB-INF/view/admin/searchlog/admin_searchlog_details.jsp new file mode 100644 index 000000000..c7a91aedb --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/searchlog/admin_searchlog_details.jsp @@ -0,0 +1,160 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + +<la:message key="labels.admin_brand_title" /> | <la:message + key="labels.crawling_info_configuration" /> + + + +
+ + + + + +
+
+

+ +

+ +
+
+ + + + + +
+
+
box-successbox-warningbox-dangerbox-primary"> +
+

+ + + + + + + + + + + + +

+
+ + + +
+
+ +
+ <%-- Message --%> +
+ +
${msg}
+
+ +
+ <%-- Form Fields --%> + + + + + + + + + + + + + +
${f:h(sessionId)} +
${f:h(info.keyMsg)}${f:h(info.value)}
+
+ + + +
+ +
+
+
+
+
+ +
+ + + + diff --git a/src/main/webapp/WEB-INF/view/common/admin/sidebar.jsp b/src/main/webapp/WEB-INF/view/common/admin/sidebar.jsp index 5d69133a9..0744d28f0 100644 --- a/src/main/webapp/WEB-INF/view/common/admin/sidebar.jsp +++ b/src/main/webapp/WEB-INF/view/common/admin/sidebar.jsp @@ -244,6 +244,12 @@ +
  • class="active"> + + +
  • +
  • class="active">