luci-app-statistics: irq plugin: handle numeric interrupt names

the `irq` plugin does not show the right data if the interrupt name is only numeric

Signed-off-by: Ronny Kotzschmar <ro.ok@me.com>
(cherry picked from commit dc25703053)
Fixes #5719
This commit is contained in:
k-ronny 2022-03-13 18:14:24 +02:00 committed by Hannu Nyman
parent 2044c3439d
commit 8cac3cbc19

View file

@ -251,8 +251,8 @@ function _string( s, n, nopad )
if not nopad then pad = "\t" end
if s then
if s:find("[^%d]") or n == "Port" then
if not s:find("[^%w]") and n ~= "Port" then
if s:find("[^%d]") or n == "Port" or n == "Irq" then
if not s:find("[^%w]") and n ~= "Port" and n ~= "Irq" then
str = pad .. n .. " " .. luci.util.trim(s)
else
str = pad .. n .. ' "' .. luci.util.trim(s) .. '"'