luci-app-mwan3: show default values in interface page if config is not found 1727/head
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 5 Apr 2018 12:36:54 +0000 (14:36 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 6 Apr 2018 10:56:57 +0000 (12:56 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua

index 4701c4a7f3107cfc24a7afda29df9c395058ca68..162b388d17e944319e95615fbb3d365412edad8f 100644 (file)
@@ -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 "&#8212;"
+               return self.map:get(s, "track_method") or "ping"
        else
                return "&#8212;"
        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 "&#8212;"
+               return self.map:get(s, "reliability") or "1"
        else
                return "&#8212;"
        end
@@ -196,7 +196,7 @@ function interval.cfgvalue(self, s)
                if intervalValue then
                        return intervalValue .. "s"
                else
-                       return "&#8212;"
+                       return "5s"
                end
        else
                return "&#8212;"
@@ -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 "&#8212;"
+               return self.map:get(s, "down") or "3"
        else
                return "&#8212;"
        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 "&#8212;"
+               return self.map:get(s, "up") or "3"
        else
                return "&#8212;"
        end