Skip to content

Commit

Permalink
Merge pull request honze-net#8 from Anthirian/master
Browse files Browse the repository at this point in the history
Allow collapsing details of online hosts
  • Loading branch information
honze-net authored Feb 11, 2020
2 parents 230e8c2 + f323523 commit 441e993
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions nmap-bootstrap.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Andreas Hontzia (@honze_net)
height: 180px;
background-color: #f5f5f5;
}
.clickable {
cursor: pointer;
}
</style>
<title>Scan Report Nmap <xsl:value-of select="/nmaprun/@version"/></title>
</head>
Expand Down Expand Up @@ -126,15 +129,20 @@ Andreas Hontzia (@honze_net)
<script>
$(document).ready(function() {
$('#table-overview').DataTable();
$('h3.panel-title').click(function() {
$(this).find("i.glyphicon").toggleClass("glyphicon-chevron-down glyphicon-chevron-right");
});
});
</script>
<h2 id="onlinehosts" class="target">Online Hosts</h2>
<xsl:for-each select="/nmaprun/host[status/@state='up']">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><xsl:value-of select="address/@addr"/><xsl:if test="count(hostnames/hostname) > 0"> - <xsl:value-of select="hostnames/hostname/@name"/></xsl:if></h3>
<div class="panel-heading clickable" data-toggle="collapse">
<xsl:attribute name="data-target">#<xsl:value-of select="translate(address/@addr, '.', '-')"/></xsl:attribute>
<h3 class="panel-title"><i class="glyphicon glyphicon glyphicon-chevron-right"></i><xsl:value-of select="address/@addr"/><xsl:if test="count(hostnames/hostname) > 0"> - <xsl:value-of select="hostnames/hostname/@name"/></xsl:if></h3>
</div>
<div class="panel-body">
<div class="panel-body collapse in">
<xsl:attribute name="id"><xsl:value-of select="translate(address/@addr, '.', '-')"/></xsl:attribute>
<xsl:if test="count(hostnames/hostname) > 0">
<h4>Hostnames</h4>
<ul>
Expand Down

0 comments on commit 441e993

Please sign in to comment.