From 849d153851db2fc193c1c82648dbe719463d3a38 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 4 Aug 2018 22:09:49 +0200 Subject: treewide: rework uci change display - Use native rpcd uci changes format instead of incompletely converting back and forth between the old and the new format - Rework uci changelog template to print the equivalent uci commands for the various changes - Rework theme headers to properly count the uncomitted changes - Rework theme CSS to properly style new changelog Signed-off-by: Jo-Philipp Wich --- .../luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'themes/luci-theme-bootstrap/luasrc/view') diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm index 6ad32efb47..4347f133a4 100644 --- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm +++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm @@ -136,12 +136,9 @@ if tree.nodes[category] and tree.nodes[category].ucidata then local ucichanges = 0 + local i, j for i, j in pairs(require("luci.model.uci").cursor():changes()) do - for k, l in pairs(j) do - for m, n in pairs(l) do - ucichanges = ucichanges + 1; - end - end + ucichanges = ucichanges + #j end if ucichanges > 0 then -- cgit v1.2.3