|
@@ -88,6 +88,39 @@ proto = mwan_rule:option(DummyValue, "proto", translate("Protocol"))
|
88
|
88
|
return self.map:get(s, "proto") or "all"
|
89
|
89
|
end
|
90
|
90
|
|
|
91
|
+sticky = mwan_rule:option(DummyValue, "sticky", translate("Sticky"))
|
|
92
|
+ sticky.rawhtml = true
|
|
93
|
+ function sticky.cfgvalue(self, s)
|
|
94
|
+ if self.map:get(s, "sticky") == "1" then
|
|
95
|
+ stickied = 1
|
|
96
|
+ return "Yes"
|
|
97
|
+ else
|
|
98
|
+ stickied = nil
|
|
99
|
+ return "No"
|
|
100
|
+ end
|
|
101
|
+ end
|
|
102
|
+
|
|
103
|
+timeout = mwan_rule:option(DummyValue, "timeout", translate("Sticky timeout"))
|
|
104
|
+ timeout.rawhtml = true
|
|
105
|
+ function timeout.cfgvalue(self, s)
|
|
106
|
+ if stickied then
|
|
107
|
+ local timeoutValue = self.map:get(s, "timeout")
|
|
108
|
+ if timeoutValue then
|
|
109
|
+ return timeoutValue .. "s"
|
|
110
|
+ else
|
|
111
|
+ return "600s"
|
|
112
|
+ end
|
|
113
|
+ else
|
|
114
|
+ return "—"
|
|
115
|
+ end
|
|
116
|
+ end
|
|
117
|
+
|
|
118
|
+ipset = mwan_rule:option(DummyValue, "ipset", translate("IPset"))
|
|
119
|
+ ipset.rawhtml = true
|
|
120
|
+ function ipset.cfgvalue(self, s)
|
|
121
|
+ return self.map:get(s, "ipset") or "—"
|
|
122
|
+ end
|
|
123
|
+
|
91
|
124
|
use_policy = mwan_rule:option(DummyValue, "use_policy", translate("Policy assigned"))
|
92
|
125
|
use_policy.rawhtml = true
|
93
|
126
|
function use_policy.cfgvalue(self, s)
|