push
travis-ci
2170 of 2170 new or added lines in 86 files covered. (100.0%)
5851 of 9434 relevant lines covered (62.02%)
6.61 hits per line
|
require "cwm/common_widgets"
|
1✔ |
2 |
|
|
|
module Y2Network |
1✔ |
|
module Widgets |
1✔ |
|
class VlanID < CWM::IntField |
1✔ |
|
def initialize(config) |
1✔ |
|
textdomain "network"
|
5✔ |
8 |
|
|
|
@config = config
|
5✔ |
10 |
end
|
|
11 |
|
|
|
def label |
1✔ |
|
_("VLAN ID")
|
1✔ |
14 |
end
|
|
15 |
|
|
|
def help |
1✔ |
17 |
# TODO: previously not exist, so write it
|
|
|
""
|
1✔ |
19 |
end
|
|
20 |
|
|
|
def init |
1✔ |
|
self.value = (@config["VLAN_ID"] || "0").to_i |
× |
23 |
end
|
|
24 |
|
|
|
def store |
1✔ |
|
@config["VLAN_ID"] = value.to_s |
× |
27 |
end
|
|
28 |
|
|
|
def minimum |
1✔ |
|
0
|
× |
31 |
end
|
|
32 |
|
|
|
def maximum |
1✔ |
|
9999
|
× |
35 |
end
|
|
36 |
end
|
|
37 |
end
|
|
38 |
end
|