push
travis-ci
1 of 1 new or added line in 1 file covered. (100.0%)
5638 of 9451 relevant lines covered (59.66%)
6.05 hits per line
1 |
require "cwm/common_widgets"
|
1✔ |
2 |
|
|
3 |
module Y2Network |
1✔ |
4 |
module Widgets |
1✔ |
5 |
class VlanID < CWM::IntField |
1✔ |
6 |
def initialize(config) |
1✔ |
7 |
textdomain "network"
|
5✔ |
8 |
|
|
9 |
@config = config
|
5✔ |
10 |
end
|
|
11 |
|
|
12 |
def label |
1✔ |
13 |
_("VLAN ID")
|
1✔ |
14 |
end
|
|
15 |
|
|
16 |
def help |
1✔ |
17 |
# TODO: previously not exist, so write it
|
|
18 |
""
|
1✔ |
19 |
end
|
|
20 |
|
|
21 |
def init |
1✔ |
22 |
self.value = (@config["VLAN_ID"] || "0").to_i |
× |
23 |
end
|
|
24 |
|
|
25 |
def store |
1✔ |
|
@config["VLAN_ID"] = value.to_s |
× |
27 |
end
|
|
28 |
|
|
29 |
def minimum |
1✔ |
30 |
0
|
× |
31 |
end
|
|
32 |
|
|
33 |
def maximum |
1✔ |
34 |
9999
|
× |
35 |
end
|
|
36 |
end
|
|
37 |
end
|
|
38 |
end
|