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

@ -896,7 +896,7 @@ else
cli_name = cli_name .. ":" .. flow["cli.port"]
srv_name = srv_name .. ":" .. flow["srv.port"]
end
print('<div class="progress"><div class="progress-bar bg-warning" style="width: ' .. cli2srv.. '%;">'.. cli_name..'</div><div class="progress-bar bg-info" style="width: ' .. (100-cli2srv) .. '%;">' .. srv_name .. '</div></div>')
print('<div class="progress"><div class="progress-bar bg-warning" style="width: ' .. cli2srv.. '%;">'.. cli_name..'</div><div class="progress-bar bg-success" style="width: ' .. (100-cli2srv) .. '%;">' .. srv_name .. '</div></div>')
print("</td></tr>\n")
end
@ -978,7 +978,7 @@ else
print('<div class="progress"><div class="progress-bar bg-warning" style="width: ' .. pctg .. '%;">'..pctg..'% </div>')
pctg = 100-pctg
print('<div class="progress-bar bg-info" style="width: ' .. pctg .. '%;">'..pctg..'% </div></div>')
print('<div class="progress-bar bg-success" style="width: ' .. pctg .. '%;">'..pctg..'% </div></div>')
-- print(formatValue(flow.iec104.stats.forward_msgs).." RX / "..formatValue(flow.iec104.stats.reverse_msgs).." TX")
print("</td></tr>\n")
@ -1008,7 +1008,7 @@ else
print("<tr><th width=30%>"..i18n("flow_details.rtt_breakdown").."</th><td colspan=2>")
print('<div class="progress"><div class="progress-bar bg-warning" style="width: ' .. (cli2srv * 100 / rtt) .. '%;">'.. cli2srv ..' ms (client)</div>')
print('<div class="progress-bar bg-info" style="width: ' .. (srv2cli * 100 / rtt) .. '%;">' .. srv2cli .. ' ms (server)</div></div>')
print('<div class="progress-bar bg-success" style="width: ' .. (srv2cli * 100 / rtt) .. '%;">' .. srv2cli .. ' ms (server)</div></div>')
print("</td></tr>\n")
c = interface.getAddressInfo(flow["cli.ip"])
@ -1261,7 +1261,7 @@ else
score_category_security = 100 - score_category_network
print('<td><div class="progress"><div class="progress-bar bg-warning" style="width: '..score_category_network..'%;">'.. i18n("flow_details.score_category_network"))
print('</div><div class="progress-bar bg-info" style="width: ' .. score_category_security .. '%;">' .. i18n("flow_details.score_category_security") .. '</div></div></td>\n')
print('</div><div class="progress-bar bg-success" style="width: ' .. score_category_security .. '%;">' .. i18n("flow_details.score_category_security") .. '</div></div></td>\n')
print("</tr>\n")
end

View file

@ -211,7 +211,7 @@ for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
record["column_server_rtt"] = format_utils.formatMillis(value["server_tcp_info"]["rtt"])
end
local column_key = "<A class='btn btn-sm btn-info' HREF='"
local column_key = "<A class='btn btn-sm btn-warning' HREF='"
..ntop.getHttpPrefix().."/lua/flow_details.lua?flow_key="..value["ntopng.key"].."&flow_hash_id="..value["hash_entry_id"]
.."'><i class='fas fa-search-plus'></i></A>"
if(have_nedge) then
@ -311,7 +311,7 @@ end
local cli2srv = round((value["cli2srv.bytes"] * 100) / value["bytes"], 0)
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: " .. cli2srv .."%;'>Client</div><div class='progress-bar bg-info' style='width: " .. (100-cli2srv) .. "%;'>Server</div></div>"
record["column_breakdown"] = "<div class='progress'><div class='progress-bar bg-warning' style='width: " .. cli2srv .."%;'>Client</div><div class='progress-bar bg-success' style='width: " .. (100-cli2srv) .. "%;'>Server</div></div>"
local info = value["info"]

View file

@ -123,7 +123,7 @@ if host then
sent2rcvd = round((host["bytes.sent"] * 100) / (host["bytes.sent"]+host["bytes.rcvd"]), 0)
if(sent2rcvd == nil) then sent2rcvd = 0 end
res["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>"
end

View file

@ -348,7 +348,7 @@ for _key, _value in pairsByKeys(vals, funct) do
record["column_thpt"] = "0 "..throughput_type
end
local column_info = hostinfo2detailshref(value, {page = "flows"}, "<span class='btn btn-sm btn-info'><i class='fas fa-stream'></i></span>")
local column_info = hostinfo2detailshref(value, {page = "flows"}, "<span class='btn btn-sm btn-warning'><i class='fas fa-stream'></i></span>")
if have_nedge and (host ~= nil) and (host.localhost or host.systemhost) then
column_info = column_info.." <span title='"..
@ -379,7 +379,7 @@ for _key, _value in pairsByKeys(vals, funct) do
local sent2rcvd = round((value["bytes.sent"] * 100) / (value["bytes.sent"]+value["bytes.rcvd"]), 0)
if(sent2rcvd == nil) then sent2rcvd = 0 end
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>"
local _, custom_column_key = custom_column_utils.getCustomColumnName()
record["column_"..custom_column_key] = custom_column_utils.hostStatsToColumnValue(value, custom_column_key, true)

View file

@ -138,7 +138,7 @@ local function scoreBreakdown(what)
score_category_security = 100 - score_category_network
print('<span class="progress w-100 ms-1"><span class="progress-bar bg-warning" style="width: '..score_category_network..'%;">'.. i18n("flow_details.score_category_network"))
print('</span><span class="progress-bar bg-info" style="width: ' .. score_category_security .. '%;">' .. i18n("flow_details.score_category_security") .. '</span></span>\n')
print('</span><span class="progress-bar bg-success" style="width: ' .. score_category_security .. '%;">' .. i18n("flow_details.score_category_security") .. '</span></span>\n')
else
print("&nbsp;")
end
@ -607,14 +607,14 @@ if((page == "overview") or (page == nil)) then
print(format_utils.formatFullAddressCategory(host))
if(host.services) then
if(host.services.dhcp) then print(' <span class="badge bg-info">'..i18n("details.label_dhcp_server")..'</span>') end
if(host.services.dns) then print(' <span class="badge bg-info">'..i18n("details.label_dns_server")..'</span>') end
if(host.services.smtp) then print(' <span class="badge bg-info">'..i18n("details.label_smtp_server")..'</span>') end
if(host.services.ntp) then print(' <span class="badge bg-info">'..i18n("details.label_ntp_server")..'</span>') end
if(host.services.dhcp) then print(' <span class="badge bg-success">'..i18n("details.label_dhcp_server")..'</span>') end
if(host.services.dns) then print(' <span class="badge bg-success">'..i18n("details.label_dns_server")..'</span>') end
if(host.services.smtp) then print(' <span class="badge bg-success">'..i18n("details.label_smtp_server")..'</span>') end
if(host.services.ntp) then print(' <span class="badge bg-success">'..i18n("details.label_ntp_server")..'</span>') end
end
if(host["dhcp_server"] == true) then print(' <span class="badge bg-info">'..i18n("details.label_dhcp_server")..'</span>') end
if(host["systemhost"] == true) then print(' <span class="badge bg-info"><i class=\"fas fa-flag\" title=\"'..i18n("details.label_system_ip")..'\"></i></span>') end
if(host["dhcp_server"] == true) then print(' <span class="badge bg-success">'..i18n("details.label_dhcp_server")..'</span>') end
if(host["systemhost"] == true) then print(' <span class="badge bg-success"><i class=\"fas fa-flag\" title=\"'..i18n("details.label_system_ip")..'\"></i></span>') end
if(host["is_blacklisted"] == true) then print(' <span class="badge bg-danger">'..i18n("details.label_blacklisted_host")..'</span>') end
if((host["privatehost"] == false) and (host["is_multicast"] == false) and (host["is_broadcast"] == false)) then
print(' <A HREF="https://www.virustotal.com/gui/ip-address/'.. host["ip"] ..'/detection" target=_blank><img width="100" height="20" src=\"'

View file

@ -792,7 +792,7 @@ print[[
print('<td><div class="progress"><div class="progress-bar bg-warning" style="width: ' .. (tx * 100 / tot) .. '%;">'.. i18n("sent") ..'</div>')
print('<div class="progress-bar bg-info" style="width: ' .. (rx * 100 / tot) .. '%;">'.. i18n("received")..'</div></div></td>')
print('<div class="progress-bar bg-success" style="width: ' .. (rx * 100 / tot) .. '%;">'.. i18n("received")..'</div></div></td>')
print("</tr>")

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"])