|
78 | 78 | </xsl:otherwise> |
79 | 79 | </xsl:choose> |
80 | 80 | </xsl:template> |
81 | | - |
82 | | - <xsl:template name="render-visualizations"> |
83 | | - <hr class="my-4"/> |
84 | | - <h2 id="visualizations" class="fs-4 mt-5 mb-3 bg-light p-3 rounded">Visualizations</h2> |
85 | | - <xsl:choose> |
86 | | - <xsl:when test="count(//host/ports/port[state/@state='open' and service/@name]) > 0"> |
87 | | - <div id="matrixCount" class="d-none"> |
88 | | - <xsl:for-each select="//host"> |
89 | | - <div class="host"> |
90 | | - <xsl:attribute name="data-host"> |
91 | | - <xsl:value-of select="address[1]/@addr"/> |
92 | | - <xsl:if test="string(hostnames/hostname[1]/@name) != ''"> |
93 | | - <xsl:text> - </xsl:text> |
94 | | - <xsl:value-of select="hostnames/hostname[1]/@name"/> |
95 | | - </xsl:if> |
96 | | - </xsl:attribute> |
97 | | - <xsl:for-each select="ports/port[state/@state='open' and service/@name]"> |
98 | | - <span class="port" data-port="{@portid}" data-conf="{service/@conf}"> |
99 | | - <xsl:attribute name="data-service"> |
100 | | - <xsl:value-of select="@protocol"/> |
101 | | - <xsl:text>:</xsl:text> |
102 | | - <xsl:if test="service/@tunnel = 'ssl'"> |
103 | | - <xsl:text>ssl/</xsl:text> |
104 | | - </xsl:if> |
105 | | - <xsl:value-of select="service/@name"/> |
106 | | - </xsl:attribute> |
107 | | - </span> |
108 | | - </xsl:for-each> |
109 | | - </div> |
110 | | - </xsl:for-each> |
111 | | - </div> |
112 | | - <h4 class="fs-6 mt-4">Open Ports Per Host</h4> |
113 | | - <div id="openPortsPerHostChart" style="width: 100%;"/> |
114 | | - <h4 class="fs-6 mt-4">Host-Port Matrix</h4> |
115 | | - <div id="portHostMatrix" style="width: 100%;"/> |
116 | | - <h4 class="fs-6 mt-4">Service-Port Heatmap</h4> |
117 | | - <div id="protocolPortMatrix" style="width: 100%;"/> |
118 | | - </xsl:when> |
119 | | - <xsl:otherwise> |
120 | | - <xsl:call-template name="render-empty-state"> |
121 | | - <xsl:with-param name="message" select="'No named open services are available for visualization plots.'"/> |
122 | | - </xsl:call-template> |
123 | | - </xsl:otherwise> |
124 | | - </xsl:choose> |
125 | | - </xsl:template> |
126 | 81 | </xsl:stylesheet> |
0 commit comments