From 1c7624876570a3bafa946277b28b7c7a98399a3f Mon Sep 17 00:00:00 2001 From: Steve AB7PA <69524416+ab7pa@users.noreply.github.com> Date: Thu, 20 May 2021 18:46:29 -0700 Subject: [PATCH] Remove local.mesh suffix from Local Hosts hostname in newui (#108) --- files/usr/lib/lua/aredn/info.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/files/usr/lib/lua/aredn/info.lua b/files/usr/lib/lua/aredn/info.lua index 32ea869a..2e4886ce 100755 --- a/files/usr/lib/lua/aredn/info.lua +++ b/files/usr/lib/lua/aredn/info.lua @@ -144,9 +144,9 @@ function model.getArednAlert() afile:close() end end - if #alert~=0 then return alert - else return "" - end + if #alert~=0 then return alert + else return "" + end end ------------------------------------- @@ -162,9 +162,9 @@ function model.getLocalAlert() afile:close() end end - if #alert~=0 then return alert - else return "" - end + if #alert~=0 then return alert + else return "" + end end @@ -525,6 +525,7 @@ function model.getLocalHosts() } local index = 0 for hostname in entries:gmatch("%S+") do + hostname = string.gsub(hostname,".local.mesh$","") entry["hostnames"][index] = hostname index = index + 1 end