From af3ef3390c398decd0481e3e81b5280cbe2c9ebf Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 5 Apr 2018 14:36:54 +0200 Subject: [PATCH] luci-app-mwan3: show default values in interface page if config is not found Signed-off-by: Florian Eckert --- .../luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua index 4701c4a7f3..162b388d17 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua @@ -170,7 +170,7 @@ track_method.rawhtml = true function track_method.cfgvalue(self, s) local tracked = self.map:get(s, "track_ip") if tracked then - return self.map:get(s, "track_method") or "—" + return self.map:get(s, "track_method") or "ping" else return "—" end @@ -181,7 +181,7 @@ reliability.rawhtml = true function reliability.cfgvalue(self, s) local tracked = self.map:get(s, "track_ip") if tracked then - return self.map:get(s, "reliability") or "—" + return self.map:get(s, "reliability") or "1" else return "—" end @@ -196,7 +196,7 @@ function interval.cfgvalue(self, s) if intervalValue then return intervalValue .. "s" else - return "—" + return "5s" end else return "—" @@ -208,7 +208,7 @@ down.rawhtml = true function down.cfgvalue(self, s) local tracked = self.map:get(s, "track_ip") if tracked then - return self.map:get(s, "down") or "—" + return self.map:get(s, "down") or "3" else return "—" end @@ -219,7 +219,7 @@ up.rawhtml = true function up.cfgvalue(self, s) local tracked = self.map:get(s, "track_ip") if tracked then - return self.map:get(s, "up") or "—" + return self.map:get(s, "up") or "3" else return "—" end -- 2.30.2