NIFI-493:

- Fixing the number of documented components.
- Fixing unordered list creation.
This commit is contained in:
Matt Gilman 2015-04-08 08:39:05 -04:00
parent 7369730cea
commit d769b50e39
2 changed files with 13 additions and 10 deletions

View File

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

View File

@ -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>