This commit is contained in:
2024-10-20 17:58:53 +02:00
parent 0b59c94f52
commit 7bddbd3e10
6 changed files with 9 additions and 148 deletions

View File

@ -5,14 +5,14 @@
version="1.1">
<xsl:import href="lib/head.xsl"/>
<xsl:import href="lib/parseCommand.xsl"/>
<xsl:import href="lib/nav.xsl"/>
<xsl:import href="lib/toast.xsl"/>
<xsl:output method="html" encoding="UTF-8"/>
<xsl:output indent="yes"/>
<xsl:strip-space elements='*'/>
<xsl:param name="saveAs" select=""/>
<xsl:param name="savedAs" select=""/>
<xsl:param name="compareWith" select=""/>
<xsl:param name="refreshPeriod" select="0"/>
<xsl:param name="sudo" select="false"/>
@ -23,7 +23,7 @@
<xsl:variable name="init" select="document($compareWith)/nmaprun"/>
<xsl:variable name="nextCompareWith">
<xsl:choose>
<xsl:when test="$saveAs"><xsl:value-of select="$saveAs"/></xsl:when>
<xsl:when test="$savedAs"><xsl:value-of select="$saveAs"/></xsl:when>
<xsl:when test="$compareWith"><xsl:value-of select="$compareWith"/></xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
@ -59,17 +59,6 @@
</footer>
<script>
DataTable.ext.type.detect.unshift(function (d) {
return /[\d]+\.[\d]+\.[\d]+\.[\d]+/.test(d)
? 'ipv4-address'
: null;
});
DataTable.ext.type.order['ipv4-address-pre'] = function (ipAddress) {
[a, b, c, d] = ipAddress.split(".").map(Number)
return 16777216*a + 65536*b + 256*c + d;
};
var table = $('#scanResultsTable').DataTable({
buttons : ['copy', 'excel', 'pdf'],
fixedHeader: true,
@ -84,46 +73,6 @@ var table = $('#scanResultsTable').DataTable({
table.order([1, 'asc']).draw()
$('.ui.dropdown').dropdown()
hiddenButton.onclick = function(event) {
if (lanScanForm.checkValidity()) {
targetsInputDiv.classList.add('loading')
$.toast({
title : 'Scan en cours...',
message : 'Merci de patienter',
class : 'info',
showIcon : 'satellite dish',
displayTime: 0,
closeIcon : true,
position : 'bottom right',
})
}
}
refreshButton.onclick = function(event) {
refreshButton.getElementsByTagName('i')[0].className = 'loading spinner icon'
$.toast({
title : 'Scan en cours...',
message : 'Merci de patienter',
class : 'info',
showIcon : 'satellite dish',
displayTime: 0,
closeIcon : true,
position : 'bottom right',
})
}
function hostScanning(link) {
link.getElementsByTagName('i')[0].className = 'loading spinner icon'
$.toast({
title : 'Scan en cours...',
message : 'Merci de patienter',
class : 'info',
showIcon : 'satellite dish',
displayTime: 0,
closeIcon : true,
position : 'bottom right',
})
}
</script>
<xsl:apply-templates select="runstats">