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 = {"/*"})
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
private ServletContext servletContext;
@ -82,7 +85,7 @@ public class DocumentationController extends HttpServlet {
request.setAttribute("processors", processors);
request.setAttribute("controllerServices", controllerServices);
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
request.getRequestDispatcher("/WEB-INF/jsp/documentation.jsp").forward(request, response);

View File

@ -55,11 +55,11 @@
<div id="processor-links" class="component-links">
<c:choose>
<c:when test="${not empty processors}">
<ul>
<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>
</ul>
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
</c:forEach>
</ul>
<span class="no-matching no-components hidden">No matching processors</span>
</c:when>
<c:otherwise>
@ -73,11 +73,11 @@
<div id="controller-service-links" class="component-links">
<c:choose>
<c:when test="${not empty controllerServices}">
<ul>
<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>
</ul>
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
</c:forEach>
</ul>
<span class="no-matching no-components hidden">No matching controller services</span>
</c:when>
<c:otherwise>
@ -91,11 +91,11 @@
<div id="reporting-task-links" class="component-links">
<c:choose>
<c:when test="${not empty reportingTasks}">
<ul>
<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>
</ul>
<li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
</c:forEach>
</ul>
<span class="no-matching no-components hidden">No matching reporting tasks</span>
</c:when>
<c:otherwise>