add crawling session info
This commit is contained in:
parent
eeffb888a6
commit
9098cfcb4a
5 changed files with 25 additions and 25 deletions
|
@ -95,14 +95,18 @@ public class CrawlingSessionService implements Serializable {
|
|||
public void store(final CrawlingSession crawlingSession) {
|
||||
setupStoreCondition(crawlingSession);
|
||||
|
||||
crawlingSessionBhv.insertOrUpdate(crawlingSession);
|
||||
crawlingSessionBhv.insertOrUpdate(crawlingSession, op -> {
|
||||
op.setRefresh(true);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void delete(final CrawlingSession crawlingSession) {
|
||||
setupDeleteCondition(crawlingSession);
|
||||
|
||||
crawlingSessionBhv.delete(crawlingSession);
|
||||
crawlingSessionBhv.delete(crawlingSession, op -> {
|
||||
op.setRefresh(true);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -121,22 +121,6 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
// -----------------------------------------------------
|
||||
// Entry Page
|
||||
// ----------
|
||||
@Execute(token = TxToken.SAVE)
|
||||
public HtmlResponse deletepage(final int crudMode, final String id) {
|
||||
verifyCrudMode(crudMode, CrudMode.DELETE);
|
||||
return asHtml(path_AdminCrawlingsession_ConfirmJsp).useForm(EditForm.class, op -> {
|
||||
op.setup(form -> {
|
||||
crawlingSessionService.getCrawlingSession(id).ifPresent(entity -> {
|
||||
copyBeanToBean(entity, form, copyOp -> {
|
||||
copyOp.excludeNull();
|
||||
});
|
||||
}).orElse(() -> {
|
||||
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), toIndexHtml());
|
||||
});
|
||||
form.crudMode = crudMode;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@Execute(token = TxToken.SAVE)
|
||||
public HtmlResponse deletefromconfirm(final EditForm form) {
|
||||
|
@ -148,7 +132,9 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
}).orElse(() -> {
|
||||
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), toIndexHtml());
|
||||
});
|
||||
return asHtml(path_AdminCrawlingsession_ConfirmJsp);
|
||||
return asHtml(path_AdminCrawlingsession_ConfirmJsp).renderWith(data -> {
|
||||
data.register("crawlingSessionInfoItems", crawlingSessionService.getCrawlingSessionInfoList(id));
|
||||
});
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
|
@ -168,6 +154,8 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), toIndexHtml());
|
||||
});
|
||||
});
|
||||
}).renderWith(data -> {
|
||||
data.register("crawlingSessionInfoItems", crawlingSessionService.getCrawlingSessionInfoList(id));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.codelibs.fess.es.exentity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.codelibs.fess.es.bsentity.BsCrawlingSession;
|
||||
|
||||
/**
|
||||
|
@ -9,6 +11,8 @@ public class CrawlingSession extends BsCrawlingSession {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private List<CrawlingSessionInfo> crawlingSessionInfoList;
|
||||
|
||||
public CrawlingSession() {
|
||||
}
|
||||
|
||||
|
@ -33,4 +37,12 @@ public class CrawlingSession extends BsCrawlingSession {
|
|||
public void setVersionNo(final Long version) {
|
||||
asDocMeta().version(version);
|
||||
}
|
||||
|
||||
public void setCrawlingSessionInfoList(List<CrawlingSessionInfo> crawlingSessionInfoList) {
|
||||
this.crawlingSessionInfoList = crawlingSessionInfoList;
|
||||
}
|
||||
|
||||
public List<CrawlingSessionInfo> getCrawlingSessionInfoList() {
|
||||
return crawlingSessionInfoList;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -250,8 +250,8 @@ public class CrawlJob {
|
|||
// WEB-INF/lib
|
||||
appendJarFile(cpSeparator, buf, new File(servletContext.getRealPath("/WEB-INF/lib")), "WEB-INF/lib" + File.separator);
|
||||
// WEB-INF/crawler/lib
|
||||
appendJarFile(cpSeparator, buf, new File(servletContext.getRealPath("/WEB-INF/crawler/lib")), "WEB-INF/crawler" + File.separator + "lib"
|
||||
+ File.separator);
|
||||
appendJarFile(cpSeparator, buf, new File(servletContext.getRealPath("/WEB-INF/crawler/lib")), "WEB-INF/crawler" + File.separator
|
||||
+ "lib" + File.separator);
|
||||
final File targetLibDir = new File(targetDir, "fess" + File.separator + "WEB-INF" + File.separator + "lib");
|
||||
if (targetLibDir.isDirectory()) {
|
||||
appendJarFile(cpSeparator, buf, targetLibDir, targetLibDir.getAbsolutePath() + File.separator);
|
||||
|
|
|
@ -98,10 +98,6 @@
|
|||
<td><a href="${f:url('/admin/searchlist/search')}?query=segment:${f:u(sessionId)}">${f:h(sessionId)}</a>
|
||||
<la:hidden property="sessionId" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><la:message key="labels.crawling_session_name" /></th>
|
||||
<td>${f:h(sessionId)}</td>
|
||||
</tr>
|
||||
<c:forEach var="info" items="${crawlingSessionInfoItems}">
|
||||
<tr>
|
||||
<th>${f:h(info.keyMsg)}</th>
|
||||
|
|
Loading…
Add table
Reference in a new issue