[yast-commit] r67025 - in /branches/SuSE-Code-11-SP2-Branch/pos-installation: ./ package/ src/clients/ src/modules/
Author: jsuchome Date: Fri Dec 9 14:41:43 2011 New Revision: 67025 URL: http://svn.opensuse.org/viewcvs/yast?rev=67025&view=rev Log: - selection of synchronization type made as extra step (bnc#730186) - help texts: removed chapter numbers - 2.17.15 Added: branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_selection.ycp (with props) Modified: branches/SuSE-Code-11-SP2-Branch/pos-installation/VERSION branches/SuSE-Code-11-SP2-Branch/pos-installation/package/yast2-pos-installation.changes branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_installation.ycp branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_synchronization.ycp branches/SuSE-Code-11-SP2-Branch/pos-installation/src/modules/POSInstallation.ycp Modified: branches/SuSE-Code-11-SP2-Branch/pos-installation/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/pos-installation/VERSION?rev=67025&r1=67024&r2=67025&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/pos-installation/VERSION (original) +++ branches/SuSE-Code-11-SP2-Branch/pos-installation/VERSION Fri Dec 9 14:41:43 2011 @@ -1 +1 @@ -2.17.14 +2.17.15 Modified: branches/SuSE-Code-11-SP2-Branch/pos-installation/package/yast2-pos-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/pos-installation/package/yast2-pos-installation.changes?rev=67025&r1=67024&r2=67025&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/pos-installation/package/yast2-pos-installation.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/pos-installation/package/yast2-pos-installation.changes Fri Dec 9 14:41:43 2011 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Dec 9 14:23:49 CET 2011 - jsuchome@suse.cz + +- selection of synchronization type made as extra step (bnc#730186) +- help texts: removed chapter numbers +- 2.17.15 + +------------------------------------------------------------------- Mon Nov 21 14:49:30 CET 2011 - jsuchome@suse.cz - replace mentioning of Installation with Initialization Modified: branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_installation.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_installation.ycp?rev=67025&r1=67024&r2=67025&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_installation.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_installation.ycp Fri Dec 9 14:41:43 2011 @@ -75,11 +75,11 @@ <p> The initialization could fail from different reasons. For name or DN related errors, check the value of BranchServer DN entered in previous step.</p> <p> -For network related errors, it's probably necessary to reconfigure network settings early in the sequence. Consult SLEPOS user guide, Chapter 5.1, <b>BranchServer Network configuration</b> for details. +For network related errors, it's probably necessary to reconfigure network settings early in the sequence. Consult SLEPOS user guide, Chapter <b>BranchServer Network configuration</b> for details. </p> <p> -In case of various service errors, consult SLEPOS user guide, Chapter 4.6.1, <b>Adding BranchServer services</b>. Then check your LDAP tree or respective scService entry. +In case of various service errors, consult SLEPOS user guide, Chapter <b>Adding BranchServer services</b>. Then check your LDAP tree or respective scService entry. </p>"); // dialog caption @@ -161,7 +161,7 @@ if (exit_status != nil && exit_status > 249 && exit_status < 254) { // error message, %1 is exit code (number) - Popup::Message (sformat (_("There has been a problem with network device configuration (%1). + Popup::Message (sformat (_("There has been a problem with network device configuration (error %1). Proceed according to the manual."), exit_status)); } Added: branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_selection.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_selection.ycp?rev=67025&view=auto ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_selection.ycp (added) +++ branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_selection.ycp Fri Dec 9 14:41:43 2011 @@ -0,0 +1,101 @@ +/** + * This client prepares Image synchronization + */ + +{ + textdomain "slepos-firstboot"; + + import "GetInstArgs"; + import "Label"; + import "Mode"; + import "Popup"; + import "Stage"; + import "Wizard"; + + import "POSInstallation"; + + + y2milestone ("SLEPOS firstboot synchronization (%1, %2)", Mode::mode (), Stage::stage ()); + + any ret = `auto; + + if (!Stage::firstboot ()) + { + y2milestone ("this should only run in firstboot stage: exiting"); + return ret; + } + + map args = GetInstArgs::argmap (); + + // help text for popup + string help_text = _(" +<p> +<b>Synchronize Images from Admin Server</b><br> +Download and install the latest image versions. This action requires working internet connection to the Admin Server. +</p> +<p> +<b>Synchronize Images Locally</b><br> +Install the locally available images. +</p> +<p> +<b>Do not Synchronize Images</b><br> +Image synchronization is skipped. It should be run manually later, using the <tt>possyncimages</tt> script.</p>"); + + symbol synchronize = POSInstallation::sync_selection; + if (synchronize == `none) + { + synchronize = POSInstallation::offline_initialization ? `sync_local : `sync; + } + + term contents = `HBox (`HSpacing (1), `VBox ( + `VSpacing (), + // label + `Left (`Label (_("Choose the way how the image should be synchronized"))), + `VSpacing (), + `HBox (`HSpacing (2), `RadioButtonGroup (`id (`rb), `VBox ( + `Left (`RadioButton (`id (`sync), + // radio button label + _("Synchronize Image from Admin Server"), + synchronize == `sync) + ), + `VSpacing (), + `Left (`RadioButton (`id (`sync_local), + // radio button label + _("Synchronize Image Locally"), + synchronize == `sync_local) + ), + `VSpacing (), + `Left (`RadioButton (`id (`no_sync), + // radio button label + _("Do not Synchronize Image"), + synchronize == `no_sync) + ) + ))) + ), `HSpacing (1)); + + // dialog caption + Wizard::SetContents (_("POS Image Synchronization"), + contents, help_text, args["enable_back"]:true, args["enable_next"]:true + ); + + while (true) + { + ret = UI::UserInput (); + if (ret == `abort && !Popup::ConfirmAbort (`incomplete)) + { + continue; + } + else + { + break; + } + } + + synchronize = (symbol) UI::QueryWidget (`id (`rb), `Value); + + y2milestone ("selected syncrhonization type: %1", synchronize); + + POSInstallation::sync_selection = synchronize; + + return ret; +} Modified: branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_synchronization.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_synchronization.ycp?rev=67025&r1=67024&r2=67025&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_synchronization.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/pos-installation/src/clients/firstboot_slepos_synchronization.ycp Fri Dec 9 14:41:43 2011 @@ -26,14 +26,20 @@ } map args = GetInstArgs::argmap (); - map display_info = UI::GetDisplayInfo (); - boolean text_mode = display_info["TextMode"]:false; if (args["going_back"]:false) { return ret; } + symbol synchronize = POSInstallation::sync_selection; + + if (synchronize == `no_sync || synchronize == `none) + { + y2milestone ("synchronization was skipped"); + return ret; + } + term cont = `VBox ( `VSpacing (0.4), `ReplacePoint (`id (`rp_label), @@ -64,66 +70,6 @@ contents, help_text, args["enable_back"]:true, args["enable_next"]:true ); - UI::OpenDialog (`opt (`decorated), `HBox (`HSpacing (2), `VBox ( - `RadioButtonGroup (`id (`rb), `VBox ( - `VSpacing (), - `Left (`RadioButton (`id (`sync), - // radio button label - _("Synchronize Image from Admin Server"), - !POSInstallation::offline_initialization) - ), - `VSpacing (), - `Left (`RadioButton (`id (`sync_local), - // radio button label - _("Synchronize Image Locally"), - POSInstallation::offline_initialization) - ), - `VSpacing (), - `Left (`RadioButton (`id (`no_sync), - // radio button label - _("Do not Synchronize Image"))), - `VSpacing () - )), - `HBox ( - `PushButton (`id (`help), Label::HelpButton ()), - `PushButton (`id (`ok), `opt (`default), Label::OKButton ()) - ), - `VSpacing (0.5) - ), `HSpacing (2))); - - // help text for popup - string popup_help = _(" -<p> -<b>Synchronize Images from Admin Server</b><br> -Download and install the latest image versions. This action requires working internet connection to the Admin Server. -</p> -<p> -<b>Synchronize Images Locally</b><br> -Install the locally available images. -</p> -<p> -<b>Do not Synchronize Images</b><br> -Image synchronization is skipped. It should be run manually later, using the <tt>possyncimages</tt> script.</p>"); - - while (true) - { - ret = UI::UserInput (); - if (ret == `help) - { - Wizard::ShowHelp (popup_help); - } - if (ret == `ok) - { - break; - } - } - symbol synchronize = (symbol) UI::QueryWidget (`id (`rb), `Value); - UI::CloseDialog (); - - if (synchronize == `no_sync) - { - return ret; - } string cmd = POSInstallation::sync_cmd; if (synchronize == `sync_local) { Modified: branches/SuSE-Code-11-SP2-Branch/pos-installation/src/modules/POSInstallation.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/pos-installation/src/modules/POSInstallation.ycp?rev=67025&r1=67024&r2=67025&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/pos-installation/src/modules/POSInstallation.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/pos-installation/src/modules/POSInstallation.ycp Fri Dec 9 14:41:43 2011 @@ -84,4 +84,10 @@ "BRANCH_LDAPBASE" : "", "POS_ADMIN_PASSWORD" : "" ]; + +/** + * Which way users wants to synchronize + * Possible values: `sync, `sync_local, `no_sync, `none (not yet initialized) + */ +global symbol sync_selection = `none; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn2.opensuse.org