export head

This commit is contained in:
2024-10-20 15:03:45 +02:00
parent cadcd37408
commit bd8e988444
7 changed files with 126 additions and 201 deletions

View File

@ -4,6 +4,7 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.1">
<xsl:import href="lib/head.xsl"/>
<xsl:import href="lib/parseCommand.xsl"/>
<xsl:import href="lib/toast.xsl"/>
@ -32,47 +33,13 @@
<xsl:variable name="targets" select="substring-after(@args, '.xml ')"/>
<html lang="fr">
<head>
<meta charset="utf-8"/>
<xsl:if test="$refreshPeriod > 0">
<meta http-equiv="refresh">
<xsl:attribute name="content">
<xsl:value-of select="$refreshPeriod"/>
<xsl:text>;URL=</xsl:text>
<xsl:value-of select="$basedir"/>
<xsl:text>/scan.php?targets=</xsl:text>
<xsl:value-of select="$targets"/>
<xsl:text>&amp;</xsl:text>
<xsl:call-template name="parseCommand">
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
<xsl:with-param name="asURL" select="true()"/>
</xsl:call-template>
<xsl:text>compareWith=</xsl:text>
<xsl:value-of select="$nextCompareWith"/>
<xsl:text>&amp;refreshPeriod=</xsl:text>
<xsl:value-of select="$refreshPeriod"/>
<xsl:text>&amp;sudo=</xsl:text>
<xsl:value-of select="$sudo"/>
</xsl:attribute>
</meta>
</xsl:if>
<title>
<xsl:text>lanScan - </xsl:text>
<xsl:value-of select="$targets"/>
</title>
<link rel="icon" href="{$basedir}/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css"/>
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css"/>
<link href="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/cr-2.0.4/datatables.css" rel="stylesheet"/>
<link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/>
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script>
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/cr-2.0.4/datatables.js"></script>
</head>
<xsl:apply-templates select="." mode="head">
<xsl:with-param name="basedir" select="$basedir"/>
<xsl:with-param name="targets" select="$targets"/>
<xsl:with-param name="nextCompareWith" select="$nextCompareWith"/>
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
<xsl:with-param name="sudo" select="$sudo"/>
</xsl:apply-templates>
<body>
<nav class="ui inverted teal fixed menu">
@ -146,10 +113,6 @@ table.order([1, 'asc']).draw()
$('.ui.dropdown').dropdown()
<xsl:apply-templates select="runstats">
<xsl:with-param name="init" select="$init"/>
</xsl:apply-templates>
hiddenButton.onclick = function(event) {
if (lanScanForm.checkValidity()) {
targetsInputDiv.classList.add('loading')
@ -190,6 +153,10 @@ function hostScanning(link) {
})
}
</script>
<xsl:apply-templates select="runstats">
<xsl:with-param name="init" select="$init"/>
</xsl:apply-templates>
</body>
</html>
</xsl:template>