Module: Yast::FirewallSubdialogsInclude
- Defined in:
- ../../src/include/firewall/subdialogs.rb
Instance Method Summary (collapse)
- - (Object) AddCustomFirewallRule
- - (Object) AdditionalServices(zone_name)
-
- (Object) AdditionalSettingsForZones(zones_additons)
Function returns dialog for additional zone strings (like 'any', 'auto'…).
- - (Object) AddRedirectToMasqueradedIPRule
- - (Object) AllowedServices
- - (Object) BoxSummary
-
- (Object) BroadcastConfigurationSimple
Only for Expert configuration.
- - (Object) BroadcastReply
-
- (Object) CustomFirewallRules
Only for Expert configuration.
- - (Object) ExpertAcceptRules
-
- (Object) FirewallInterfaces
TERM FUNCTIONS, WHOLE DIALOGS OR FRAMES.
- - (Object) GetDefinedServicesListedItems
- - (Object) GetZonesListedItems
-
- (Object) HTMLWrong(emphasize_string)
local helper function for Summary.
- - (Object) initialize_firewall_subdialogs(include_target)
-
- (Object) IPsecSupport
Only for Expert configuration.
- - (Object) IPsecTrustAsZone
-
- (Boolean) IsThisExpertConfiguration
Function returns if this UI is an Expert UI.
-
- (Object) LoggingLevel
Only for Expert configuration.
- - (Object) Masquerading
-
- (Object) RedirectToMasqueradedIP
term AddNetworkMasqueradeRule () { term dialog =
Frame ( // TRANSLATORS: frame label _("Add New Allowed Masquerading Rule"),
VBox (HBox (
HWeight ( 50,VBox ( // TRANSLATORS: editable select box
ComboBox (id("add_source_network"),
opt(editable,
hstretch), _(“&Source Network”), [item(
id(“0/0”), “0/0”) ]), // TRANSLATORS: editable select boxComboBox (
id(“add_protocol”),opt(
editable,hstretch), _("&Protocol"), [
item(id(""), ""),
item(id("tcp"), "tcp"),
item(id("tcp"), "udp") ]) )),
HWeight ( 50,VBox ( // TRANSLATORS: editable select box
ComboBox (id("add_destination_network"),
opt(editable,
hstretch), _(“Destination Network”), [item(
id(“0/0”), “0/0”) ]), // TRANSLATORS: text entryInputField (
id(“add_destination_port”),opt (
hstretch), _(“Port”)) )) ),VSpacing(1),
HBox (PushButton(
id(“ok”), Label::AddButton()),PushButton(
id(“cancel”), Label::CancelButton()) ) ) ); return dialog; }. - - (Object) SetFirewallInterfaceIntoZone(device, interface, zones)
Instance Method Details
- (Object) AddCustomFirewallRule
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 |
# File '../../src/include/firewall/subdialogs.rb', line 1079 def AddCustomFirewallRule VBox( Frame( _("Add New Allowing Rule"), VBox( InputField( Id("add_source_network"), Opt(:hstretch), _("Source &Network") ), Left( ComboBox( Id("add_protocol"), _("&Protocol"), [ Item(Id("tcp"), SuSEFirewall.GetProtocolTranslatedName("tcp")), Item(Id("udp"), SuSEFirewall.GetProtocolTranslatedName("udp")), Item( Id("_rpc_"), SuSEFirewall.GetProtocolTranslatedName("_rpc_") ) ] ) ), InputField( Id("add_destination_port"), Opt(:hstretch), _("&Destination Port (Optional)") ), InputField( Id("add_source_port"), Opt(:hstretch), _("&Source Port (Optional)") ), InputField( Id("add_options"), Opt(:hstretch), _("Additional &Options (Optional)") ) ) ), VSpacing(1), ButtonBox( PushButton( Id("ok"), Opt(:okButton, :default, :key_F10), Label.AddButton ), PushButton( Id("cancel"), Opt(:cancelButton, :key_F9), Label.CancelButton ) ) ) end |
- (Object) AdditionalServices(zone_name)
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File '../../src/include/firewall/subdialogs.rb', line 378 def AdditionalServices(zone_name) dialog = HBox( # help text with a defined minimal size MinSize(30, 12, RichText(Id(:help_text), "")), HSpacing(1.5), Top( Frame( # TRANSLATORS: frame label _("Additional Allowed Ports"), VBox( HSpacing(45), VSpacing(1), # TRANSLATORS: label, %1 is a zone name like "External Zone" Left( Label(Builtins.sformat(_("Settings for Zone: %1"), zone_name)) ), # TRANSLATORS: text entry InputField(Id("additional_tcp"), Opt(:hstretch), _("&TCP Ports")), # TRANSLATORS: text entry InputField(Id("additional_udp"), Opt(:hstretch), _("&UDP Ports")), # TRANSLATORS: text entry InputField(Id("additional_rpc"), Opt(:hstretch), _("&RPC Ports")), # TRANSLATORS: text entry InputField( Id("additional_ip"), Opt(:hstretch), _("&IP Protocols") ), VSpacing(1), ButtonBox( PushButton( Id("ok"), Opt(:okButton, :key_F10, :default), Label.OKButton ), PushButton( Id("cancel"), Opt(:cancelButton, :key_F9), Label.CancelButton ) ) ) ) ) ) deep_copy(dialog) end |
- (Object) AdditionalSettingsForZones(zones_additons)
Function returns dialog for additional zone strings (like 'any', 'auto'…)
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File '../../src/include/firewall/subdialogs.rb', line 164 def AdditionalSettingsForZones(zones_additons) zones_additons = deep_copy(zones_additons) user_defined_zones = VBox() Builtins.foreach(zones_additons) do |zone_id, zone_attributes| user_defined_zones = Builtins.add( user_defined_zones, InputField( Id(Ops.add("zone_additions_", zone_id)), Opt(:hstretch), Ops.get(zone_attributes, "name", ""), Ops.get(zone_attributes, "items", "") ) ) end dialog = Frame( # TRANSLATORS: frame label _("Additional Interface Settings for Zones"), VBox( HStretch(), VSpacing(1), user_defined_zones, VSpacing(1), VSpacing(1), ButtonBox( PushButton( Id("ok"), Opt(:okButton, :default, :key_F10), Label.OKButton ), PushButton( Id("cancel"), Opt(:cancelButton, :key_F9), Label.CancelButton ) ) ) ) deep_copy(dialog) end |
- (Object) AddRedirectToMasqueradedIPRule
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File '../../src/include/firewall/subdialogs.rb', line 543 def AddRedirectToMasqueradedIPRule dialog = Frame( # TRANSLATORS: frame label _("Add Masqueraded Redirect Rule"), VBox( VSpacing(1), # TRANSLATORS: section title in popup window Left(Label(_("Redirect Matching Rule:"))), HBox( VBox( # TRANSLATORS: editable select box ComboBox( Id("add_source_network"), Opt(:editable, :hstretch), _("&Source Network"), [Item(Id("0/0"), "0/0")] ), # TRANSLATORS: text entry InputField( Id("add_requested_ip"), Opt(:hstretch), _("Re&quested IP (Optional)") ) ), HSpacing(1), VBox( # TRANSLATORS: select box ComboBox( Id("add_protocol"), Opt(:hstretch), _("&Protocol"), [Item(Id("tcp"), "TCP"), Item(Id("udp"), "UDP")] ), # TRANSLATORS: text entry InputField( Id("add_requested_port"), Opt(:hstretch), _("R&equested Port") ) ) ), VSpacing(1), # TRANSLATORS: section title in popup window Left(Label(_("Redirection:"))), HBox( # TRANSLATORS: text entry InputField( Id("add_redirectto_ip"), Opt(:hstretch), _("Re&direct to Masqueraded IP") ), HSpacing(1), # TRANSLATORS: text entry InputField( Id("add_redirectto_port"), Opt(:hstretch), _("&Redirect to Port (Optional)") ) ), VSpacing(1), ButtonBox( PushButton( Id("ok"), Opt(:okButton, :default, :key_F10), Label.AddButton ), PushButton( Id("cancel"), Opt(:cancelButton, :key_F9), Label.CancelButton ) ) ) ) deep_copy(dialog) end |
- (Object) AllowedServices
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
# File '../../src/include/firewall/subdialogs.rb', line 260 def AllowedServices dialog = VBox( Left( ComboBox( Id("allowed_services_zone"), Opt(:notify), # TRANSLATORS: combo box _("All&owed Services for Selected Zone"), GetZonesListedItems() ) ), VSpacing(1), HBox( VBox( Opt(:hstretch), Left( ReplacePoint( Id("allow_service_names_replacepoint"), # items handled by replacepoint # TRANSLATORS: combo box ComboBox(Id("allow_service_names"), _("&Service to Allow"), []) ) ), Table( Id("table_allowed_services"), Opt(:hstretch, :vstretch, :keepSorting), Header( # TRANSLATORS: table header item _("Allowed Service"), # TRANSLATORS: table header item _("Description") ), [] ), VSpacing(1), Left( CheckBox( Id("protect_from_internal"), Opt(:notify), # TRANSLATORS: check box _("&Protect Firewall from Internal Zone") ) ) ), HSquash( VBox( VSpacing(1.1), PushButton( Id("add_allowed_service"), Opt(:hstretch, :key_F3), Ops.add(Ops.add(" ", Label.AddButton), " ") ), PushButton( Id("remove_allowed_service"), Opt(:hstretch, :key_F5), Ops.add(Ops.add(" ", Label.DeleteButton), " ") ), Empty(Opt(:vstretch)), # TRANSLATORS: push button PushButton( Id("advanced_allowed_service"), Opt(:hstretch, :key_F7), " " + _("A&dvanced...") + " " ) ) ) ) ) deep_copy(dialog) end |
- (Object) BoxSummary
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
# File '../../src/include/firewall/subdialogs.rb', line 1141 def BoxSummary dialog = VBox( # TRANSLATORS: informative label in dialog RichText(Id("box_summary_richtext"), _("Creating summary...")), VSpacing(1), # TRANSLATORS: check box in summary dialog Left(CheckBox(Id("show_details"), Opt(:notify), _("&Show Details"))) ) deep_copy(dialog) end |
- (Object) BroadcastConfigurationSimple
Only for Expert configuration
term BroadcastConfigurationExpert () {
term dialog = <code>Frame (
_("Broadcast Configuration"),
</code>VBox (
RadioButtonGroup (
id("broadcast_configuration"),
<code>VBox (
</code>Left ( RadioButton
(
id("drop_incoming"), _("Drop Incoming
Broadcast")) ),
Left(
RadioButton
(<code>id("allow_incoming"), _("Allow Incoming
Broadcast")) )
)
),
</code>HBox (
<code>HWeight(
4,
</code>Empty()
),
<code>HWeight(
50,
</code>MultiSelectionBox
(<code>id("accept_broadcast_packets"),
_("Firewall Zones Allowing Broadcast Packets"),
GetZonesListedItems()
)
)
),
</code>Left (
CheckBox
(
id("dropped_packets"), _("Log Not Accepted Broadcast
Packets"))
)
)
);
return dialog; }
897 898 899 900 901 902 903 904 |
# File '../../src/include/firewall/subdialogs.rb', line 897 def BroadcastConfigurationSimple dialog = Frame( _("Broadcast Configuration"), ReplacePoint(Id("replace_point_bcast"), Empty()) ) deep_copy(dialog) end |
- (Object) BroadcastReply
906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 |
# File '../../src/include/firewall/subdialogs.rb', line 906 def BroadcastReply dialog = VBox( Left(Label(_("Accepting the Broadcast Reply"))), Table( Id("table_broadcastreply"), Header(_("Zone"), _("Service"), _("Accepted from Network")), [] ), Left( HBox( PushButton(Id(:add_br), Opt(:key_F3), _("&Add...")), PushButton(Id(:delete_br), Opt(:key_F5), _("&Delete")) ) ) ) deep_copy(dialog) end |
- (Object) CustomFirewallRules
Only for Expert configuration
term IPv6Support () { term dialog = <code>Frame ( _("IPv6 Support"), </code>VBox ( `Label ("H I C S U N T L E O N E S") ) );
return dialog; }
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
# File '../../src/include/firewall/subdialogs.rb', line 1039 def CustomFirewallRules dialog = Frame( _("Custom Allowed Rules"), VBox( Left( ComboBox( Id("custom_rules_firewall_zone"), Opt(:notify), # TRANSLATORS: combo box _("Firewall &Zone"), GetZonesListedItems() ) ), VSpacing(1), Table( Id("custom_rules_table"), Header( _("Source Network"), _("Protocol"), _("Destination Port"), _("Source Port"), _("Options") ), [] ), HBox( PushButton(Id("add_custom_rule"), Opt(:key_F3), Label.AddButton), PushButton( Id("remove_custom_rule"), Opt(:key_F5), Label.DeleteButton ), HStretch() ) ) ) deep_copy(dialog) end |
- (Object) ExpertAcceptRules
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File '../../src/include/firewall/subdialogs.rb', line 332 def ExpertAcceptRules dialog = VBox( Left( ComboBox( Id("allowed_services_zone"), Opt(:notify), # TRANSLATORS: combo box _("Expert Rules Services for Selected Zone"), GetZonesListedItems() ) ), VSpacing(1), VBox( Table( Id("table_expert_accept_rules"), Header( # TRANSLATORS: table header item _("Source Network"), # TRANSLATORS: table header item _("Protocol"), # TRANSLATORS: table header item _("Destination Port"), # TRANSLATORS: table header item _("Source Port") ), [] ), HBox( PushButton( Id("add_redirect_to_masquerade"), Opt(:key_F3), Label.AddButton ), PushButton( Id("remove_redirect_to_masquerade"), Opt(:key_F5), Label.DeleteButton ), HStretch() ) ) ) deep_copy(dialog) end |
- (Object) FirewallInterfaces
TERM FUNCTIONS, WHOLE DIALOGS OR FRAMES
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File '../../src/include/firewall/subdialogs.rb', line 76 def FirewallInterfaces # Network Manager network_manager = Empty() #if (NetworkService::IsManaged()) network_manager = `Left ( # // TRANSLATORS: an informative text # // When using a Network Manager, Firewall cannot determine NM-handled network interfaces # `Label (_("Interfaces controlled by NetworkManager are not listed.")) #); dialog = Frame( # TRANSLATORS: Frame label _("Firewall Interfaces"), VBox( network_manager, Table( Id("table_firewall_interfaces"), Opt(:notify, :immediate), Header( # TRANSLATORS: table header item _("Device"), # TRANSLATORS: table header item _("Interface or String"), # TRANSLATORS: table header item _("Configured In") ), [] ), HBox( # TRANSLATORS: push button PushButton( Id("change_firewall_interface"), Opt(:key_F4), _("&Change...") ), # TRANSLATORS: push button PushButton( Id("user_defined_firewall_interface"), Opt(:key_F7), _("C&ustom...") ), HStretch() ) ) ) deep_copy(dialog) end |
- (Object) GetDefinedServicesListedItems
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File '../../src/include/firewall/subdialogs.rb', line 233 def GetDefinedServicesListedItems services_list = [] # sorted by service_name instead of service_id translations_to_service_ids = {} Builtins.foreach(SuSEFirewallServices.GetSupportedServices) do |service_id, service_name| # checking for yet defined name... if Ops.get(translations_to_service_ids, service_name) != nil Builtins.y2error( "More services with the same translation: %1", service_name ) end Ops.set(translations_to_service_ids, service_name, service_id) end Builtins.foreach(translations_to_service_ids) do |service_name, service_id| services_list = Builtins.add( services_list, Item(Id(service_id), service_name) ) end deep_copy(services_list) end |
- (Object) GetZonesListedItems
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File '../../src/include/firewall/subdialogs.rb', line 54 def GetZonesListedItems items = [] zone_names_to_zones = {} Builtins.foreach(SuSEFirewall.GetKnownFirewallZones) do |zone_id| Ops.set( zone_names_to_zones, SuSEFirewall.GetZoneFullName(zone_id), zone_id ) end Builtins.foreach(zone_names_to_zones) do |zone_name, zone_id| items = Builtins.add(items, Item(Id(zone_id), zone_name)) end deep_copy(items) end |
- (Object) HTMLWrong(emphasize_string)
local helper function for Summary
1137 1138 1139 |
# File '../../src/include/firewall/subdialogs.rb', line 1137 def HTMLWrong(emphasize_string) Builtins.sformat("<font color='#993300'>%1</font>", emphasize_string) end |
- (Object) initialize_firewall_subdialogs(include_target)
35 36 37 38 39 40 41 42 43 44 45 |
# File '../../src/include/firewall/subdialogs.rb', line 35 def initialize_firewall_subdialogs(include_target) textdomain "firewall" Yast.import "Label" Yast.import "ProductFeatures" Yast.import "SuSEFirewallServices" Yast.import "SuSEFirewall" # UI VARIABLES AND FUNCTIONS @expert_ui = ProductFeatures.GetFeature("globals", "ui_mode") == "expert" end |
- (Object) IPsecSupport
Only for Expert configuration
term AdvancedSecuritySettings () {
term dialog = <code>Frame (
_("Advanced Security Settings"),
</code>VBox (
Left(
ComboBox (<code>id("disallowed_packets"),
_("Disallowed Packets"),
[
</code>item(<code>id("drop"),
_("Drop")),
</code>item(<code>id("drop"),
_("Reject"))
])),
</code>Left ( CheckBox
(
id("block_new_connections"), _("Block New
Connections from This Host")) ),
Left (
CheckBox
(<code>id("allow_ping"), _("Allow to Ping This
Host")) ),
</code>Left ( CheckBox
(
id("allow_traceroute"), _("Allow Traceroute through
This Host")) )
)
);
return dialog; }
969 970 971 972 973 974 975 976 977 978 979 980 981 982 |
# File '../../src/include/firewall/subdialogs.rb', line 969 def IPsecSupport dialog = Frame( _("IPsec Support"), HBox( # TRANSLATORS: check box Left(CheckBox(Id("ispsec_support"), _("&Enabled"))), HStretch(), # TRANSLATORS: push button Right(PushButton(Id("ipsec_details"), _("&Details..."))) ) ) deep_copy(dialog) end |
- (Object) IPsecTrustAsZone
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 |
# File '../../src/include/firewall/subdialogs.rb', line 984 def IPsecTrustAsZone trust_zones = Builtins.add( GetZonesListedItems(), Item( Id("no"), # TRANSLATORS: select box item, trust IPsec packet the same as the origin of the packet _("Same Zone as Original Source Network") ) ) dialog = Frame( # TRANSLATORS: frame label _("IPsec Zone"), VBox( VSpacing(1), Left( ComboBox( Id("trust_ipsec_as"), # TRANSLATORS: select box _("&Trust IPsec As"), trust_zones ) ), VSpacing(1), ButtonBox( PushButton( Id("ok"), Opt(:okButton, :default, :key_F10), Label.OKButton ), PushButton( Id("cancel"), Opt(:cancelButton, :key_F9), Label.CancelButton ) ) ) ) deep_copy(dialog) end |
- (Boolean) IsThisExpertConfiguration
Function returns if this UI is an Expert UI.
50 51 52 |
# File '../../src/include/firewall/subdialogs.rb', line 50 def IsThisExpertConfiguration @expert_ui end |
- (Object) LoggingLevel
Only for Expert configuration
term LoggingTuning () {
term dialog = <code>Frame (
_("Logging Tuning"),
</code>VBox (
<code>Left
(
</code>HBox (
// FIXME: fake frequency
HVSquash
(
InputField (id("frequency"),
opt
(<code>hstretch), _("Frequency"),
"3")),
</code>VBox ( Label(""),
Label
("/") ),
ComboBox (
id("unit"),
_("Unit"), [ item(
id("second"),
_("Second")), item(
id("minute"),
_("Minute")), item(
id("hour"),
_("Hour")), item(
id("day"),
_("Day")) ])
)
),
<code>Left (
</code>HBox (
//
FIXME: fake log file
InputField (
id("file_name"),
opt (
hstretch), Label::FileName(),
"/var/log/SuSEfirewall2"),
VBox
(
Label(""), PushButton
(
id("browse_logfile"), Label::BrowseButton()) )
)
)
)
);
return dialog; }
828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 |
# File '../../src/include/firewall/subdialogs.rb', line 828 def LoggingLevel = [ # TRANSLATORS: select box item Item(Id("ALL"), _("Log All")), # TRANSLATORS: select box item Item(Id("CRIT"), _("Log Only Critical")), # TRANSLATORS: select box item Item(Id("NONE"), _("Do Not Log Any")) ] dialog = VBox( Frame( _("Logging Level"), VBox( Left( # TRANSLATORS: select box ComboBox( Id("logging_ACCEPT"), _("&Logging Accepted Packets"), ) ), Left( # TRANSLATORS: select box ComboBox( Id("logging_DROP"), _("L&ogging Not Accepted Packets"), ) ) ) ) ) deep_copy(dialog) end |
- (Object) Masquerading
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File '../../src/include/firewall/subdialogs.rb', line 207 def Masquerading dialog = Frame( # TRANSLATORS: frame label _("Masquerading"), VBox( ReplacePoint(Id("replacepoint_masquerade_information"), Empty()), #, #(IsThisExpertConfiguration() ? # TRANSLATORS: select box # `Left( `ComboBox(`id("masquerade_outer_zone"), _("Zone &to Masquerade On"), GetZonesListedItems() ) ) # : # nil #) Left( CheckBox( Id("masquerade_networks"), Opt(:notify), # TRANSLATORS: check box _("&Masquerade Networks") ) ) ) ) deep_copy(dialog) end |
- (Object) RedirectToMasqueradedIP
term AddNetworkMasqueradeRule () {
term dialog = <code>Frame (
//
TRANSLATORS: frame label
_("Add New Allowed Masquerading
Rule"),
</code>VBox (
<code>HBox (
</code>HWeight (
50,
<code>VBox (
// TRANSLATORS: editable select
box
</code>ComboBox
(id("add_source_network"),
opt(editable,
hstretch),
_("&Source Network"), [
item(
id("0/0"), "0/0") ]),
//
TRANSLATORS: editable select box
ComboBox
(
id("add_protocol"),
opt(
editable,<code>hstretch),
_("&Protocol"), [
</code>item(
<code>id(""), ""),
</code>item(
<code>id("tcp"), "tcp"),
</code>item(
<code>id("tcp"), "udp")
])
)),
</code>HWeight ( 50,
<code>VBox (
// TRANSLATORS:
editable select box
</code>ComboBox
(id("add_destination_network"),
opt(editable,
hstretch),
_("Destination Network"), [
item(
id("0/0"), "0/0") ]),
//
TRANSLATORS: text entry
InputField
(
id("add_destination_port"), opt (
hstretch),
_("Port"))
))
),
<code>VSpacing(1),
</code>HBox (
PushButton(
id("ok"), Label::AddButton()),
PushButton(
id("cancel"), Label::CancelButton())
)
)
);
return dialog; }
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
# File '../../src/include/firewall/subdialogs.rb', line 500 def RedirectToMasqueradedIP dialog = Frame( # TRANSLATORS: frame label _("Redirect Requests to Masqueraded IP"), VBox( Table( Id("table_redirect_masq"), Header( # TRANSLATORS: table header item _("Source Network"), # TRANSLATORS: table header item _("Protocol"), # TRANSLATORS: table header item, Req. == Requested _("Req. IP"), # TRANSLATORS: table header item, Req. == Requested _("Req. Port"), "", # TRANSLATORS: table header item, Redir. == Redirect _("Redir. to IP"), # TRANSLATORS: table header item, Redir. == Redirect _("Redir. to Port") ), [] ), HBox( PushButton( Id("add_redirect_to_masquerade"), Opt(:key_F3), Label.AddButton ), PushButton( Id("remove_redirect_to_masquerade"), Opt(:key_F5), Label.DeleteButton ), HStretch() ) ) ) deep_copy(dialog) end |
- (Object) SetFirewallInterfaceIntoZone(device, interface, zones)
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File '../../src/include/firewall/subdialogs.rb', line 124 def SetFirewallInterfaceIntoZone(device, interface, zones) zones = deep_copy(zones) dialog = Frame( # TRANSLATORS: frame label _("Zone for Network Interface"), VBox( HBox( VBox( # FIXME: this label should show an interface name got as parameter Left(Label(device)), Left(Label(interface)) ), ComboBox( Id("zone_for_interface"), Opt(:hstretch), # TRANSLATORS: select box _("&Interface Zone"), zones ) ), VSpacing(1), ButtonBox( PushButton( Id("ok"), Opt(:okButton, :default, :key_F10), Label.OKButton ), PushButton( Id("cancel"), Opt(:cancelButton, :key_F9), Label.CancelButton ) ) ) ) deep_copy(dialog) end |