<%- local sys = require "luci.sys" if firstmap and messages then local msg; for _, msg in ipairs(messages) do local a, b, msgEdited msg = tostring(msg) b = 0 -- In this context 0 will mean "no tag" a = msg:sub(1, 4) if a == "wrn:" then b = 1 -- In this context 1 will mean "warning" elseif a == "err:" then b = 2 -- In this context 2 will mean "error" elseif a == "scs:" then b = 3 -- 3 will mean success end if b == 1 then msgEdited = msg:sub(5) -- Grab a substring starting with the 5-th character and ending at with the last -%>
<%=pcdata(msgEdited)%>
<%- elseif b == 2 then msgEdited = msg:sub(5) -- Grab a substring starting with the 5-th character and ending at with the last -%>
<%=pcdata(msgEdited)%>
<%- elseif b == 3 then msgEdited = msg:sub(5) -%>
<%=pcdata(msgEdited)%>
<%- else -%>
<%=pcdata(msg)%>
<%- end end -- To end the for loop end -- To end the master if statement -%> <%-+cbi/apply_xhr-%>
<%- if firstmap and applymap then cbi_apply_xhr(self.config, parsechain, redirect) end -%> <% if self.title and #self.title > 0 then %>

<%=self.title%>

<% end %> <% if self.description and #self.description > 0 then %>
<%=self.description%>
<% end %> <%- self:render_children() %>