• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yast / yast-firewall / 10734245145

06 Sep 2024 07:23AM UTC coverage: 94.948%. Remained the same
10734245145

push

github

lslezak
Clean merge of SP7

1184 of 1247 relevant lines covered (94.95%)

5.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

65.0
/src/lib/y2firewall/dialogs/modify_zone_interfaces.rb
1
# Copyright (c) [2018] SUSE LLC
2
#
3
# All Rights Reserved.
4
#
5
# This program is free software; you can redistribute it and/or modify it
6
# under the terms of version 2 of the GNU General Public License as published
7
# by the Free Software Foundation.
8
#
9
# This program is distributed in the hope that it will be useful, but WITHOUT
10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12
# more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with this program; if not, contact SUSE LLC.
16
#
17
# To contact SUSE LLC about this file by physical or electronic mail, you may
18
# find current contact information at www.suse.com.
19

20
require "cwm"
1✔
21
require "cwm/popup"
1✔
22
require "y2firewall/widgets/modify_zone_interfaces"
1✔
23

24
module Y2Firewall
1✔
25
  module Dialogs
1✔
26
    # This dialog allows the user to modify the interfaces belonging to a
27
    # specific zone.
28
    class ModifyZoneInterfaces < ::CWM::Popup
1✔
29
      # Constructor
30
      def initialize
1✔
31
        super()
×
32
        textdomain "firewall"
×
33
      end
34

35
      # @macro seeAbstractWidget
36
      def title
1✔
37
        _("Modify Interfaces")
×
38
      end
39

40
      # @macro seeCustomWidget
41
      def contents
1✔
42
        VBox(
×
43
          zone_chooser(zone_interfaces),
44
          zone_interfaces
45
        )
46
      end
47

48
    private
1✔
49

50
      # @return [Array<Yast::Term>] List of buttons to display
51
      def buttons
1✔
52
        [ok_button, cancel_button]
×
53
      end
54

55
      # Returns a combo box to select the zone
56
      #
57
      # @note The widget is 'memoized'.
58
      #
59
      # @param interfaces_input [CWM::InputField] input field for modifying the
60
      #   selected zone interfaces
61
      # @return [Y2Firewall::Widgets::ZoneInterfacesSelector]
62
      def zone_chooser(interfaces_input)
1✔
63
        @zone_chooser ||= Y2Firewall::Widgets::ZoneInterfacesSelector.new(interfaces_input)
×
64
      end
65

66
      # Returns a input field to modify the zone interfaces
67
      #
68
      # @note The widget is 'memoized'.
69
      #
70
      # @return [Y2Firewall::Widgets::ZoneInterfaces]
71
      def zone_interfaces
1✔
72
        @zone_interfaces ||= Y2Firewall::Widgets::ZoneInterfaces.new
×
73
      end
74
    end
75
  end
76
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc