mirror of https://github.com/apache/nifi.git
NIFI-493:
- Fixing the number of documented components. - Fixing unordered list creation.
This commit is contained in:
parent
7369730cea
commit
d769b50e39
|
@ -39,6 +39,9 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
@WebServlet(name = "DocumenationController", urlPatterns = {"/*"})
|
@WebServlet(name = "DocumenationController", urlPatterns = {"/*"})
|
||||||
public class DocumentationController extends HttpServlet {
|
public class DocumentationController extends HttpServlet {
|
||||||
|
|
||||||
|
private static final int GENERAL_LINK_COUNT = 4;
|
||||||
|
private static final int DEVELOPER_LINK_COUNT = 2;
|
||||||
|
|
||||||
// context for accessing the extension mapping
|
// context for accessing the extension mapping
|
||||||
private ServletContext servletContext;
|
private ServletContext servletContext;
|
||||||
|
|
||||||
|
@ -82,7 +85,7 @@ public class DocumentationController extends HttpServlet {
|
||||||
request.setAttribute("processors", processors);
|
request.setAttribute("processors", processors);
|
||||||
request.setAttribute("controllerServices", controllerServices);
|
request.setAttribute("controllerServices", controllerServices);
|
||||||
request.setAttribute("reportingTasks", reportingTasks);
|
request.setAttribute("reportingTasks", reportingTasks);
|
||||||
request.setAttribute("totalComponents", processors.size() + controllerServices.size() + reportingTasks.size());
|
request.setAttribute("totalComponents", GENERAL_LINK_COUNT + processors.size() + controllerServices.size() + reportingTasks.size() + DEVELOPER_LINK_COUNT);
|
||||||
|
|
||||||
// forward appropriately
|
// forward appropriately
|
||||||
request.getRequestDispatcher("/WEB-INF/jsp/documentation.jsp").forward(request, response);
|
request.getRequestDispatcher("/WEB-INF/jsp/documentation.jsp").forward(request, response);
|
||||||
|
|
|
@ -55,11 +55,11 @@
|
||||||
<div id="processor-links" class="component-links">
|
<div id="processor-links" class="component-links">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${not empty processors}">
|
<c:when test="${not empty processors}">
|
||||||
|
<ul>
|
||||||
<c:forEach var="entry" items="${processors}">
|
<c:forEach var="entry" items="${processors}">
|
||||||
<ul>
|
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
|
||||||
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
|
|
||||||
</ul>
|
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
<span class="no-matching no-components hidden">No matching processors</span>
|
<span class="no-matching no-components hidden">No matching processors</span>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
|
@ -73,11 +73,11 @@
|
||||||
<div id="controller-service-links" class="component-links">
|
<div id="controller-service-links" class="component-links">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${not empty controllerServices}">
|
<c:when test="${not empty controllerServices}">
|
||||||
|
<ul>
|
||||||
<c:forEach var="entry" items="${controllerServices}">
|
<c:forEach var="entry" items="${controllerServices}">
|
||||||
<ul>
|
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
|
||||||
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
|
|
||||||
</ul>
|
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
<span class="no-matching no-components hidden">No matching controller services</span>
|
<span class="no-matching no-components hidden">No matching controller services</span>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
|
@ -91,11 +91,11 @@
|
||||||
<div id="reporting-task-links" class="component-links">
|
<div id="reporting-task-links" class="component-links">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${not empty reportingTasks}">
|
<c:when test="${not empty reportingTasks}">
|
||||||
|
<ul>
|
||||||
<c:forEach var="entry" items="${reportingTasks}">
|
<c:forEach var="entry" items="${reportingTasks}">
|
||||||
<ul>
|
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
|
||||||
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
|
|
||||||
</ul>
|
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
<span class="no-matching no-components hidden">No matching reporting tasks</span>
|
<span class="no-matching no-components hidden">No matching reporting tasks</span>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
|
|
Loading…
Reference in New Issue