Author: kmachalkova Date: Mon Jun 11 10:59:56 2007 New Revision: 38371 URL: http://svn.opensuse.org/viewcvs/yast?rev=38371&view=rev Log: Allow getting/setting 'dynamic-bootp' flag for IP range (#151806) + related facelift of 'Dynamic DHCP' dialog Modified: trunk/dhcp-server/src/dialogs2.ycp trunk/dhcp-server/src/helps.ycp Modified: trunk/dhcp-server/src/dialogs2.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/dhcp-server/src/dialogs2.ycp?rev=38371&r1=38370&r2=38371&view=diff ============================================================================== --- trunk/dhcp-server/src/dialogs2.ycp (original) +++ trunk/dhcp-server/src/dialogs2.ycp Mon Jun 11 10:59:56 2007 @@ -665,46 +665,57 @@ term Common_DynamicDHCPDialog() { term dialog = `VBox( - `VBox( - // frame - `Frame (_("IP Address Range") , - `VBox( - - `HBox ( - `HWeight (2, - // TRANSLATORS: informative text entry (filled up, disabled) - `TextEntry( `id("current_network"), _("Current &Network") ) - ), - `HWeight (2, - // TRANSLATORS: informative text entry (filled up, disabled) - `TextEntry( `id("current_netmask"), _("Current Net&mask") ) - ), - `HWeight (1, - // TRANSLATORS: informative text entry (filled up, disabled) - `TextEntry( `id("current_bits"), _("Netmask Bi&ts")) - ) - ), - - `VSpacing(1), - - `HBox ( - `VBox ( - // text entry - `Left( `TextEntry ( `id ("from_ip"), _("&First IP Address") ) ), - // text entry - `Left( `TextEntry ( `id ("to_ip"), _("&Last IP Address") ) ) - ), - `VBox ( - // text entry - `Left( `TextEntry ( `id ("from_ip_min"), _("Min&imum IP Address") ) ), - // text entry - `Left( `TextEntry ( `id ("to_ip_max"), _("Ma&ximum IP Address") ) ) - ) - ) - + // frame + `Frame (_("Subnet Information") , + `VBox( + `HBox ( + `HWeight (2, + // TRANSLATORS: informative text entry (filled up, disabled) + `TextEntry( `id("current_network"), _("Current &Network") ) + ), + `HWeight (2, + // TRANSLATORS: informative text entry (filled up, disabled) + `TextEntry( `id("current_netmask"), _("Current Net&mask") ) + ), + `HWeight (1, + // TRANSLATORS: informative text entry (filled up, disabled) + `TextEntry( `id("current_bits"), _("Netmask Bi&ts")) + ) + ), + `HBox( + `HWeight (2, + // text entry + `TextEntry ( `id ("from_ip_min"), _("Min&imum IP Address") ) + ), + `HWeight (2, + // text entry + `TextEntry ( `id ("to_ip_max"), _("Ma&ximum IP Address") ) + ), + `HWeight (1, + `HStretch() + ) ) - ) - ), + ) + ), + `VSpacing(1), + `Frame (_("IP Address Range") , + `VBox( + `HBox ( + `HWeight (2, + // text entry + `TextEntry ( `id ("from_ip"), _("&First IP Address") ) + ), + `HWeight (2, + // text entry + `TextEntry ( `id ("to_ip"), _("&Last IP Address") ) + ), + `HWeight (1, + `HStretch() + ) + ), + `Left(`CheckBox( `id("dyn_bootp"), _("Allow Dynamic &BOOTP"))) + ) + ), `VSpacing (1), `Frame( // frame label @@ -868,8 +879,14 @@ if ( opt["key"]:nil == "range" ) { list<string> range = splitstring ( opt["value"]:"", " " ); - UI::ChangeWidget ( `id ("from_ip"), `Value, range[0]:"" ); - UI::ChangeWidget ( `id ("to_ip"), `Value, range[1]:"" ); + integer idx = 0; + if (range[0]:"" == "dynamic-bootp") { + UI::ChangeWidget ( `id("dyn_bootp"), `Value, true); + idx = 1; + } + UI::ChangeWidget ( `id ("from_ip"), `Value, range[ idx ]:"" ); + UI::ChangeWidget ( `id ("to_ip"), `Value, range[ idx+1 ]:"" ); + } else if ( opt["key"]:nil == "default-lease-time" ) { @@ -997,6 +1014,7 @@ string from_ip = (string) UI::QueryWidget ( `id ("from_ip"), `Value ); string to_ip = (string) UI::QueryWidget ( `id ("to_ip"), `Value ); + boolean dyn_bootp = (boolean) UI::QueryWidget( `id("dyn_bootp"), `Value ); // FIXME: validation @@ -1012,7 +1030,8 @@ if ( size(from_ip) != 0 && size(to_ip) != 0 ) { directives = add ( directives, - $[ "key" : "range" , "value" : from_ip + " " + to_ip ] + $[ "key" : "range" , + "value" : (dyn_bootp ? "dynamic-bootp " : "") + from_ip + " " + to_ip ] ); } Modified: trunk/dhcp-server/src/helps.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/dhcp-server/src/helps.ycp?rev=38371&r1=38370&r2=38371&view=diff ============================================================================== --- trunk/dhcp-server/src/helps.ycp (original) +++ trunk/dhcp-server/src/helps.ycp Mon Jun 11 10:59:56 2007 @@ -177,18 +177,26 @@ _("<p><b>Default Lease Time</b> sets the time after which the leased IP expires and the client must ask for an IP again.</p>"), - // Wizard Installation - Step 3 1/3 - "dynamic_dhcp" : _("<p><b><big>IP Address Range</big></b><br> -Here, set the <b>First IP Address</b> and the <b>Last IP Address</b> + // Wizard Installation - Step 3 1/4 + "dynamic_dhcp" :_("<p><b><big>Subnet Information</big></b></br> +Here you can view the information about the current subnet, such as its address, +netmask and minimum and maximum IP addresses available for the clients. +</p>") + + + // Wizard Installation - Step 3 2/4 + _("<p><b><big>IP Address Range</big></b><br> +Set the <b>First IP Address</b> and the <b>Last IP Address</b> to lease to the clients. These addresses must have the same netmask. -For instance, <tt>192.168.1.1</tt> and <tt>192.168.1.64</tt>.</p>") + +For instance, <tt>192.168.1.1</tt> and <tt>192.168.1.64</tt>. Check <b> +Allow Dynamic BOOTP</b> flag in the specified range may be dynamically +assigned to BOOTP clients as well as DHCP clients</p>") + - // Wizard Installation - Step 3 2/3 + // Wizard Installation - Step 3 3/4 _("<p><b><big>Lease Time</big></b><br> -Here, set the <b>Default</b> lease time for the current IP address range, +Set the <b>Default</b> lease time for the current IP address range, which sets the optimal IP refreshing time for clients.<br></p>") + - // Wizard Installation - Step 3 3/3 + // Wizard Installation - Step 3 4/4 _("<p><b>Maximum</b> (optional value) sets the maximum time period for which this IP is blocked for the client on the DHCP server.</p>"), -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org