improve smb share size

This commit is contained in:
Adrien MALINGREY 2023-05-11 12:09:05 +02:00
parent 08187df3a8
commit c85c175416
2 changed files with 11 additions and 10 deletions

View File

@ -43,13 +43,14 @@ action = function(host)
-- Get more information on each share -- Get more information on each share
for i = 1, #shares, 1 do for i = 1, #shares, 1 do
local share = shares[i] local share = shares[i]
if (share ~= nil) then
local status, result = get_share_info(host, share) local status, result = get_share_info(host, share)
response[share] = result if (status) then
response[share] = result
end
end
end end
--table.sort(response)
return response return response
end end

View File

@ -34,11 +34,11 @@
margin: auto; margin: auto;
} }
.share-size.primary { .button.share-size {
--bg: #1678c2; --bg: #21ba45;
} }
.share-size.item { .item.share-size {
--bg: white; --bg: white;
} }
@ -118,7 +118,7 @@
<div class="column"> <div class="column">
<xsl:variable name="status"> <xsl:variable name="status">
<xsl:choose> <xsl:choose>
<xsl:when test="$scannedHost/status/@state='up'">info</xsl:when> <xsl:when test="$scannedHost/status/@state='up'">success</xsl:when>
<xsl:otherwise>error</xsl:otherwise> <xsl:otherwise>error</xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
@ -153,7 +153,7 @@
<xsl:when test="$scannedPort/script[@id='http-info']/elem[@key='status']>=500">red</xsl:when> <xsl:when test="$scannedPort/script[@id='http-info']/elem[@key='status']>=500">red</xsl:when>
<xsl:when test="$scannedPort/script[@id='http-info']/elem[@key='status']>=400">yellow</xsl:when> <xsl:when test="$scannedPort/script[@id='http-info']/elem[@key='status']>=400">yellow</xsl:when>
<xsl:when test="$scannedPort/state/@state='filtered'">yellow</xsl:when> <xsl:when test="$scannedPort/state/@state='filtered'">yellow</xsl:when>
<xsl:when test="$scannedPort/state/@state='open'">primary</xsl:when> <xsl:when test="$scannedPort/state/@state='open'">green</xsl:when>
<xsl:otherwise>red</xsl:otherwise> <xsl:otherwise>red</xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>