Removed light blue color inside ntopng

Changed progress-bar and badges palette color (Issue #5346)
This commit is contained in:
Matteo Biscosi 2021-06-25 12:17:33 +02:00 committed by GitHub
commit 075d5710e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 40 additions and 41 deletions

View file

@ -20,7 +20,7 @@ function as2record(ifId, as)
local sent2rcvd = round((as["bytes.sent"] * 100) / (as["bytes.sent"] + as["bytes.rcvd"]), 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-success' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
if(throughput_type == "pps") then
record["column_thpt"] = pktsToSize(as["throughput_pps"])

View file

@ -18,7 +18,7 @@ function country2record(ifId, country)
local sent2rcvd = round((country["egress"] * 100) / (country["egress"] + country["ingress"]), 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-success' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
if(throughput_type == "pps") then
record["column_thpt"] = pktsToSize(country["throughput_pps"])

View file

@ -160,7 +160,7 @@ function graph_utils.breakdownBar(sent, sentLabel, rcvd, rcvdLabel, thresholdLow
elseif(sent2rcvd > thresholdHigh) then rcvdLabel = '<i class="fas fa-exclamation-triangle fa-lg""></i> '..rcvdLabel end
print('<div class="progress"><div class="progress-bar bg-warning" aria-valuenow="'.. sent2rcvd..'" aria-valuemin="0" aria-valuemax="100" style="width: ' .. sent2rcvd.. '%;">'..sentLabel)
print('</div><div class="progress-bar bg-info" aria-valuenow="'.. (100-sent2rcvd)..'" aria-valuemin="0" aria-valuemax="100" style="width: ' .. (100-sent2rcvd) .. '%;">' .. rcvdLabel .. '</div></div>')
print('</div><div class="progress-bar bg-success" aria-valuenow="'.. (100-sent2rcvd)..'" aria-valuemin="0" aria-valuemax="100" style="width: ' .. (100-sent2rcvd) .. '%;">' .. rcvdLabel .. '</div></div>')
else
print('&nbsp;')

View file

@ -564,7 +564,7 @@ function host_pools_migration.hostpool2record(ifid, pool_id, pool)
local sent2rcvd = round((pool["bytes.sent"] * 100) / (pool["bytes.sent"] + pool["bytes.rcvd"]), 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-success' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
if(throughput_type == "pps") then
record["column_thpt"] = pktsToSize(pool["throughput_pps"])

View file

@ -554,7 +554,7 @@ function host_pools_nedge.hostpool2record(ifid, pool_id, pool)
local sent2rcvd = round((pool["bytes.sent"] * 100) / (pool["bytes.sent"] + pool["bytes.rcvd"]), 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-success' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
if(throughput_type == "pps") then
record["column_thpt"] = pktsToSize(pool["throughput_pps"])

View file

@ -649,7 +649,7 @@ function internals_utils.getHashTablesFillBar(first_fill_pct, second_fill_pct, t
end
if second_fill_pct > 0 then
code = code..[[<div class="progress-bar bg-info" role="progressbar" title="]] ..i18n("flow_checks.idle").. [[" style="width: ]]..second_fill_pct..[[%" aria-valuenow="]]..second_fill_pct..[[" aria-valuemin="0" aria-valuemax="100">]]..i18n("flow_checks.idle")..[[</div>]]
code = code..[[<div class="progress-bar bg-success" role="progressbar" title="]] ..i18n("flow_checks.idle").. [[" style="width: ]]..second_fill_pct..[[%" aria-valuenow="]]..second_fill_pct..[[" aria-valuemin="0" aria-valuemax="100">]]..i18n("flow_checks.idle")..[[</div>]]
end
if third_fill_pct > 0 then

View file

@ -3015,14 +3015,14 @@ end
-- print TCP flags
function printTCPFlags(flags)
if(hasbit(flags,0x01)) then print('<span class="badge bg-info">FIN</span> ') end
if(hasbit(flags,0x02)) then print('<span class="badge bg-info">SYN</span> ') end
if(hasbit(flags,0x01)) then print('<span class="badge bg-warning">FIN</span> ') end
if(hasbit(flags,0x02)) then print('<span class="badge bg-warning">SYN</span> ') end
if(hasbit(flags,0x04)) then print('<span class="badge bg-danger">RST</span> ') end
if(hasbit(flags,0x08)) then print('<span class="badge bg-info">PUSH</span> ') end
if(hasbit(flags,0x10)) then print('<span class="badge bg-info">ACK</span> ') end
if(hasbit(flags,0x20)) then print('<span class="badge bg-info">URG</span> ') end
if(hasbit(flags,0x40)) then print('<span class="badge bg-info">ECE</span> ') end
if(hasbit(flags,0x80)) then print('<span class="badge bg-info">CWR</span> ') end
if(hasbit(flags,0x08)) then print('<span class="badge bg-warning">PUSH</span> ') end
if(hasbit(flags,0x10)) then print('<span class="badge bg-warning">ACK</span> ') end
if(hasbit(flags,0x20)) then print('<span class="badge bg-warning">URG</span> ') end
if(hasbit(flags,0x40)) then print('<span class="badge bg-warning">ECE</span> ') end
if(hasbit(flags,0x80)) then print('<span class="badge bg-warning">CWR</span> ') end
end
-- convert the integer carrying TCP flags in a more convenient lua table

View file

@ -85,7 +85,7 @@ function mac2record(mac)
local sent2rcvd = round((mac["bytes.sent"] * 100) / (mac["bytes.sent"] + mac["bytes.rcvd"]), 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-success' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
if(throughput_type == "pps") then
record["column_thpt"] = pktsToSize(mac["throughput_pps"])

View file

@ -17,7 +17,7 @@ function network2record(ifId, network)
local sent2rcvd = round((network["bytes.sent"] * 100) / (network["bytes.sent"] + network["bytes.rcvd"]), 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-success' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
if(throughput_type == "pps") then
record["column_thpt"] = pktsToSize(network["throughput_pps"])

View file

@ -315,7 +315,7 @@ function os_utils.os2record(ifId, os)
local sent2rcvd = round((os["bytes.sent"] * 100) / (os["bytes.sent"] + os["bytes.rcvd"]), 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-success' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
if(throughput_type == "pps") then
record["column_thpt"] = pktsToSize(os["throughput_pps"])

View file

@ -453,7 +453,7 @@ function host_pools:hostpool2record(ifid, pool_id, pool)
record["column_breakdown"] =
"<div class='progress'><div class='progress-bar bg-warning' style='width: " ..
sent2rcvd ..
"%;'>Sent</div><div class='progress-bar bg-info' style='width: " ..
"%;'>Sent</div><div class='progress-bar bg-success' style='width: " ..
(100 - sent2rcvd) .. "%;'>Rcvd</div></div>"
if (throughput_type == "pps") then

View file

@ -20,7 +20,7 @@ function vlan2record(ifId, vlan)
local sent2rcvd = round((vlan["bytes.sent"] * 100) / (vlan["bytes.sent"] + vlan["bytes.rcvd"]), 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar bg-success' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
if(throughput_type == "pps") then
record["column_thpt"] = pktsToSize(vlan["throughput_pps"])