ACC SHELL
/**
* File: include/firewall/dialogs.ycp
* Package: Configuration YaST2 Firewall
* Summary: Configuration screens
* Authors: Lukas Ocilka <locilka@suse.cz>
*
* $Id: subdialogs.ycp 59658 2009-11-20 12:16:59Z locilka $
*
* Configuration dialogs divided into smaller logic groups.
* Both Expert and Simple.
*/
{
textdomain "firewall";
import "Label";
import "ProductFeatures";
import "SuSEFirewallServices";
import "SuSEFirewall";
// UI VARIABLES AND FUNCTIONS
boolean expert_ui = (ProductFeatures::GetFeature ("globals", "ui_mode") == "expert");
/**
* Function returns if this UI is an Expert UI.
*
* @return boolean if is expert or not
*/
boolean IsThisExpertConfiguration() {
return expert_ui;
}
list <term> GetZonesListedItems () {
list <term> items = [];
map <string, string> zone_names_to_zones = $[];
foreach (string zone_id, SuSEFirewall::GetKnownFirewallZones(), {
zone_names_to_zones[SuSEFirewall::GetZoneFullName(zone_id)] = zone_id;
});
foreach (string zone_name, string zone_id, zone_names_to_zones, {
items = add (items, `item(`id(zone_id), zone_name));
});
return items;
}
// TERM FUNCTIONS, WHOLE DIALOGS OR FRAMES
term FirewallInterfaces () {
// Network Manager
term 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."))
//);
term 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"), _("&Change...")),
// TRANSLATORS: push button
`PushButton(`id("user_defined_firewall_interface"), _("C&ustom...")),
`HStretch ()
)
)
);
return dialog;
}
term SetFirewallInterfaceIntoZone (string device, string interface, list <term> zones) {
term 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())
)
)
);
return dialog;
}
/**
* Function returns dialog for additional zone strings (like 'any', 'auto'...)
*/
term AdditionalSettingsForZones (map <string, map <string, string> > zones_additons) {
term user_defined_zones = `VBox();
foreach (string zone_id, map <string, string> zone_attributes, zones_additons, {
user_defined_zones = add(user_defined_zones,
`InputField (`id("zone_additions_" + zone_id), `opt (`hstretch), zone_attributes["name"]:"", zone_attributes["items"]:"")
);
});
term 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())
)
)
);
return dialog;
}
term Masquerading () {
term dialog = `Frame (
// TRANSLATORS: frame label
_("Masquerading"),
`VBox (
`ReplacePoint( `id("replacepoint_masquerade_information"), `Empty() ),
`Left( `CheckBox(`id("masquerade_networks"), `opt(`notify),
// TRANSLATORS: check box
_("&Masquerade Networks"))
)//,
//(IsThisExpertConfiguration() ?
// TRANSLATORS: select box
// `Left( `ComboBox(`id("masquerade_outer_zone"), _("Zone &to Masquerade On"), GetZonesListedItems() ) )
// :
// nil
//)
)
);
return dialog;
}
list <term> GetDefinedServicesListedItems() {
list <term> services_list = [];
// sorted by service_name instead of service_id
map <string, string> translations_to_service_ids = $[];
foreach (string service_id, string service_name, SuSEFirewallServices::GetSupportedServices(), {
// checking for yet defined name...
if (translations_to_service_ids[service_name]:nil != nil) {
y2error("More services with the same translation: %1", service_name);
}
translations_to_service_ids[service_name] = service_id;
});
foreach (string service_name, string service_id, translations_to_service_ids, {
services_list = add (services_list, `item( `id(service_id), service_name));
});
return services_list;
}
term AllowedServices () {
term 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 ), " " + Label::AddButton() + " "),
`PushButton ( `id ( "remove_allowed_service" ), `opt ( `hstretch ), " " + Label::DeleteButton() + " "),
`Empty(`opt(`vstretch)),
// TRANSLATORS: push button
`PushButton ( `id ( "advanced_allowed_service" ), `opt ( `hstretch ), " " + _("A&dvanced...") + " ")
))
)
);
return dialog;
}
term ExpertAcceptRules () {
term 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"), Label::AddButton()),
`PushButton(`id("remove_redirect_to_masquerade"), Label::DeleteButton()),
`HStretch()
)
)
);
return dialog;
}
term AdditionalServices (string zone_name) {
term 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(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())
)
)
))
);
return dialog;
}
/**
* Expert configuration only
*
* term MasqueradeNetworks () {
* term dialog = `Frame (
* // TRANSLATORS: frame label
* _("Allowed Network Masquerading"),
* `VBox (
* `Table (
* `header (
* // TRANSLATORS: table header item
* _("Local Network"),
* // TRANSLATORS: table header item
* _("Destination Network"),
* // TRANSLATORS: table header item
* _("Protocol"),
* // TRANSLATORS: table header item
* _("Port")
* ), []
* ),
* `VSquash (
* `HBox (
* `PushButton(`id("add_masquerade_network"), Label::AddButton()),
* `PushButton(`id("remove_masquerade_network"), Label::DeleteButton())
* )
* )
* )
* );
*
* return dialog;
* }
*
*/
/*
* 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 box
* `ComboBox (`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 entry
* `InputField (`id("add_destination_port"), `opt (`hstretch), _("Port"))
* ))
* ),
* `VSpacing(1),
* `HBox (
* `PushButton(`id("ok"), Label::AddButton()),
* `PushButton(`id("cancel"), Label::CancelButton())
* )
* )
* );
*
* return dialog;
* }
*
*/
term RedirectToMasqueradedIP () {
term 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"), Label::AddButton()),
`PushButton(`id("remove_redirect_to_masquerade"), Label::DeleteButton()),
`HStretch()
)
)
);
return dialog;
}
term AddRedirectToMasqueradedIPRule () {
term 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"))
),
`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")),
// TRANSLATORS: text entry
`InputField (`id("add_redirectto_port"), `opt (`hstretch), _("&Redirect to Port"))
),
`VSpacing(1),
`ButtonBox (
`PushButton (`id ("ok"), `opt (`okButton, `default, `key_F10), Label::AddButton()),
`PushButton (`id ("cancel"), `opt (`cancelButton, `key_F9), Label::CancelButton())
)
)
);
return dialog;
}
/**
* Only for Expert configuration
*
* term TransparentLocalRedirection () {
* term dialog = `Frame (
* _("Transparent Local Redirection"),
* `VBox (
* `Left( `Label (_("Attention: Packets are transparently redirected to '127.0.0.1'."))),
* `Table (
* `header (
* _("Source Network"),
* _("Destination Network"),
* _("Protocol"),
* _("Requested Port"),
* "",
* _("Local Port")
* ),
* // FIXME: fake items
* [
* `item(`id("1"), "10.0.0.0/24", "0/0", "tcp", "http", UI::Glyph(`BulletArrowRight), "3128"),
* `item(`id("2"), "10.0.0.0/24", "0/0", "tcp", "smtp", UI::Glyph(`BulletArrowRight), "smtp"),
* ]
* ),
* `VSquash (
* `HBox (
* `PushButton(`id("add_transparent_redirection"), Label::AddButton()),
* `PushButton(`id("remove_transparent_redirection"), Label::DeleteButton())
* )
* )
* )
* );
*
* return dialog;
* }
*/
/**
* Only for Expert configuration
*
* term AddTransparentLocalRedirectionRule () {
* term dialog = `Frame (
* _("Add New Transparent Local Redirection"),
* `VBox (
* `VSpacing(1),
* `Left ( `Label(_("Transparent Redirection Matching Rule:")) ),
* `HBox (
* `HWeight ( 10,
* `ComboBox (`id("add_source_network"), `opt(`editable,`hstretch), _("Source Network"), [
* `item( `id("0/0"), "0/0")
* ])
* ),
* `HWeight ( 10,
* `ComboBox (`id("add_destination_network"), `opt(`editable,`hstretch), _("Destination Network"), [
* `item( `id("0/0"), "0/0")
* ])
* )
* ),
* `HBox (
* `HWeight ( 10,
* // FIXME: another protocols?
* `ComboBox (`id("add_protocol"), `opt(`hstretch), _("Protocol"), [
* `item( `id("tcp"), "tcp"),
* `item( `id("tcp"), "udp")
* ])
* ),
* `HWeight ( 10,
* `InputField (`id("add_destination_port"), `opt (`hstretch), _("Requested Port"))
* )
* ),
* `VSpacing(1),
* `Left ( `Label(_("Transparently Redirect To:")) ),
* `InputField (`id("add_localredirect_port"), `opt (`hstretch), _("Local Port On 127.0.0.1")),
* `VSpacing(1),
* `HBox (
* `PushButton(`id("ok"), Label::AddButton()),
* `PushButton(`id("cancel"), Label::CancelButton())
* )
* )
* );
*
* return dialog;
* }
*/
/**
* Only for Expert configuration
*
* term ForwardNetworks () {
* term dialog = `Frame (
* _("Forwarding Networks"),
* `VBox (
* `Left( `Label(_("Atention: These networks are forwarder without any firewall filtering."))),
* `Table (
* `header (
* _("Source Network"),
* _("Destination Network"),
* _("Protocol"),
* _("Port"),
* _("Flags")
* ),
* // FIXME: fake items
* [
* `item(`id("1"), "0/0", "147.42.95.2", "tcp", "http", ""),
* `item(`id("1"), "0/0", "147.42.95.2", "tcp", "smtp", "")
* ]
* ),
* `VSquash (
* `HBox (
* `PushButton(`id("add_forward_network"), Label::AddButton()),
* `PushButton(`id("remove_forward_network"), Label::DeleteButton())
* )
* )
* )
* );
*
* return dialog;
* }
*/
/**
* Only for Expert configuration
*
* term AddForwardNetworkRule () {
* term dialog = `Frame (
* _("Add New Forward Rule"),
* `VBox (
* `VSpacing(1),
* `Left ( `Label(_("Allow Forwarding Matching This Rule:")) ),
* `HBox (
* `HWeight ( 10,
* `ComboBox (`id("add_source_network"), `opt(`editable,`hstretch), _("Source Network"), [
* `item( `id("0/0"), "0/0")
* ])
* ),
* `HWeight ( 10,
* `ComboBox (`id("add_destination_network"), `opt(`editable,`hstretch), _("Destination Network"), [
* `item( `id("0/0"), "0/0")
* ])
* )
* ),
* `HBox (
* `HWeight ( 10,
* // FIXME: another protocols?
* `ComboBox (`id("add_protocol"), `opt(`hstretch), _("Protocol"), [
* `item( `id("tcp"), "tcp"),
* `item( `id("tcp"), "udp"),
* `item( `id("icmp"), "icmp"),
* `item( `id("icmp"), "esp (IPsec)"),
* `item( `id(""), ""),
* ])
* ),
* `HWeight ( 10,
* `InputField (`id("add_port"), `opt (`hstretch), _("Port"))
* )
* ),
* `VSpacing(1),
* `HBox (
* `PushButton(`id("ok"), Label::AddButton()),
* `PushButton(`id("cancel"), Label::CancelButton())
* )
* )
* );
*
* return dialog;
* }
*/
/**
* Only for Expert configuration
*
* term RoutingInZones () {
* term dialog = `Frame (
* _("Routing In Zones"),
* `Left (
* // Allow Same-Class Routing
* `CheckBox (`id("same_class_routing"),
* _("Allow Routing Between Interfaces in The Same Zone")
* )
* )
* );
*
* return dialog;
* }
*/
/**
* Only for Expert configuration
*
* term LoggingTuning () {
* term dialog = `Frame (
* _("Logging Tuning"),
* `VBox (
* `Left (
* `HBox (
* // FIXME: fake frequency
* `HVSquash ( `InputField (`id("frequency"), `opt (`hstretch), _("Frequency"), "3")),
* `VBox ( `Label(""), `Label ("/") ),
* `ComboBox (`id("unit"), _("Unit"), [
* `item(`id("second"), _("Second")),
* `item(`id("minute"), _("Minute")),
* `item(`id("hour"), _("Hour")),
* `item(`id("day"), _("Day"))
* ])
* )
* ),
* `Left (
* `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;
* }
*/
term LoggingLevel () {
list<term> logging_options = [
// 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"))
];
term dialog = `VBox (
`Frame (
_("Logging Level"),
`VBox (
`Left (
// TRANSLATORS: select box
`ComboBox (`id("logging_ACCEPT"), _("&Logging Accepted Packets"), logging_options)
),
`Left (
// TRANSLATORS: select box
`ComboBox (`id("logging_DROP"), _("L&ogging Not Accepted Packets"), logging_options)
)
)
)
);
return dialog;
}
/**
* Only for Expert configuration
*
* term BroadcastConfigurationExpert () {
* term dialog = `Frame (
* _("Broadcast Configuration"),
* `VBox (
* `RadioButtonGroup (`id("broadcast_configuration"),
* `VBox (
* `Left ( `RadioButton (`id("drop_incoming"), _("Drop Incoming Broadcast")) ),
* `Left( `RadioButton (`id("allow_incoming"), _("Allow Incoming Broadcast")) )
* )
* ),
* `HBox (
* `HWeight( 4,
* `Empty()
* ),
* `HWeight( 50,
* `MultiSelectionBox (`id("accept_broadcast_packets"),
* _("Firewall Zones Allowing Broadcast Packets"),
* GetZonesListedItems()
* )
* )
* ),
* `Left (
* `CheckBox (`id("dropped_packets"), _("Log Not Accepted Broadcast Packets"))
* )
* )
* );
*
* return dialog;
* }
*/
term BroadcastConfigurationSimple () {
term dialog = `Frame (
_("Broadcast Configuration"),
`ReplacePoint (
`id("replace_point_bcast"),
`Empty()
)
);
return dialog;
}
term BroadcastReply () {
term dialog = `VBox (
`Left (`Label (_("Accepting the Broadcast Reply"))),
`Table (
`id ("table_broadcastreply"),
`header (
_("Zone"),
_("Service"),
_("Accepted from Network")
),
[]
),
`Left (`HBox (
`PushButton (`id (`add_br), _("&Add...")),
`PushButton (`id (`delete_br), _("&Delete"))
))
);
return dialog;
}
/**
* Only for Expert configuration
*
* term HierarchicalTokenBucket () {
* term dialog = `Frame (
* _("Hierarchical Token Bucket"),
* `VBox (
* `Left ( `Label (_("Adjust upstream limit for selected interface")) ),
* `HBox (
* `HWeight ( 3,
* `ComboBox (`id("htb_interface"), _("Interface"), [
* // FIXME: fake items
* `item(`id(1), "RTL-8139 / eth-aa-bb-cc-dd-ee"),
* `item(`id(1), "Askey 815C / modem0")
* ])
* ),
* `HWeight ( 1,
* `InputField (`id("htb_unit"), `opt(`hsquash), _("kbit/sec."))
* )
* )
* )
* );
*
* return dialog;
* }
*/
/**
* Only for Expert configuration
*
* term AdvancedSecuritySettings () {
* term dialog = `Frame (
* _("Advanced Security Settings"),
* `VBox (
* `Left( `ComboBox (`id("disallowed_packets"), _("Disallowed Packets"), [
* `item(`id("drop"), _("Drop")),
* `item(`id("drop"), _("Reject"))
* ])),
* `Left ( `CheckBox (`id("block_new_connections"), _("Block New Connections from This Host")) ),
* `Left ( `CheckBox (`id("allow_ping"), _("Allow to Ping This Host")) ),
* `Left ( `CheckBox (`id("allow_traceroute"), _("Allow Traceroute through This Host")) )
* )
* );
*
* return dialog;
* }
*/
term IPsecSupport () {
term dialog = `Frame (
_("IPsec Support"),
`HBox (
// TRANSLATORS: check box
`Left ( `CheckBox (`id("ispsec_support"), _("&Enabled")) ),
`HStretch (),
// TRANSLATORS: push button
`Right ( `PushButton(`id("ipsec_details"), _("&Details...")) )
)
);
return dialog;
}
term IPsecTrustAsZone () {
list<term> trust_zones = 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")));
term 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())
)
)
);
return dialog;
}
/**
* Only for Expert configuration
*
* term IPv6Support () {
* term dialog = `Frame (
* _("IPv6 Support"),
* `VBox (
* `Label ("H I C S U N T L E O N E S")
* )
* );
*
* return dialog;
* }
*/
term CustomFirewallRules () {
term 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")
),
[]
),
`HBox (
`PushButton(`id("add_custom_rule"), Label::AddButton()),
`PushButton(`id("remove_custom_rule"), Label::DeleteButton()),
`HStretch ()
)
)
);
return dialog;
}
term AddCustomFirewallRule () {
return `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)"))
)
),
`VSpacing(1),
`ButtonBox (
`PushButton (`id ("ok"), `opt (`okButton, `default, `key_F10), Label::AddButton()),
`PushButton (`id ("cancel"), `opt (`cancelButton, `key_F9), Label::CancelButton())
)
);
}
// local helper function for Summary
string HTMLWrong (string emphasize_string) {
return sformat ("<font color='#993300'>%1</font>", emphasize_string);
}
term BoxSummary () {
term 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")))
);
return dialog;
}
/**
* Only for Expert configuration
*
* term ProposeConfiguration () {
* term dialog = `Frame (
* _("Simple Configuration Proposal"),
* `Left ( `PushButton(`id("propose_box_configuration"), _("Propose Configuration")) )
* );
*
* return dialog;
* }
*/
}
ACC SHELL 2018