[yast-commit] r57819 - in /trunk/autoinstallation: doc/CreateProfileDetails.xml package/autoyast2.changes src/dialogs/script_dialogs.ycp src/modules/AutoinstScripts.ycp src/schema/scripts.rnc

Author: ug Date: Wed Jul 1 13:50:19 2009 New Revision: 57819 URL: http://svn.opensuse.org/viewcvs/yast?rev=57819&view=rev Log: <feedback_type> for scripts invented Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/dialogs/script_dialogs.ycp trunk/autoinstallation/src/modules/AutoinstScripts.ycp trunk/autoinstallation/src/schema/scripts.rnc Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/CreateProfil... ============================================================================== --- trunk/autoinstallation/doc/CreateProfileDetails.xml (original) +++ trunk/autoinstallation/doc/CreateProfileDetails.xml Wed Jul 1 13:50:19 2009 @@ -2174,6 +2174,12 @@ <entry>optional. The default is false. This option was invented with SL 10.1 / SLES10</entry> </row> <row> + <entry>feedback_type</entry> + <entry>this can be "message", "warning", "error" and you can control the timeout of those popups with the <report> section. + <para><screen><feedback_type>warning</feedback_type></screen></para></entry> + <entry>optional. If missing, an always blocking popup is used. This option was invited with openSUSE 11.2 (not SLES11)</entry> + </row> + <row> <entry>debug</entry> <entry>if this is true, every single line of a shell script is logged. Perl scripts are run with warnings turned on. @@ -2250,6 +2256,12 @@ <entry>optional. The default is false. This option was invented with SL 10.1 / SLES10</entry> </row> <row> + <entry>feedback_type</entry> + <entry>this can be "message", "warning", "error" and you can control the timeout of those popups with the <report> section. + <para><screen><feedback_type>warning</feedback_type></screen></para></entry> + <entry>optional. If missing, an always blocking popup is used. This option was invited with openSUSE 11.2 (not SLES11)</entry> + </row> + <row> <entry>debug</entry> <entry>if this is true, every single line of a shell script is logged. Perl scripts are run with warnings turned on. @@ -2335,6 +2347,12 @@ <entry>optional. The default is false. This option was invented with SL 10.1 / SLES10</entry> </row> <row> + <entry>feedback_type</entry> + <entry>this can be "message", "warning", "error" and you can control the timeout of those popups with the <report> section. + <para><screen><feedback_type>warning</feedback_type></screen></para></entry> + <entry>optional. If missing, an always blocking popup is used. This option was invited with openSUSE 11.2 (not SLES11)</entry> + </row> + <row> <entry>debug</entry> <entry>if this is true, every single line of a shell script is logged. Perl scripts are run with warnings turned on. @@ -2421,6 +2439,12 @@ <entry>optional. The default is false. This option was invented with SL 10.1 / SLES10</entry> </row> <row> + <entry>feedback_type</entry> + <entry>this can be "message", "warning", "error" and you can control the timeout of those popups with the <report> section. + <para><screen><feedback_type>warning</feedback_type></screen></para></entry> + <entry>optional. If missing, an always blocking popup is used. This option was invited with openSUSE 11.2 (not SLES11)</entry> + </row> + <row> <entry>debug</entry> <entry>if this is true, every single line of a shell script is logged. Perl scripts are run with warnings turned on. Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast... ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Wed Jul 1 13:50:19 2009 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Jul 1 11:19:42 CEST 2009 - ug@suse.de + +- <feedback_type> for scripts invented + +------------------------------------------------------------------- Tue Jun 30 11:35:23 CEST 2009 - ug@suse.de - <filename> option added to the <pxe> section Modified: trunk/autoinstallation/src/dialogs/script_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/dialogs/scri... ============================================================================== --- trunk/autoinstallation/src/dialogs/script_dialogs.ycp (original) +++ trunk/autoinstallation/src/dialogs/script_dialogs.ycp Wed Jul 1 13:50:19 2009 @@ -163,13 +163,23 @@ ), `HBox( // a checkbox where you can choose if you want to see script-feedback output or not - `CheckBox( `id( `feedback ), _("&Feedback"), ( script["feedback"]:false ) ), + `CheckBox( `id( `feedback ), `opt(`notify), _("&Feedback"), ( script["feedback"]:false ) ), // a checkbox where you can choose if you want to see script-debug output or not `CheckBox( `id( `debug ), _("&Debug"), ( script["debug"]:true ) ), `CheckBox( `id( `chrooted ), _("&Chrooted"), ( script["chrooted"]:false ) ), // a checkbox where you can choose if you need to have network when the script is running `CheckBox( `id( `network ), _("&Network"), ( script["network_needed"]:false ) ) ), + `HBox( + // a checkbox where you can choose if you want to see script-feedback output or not + `ComboBox( `id( `feedback_type ), _("&Feedback Type"), + [ `item(`id(""), _("none"), (script["feedback_type"]:"" == "")), + `item(`id("message"), _("Message"), (script["feedback_type"]:"" == "message")), + `item(`id("warning"), _("Warning"), (script["feedback_type"]:"" == "warning")), + `item(`id("error") , _("Error"), (script["feedback_type"]:"" == "error")) + ] + ) + ), `VSpacing(1), `HBox( `MultiLineEdit(`id(`source), _("S&cript Source"), script["source"]:"") @@ -202,6 +212,9 @@ UI::ChangeWidget (`id(`feedback), `Enabled, false); } + if( !(boolean)UI::QueryWidget( `id(`feedback), `Value ) ) + UI::ChangeWidget (`id(`feedback_type), `Enabled, false ); + if (mode == `edit) { UI::ChangeWidget(`id(`filename), `Enabled, false); @@ -217,6 +230,7 @@ string interpreter = (string)UI::QueryWidget(`id(`interpreter), `Value); string source = (string)UI::QueryWidget(`id(`source), `Value); boolean feedback = (boolean)UI::QueryWidget(`id(`feedback), `Value); + string feedback_type = (string)UI::QueryWidget(`id(`feedback_type), `Value); boolean debug = (boolean)UI::QueryWidget(`id(`debug), `Value); boolean chrooted = (boolean)UI::QueryWidget(`id(`chrooted), `Value); boolean network = (boolean)UI::QueryWidget(`id(`network), `Value); @@ -231,7 +245,7 @@ } else { - AutoinstScripts::AddEditScript( scriptName, source, interpreter, type, chrooted, debug, feedback, network); + AutoinstScripts::AddEditScript( scriptName, source, interpreter, type, chrooted, debug, feedback, network, feedback_type); } } else if (ret == `loadsource) @@ -269,6 +283,9 @@ UI::ChangeWidget (`id(`network), `Value, false); UI::ChangeWidget (`id(`network), `Enabled, false); } + } else if( ret == `feedback ) { + UI::ChangeWidget( `id(`feedback_type), `Enabled, (boolean)UI::QueryWidget( `id(`feedback), `Value ) ); + UI::ChangeWidget( `id(`feedback_type), `Value, `id("no_type") ); } } until (ret == `save || ret == `cancel || ret == `back); Modified: trunk/autoinstallation/src/modules/AutoinstScripts.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/Auto... ============================================================================== --- trunk/autoinstallation/src/modules/AutoinstScripts.ycp (original) +++ trunk/autoinstallation/src/modules/AutoinstScripts.ycp Wed Jul 1 13:50:19 2009 @@ -18,6 +18,7 @@ import "Service"; import "Popup"; import "Label"; + import "Report"; include "autoinstall/io.ycp"; @@ -141,8 +142,7 @@ else if (s["type"]:"" == "postpartitioning-scripts") postpart = add(postpart,s); }); - - + // clean list<map> expre = maplist (map p, pre, ``{ return ($["filename":p["filename"]:"", @@ -150,6 +150,7 @@ "source":p["source"]:"", "location":p["location"]:"", "feedback":p["feedback"]:false, + "feedback_type":p["feedback_type"]:"", "debug":p["debug"]:true ]); }); @@ -159,6 +160,7 @@ "source":p["source"]:"", "location":p["location"]:"", "feedback":p["feedback"]:false, + "feedback_type":p["feedback_type"]:"", "debug":p["debug"]:true, "network_needed":p["network_needed"]:false ] @@ -171,6 +173,7 @@ "chrooted":p["chrooted"]:false, "location":p["location"]:"", "feedback":p["feedback"]:false, + "feedback_type":p["feedback_type"]:"", "debug":p["debug"]:true ]); }); @@ -187,6 +190,7 @@ "source":p["source"]:"", "location":p["location"]:"", "feedback":p["feedback"]:false, + "feedback_type":p["feedback_type"]:"", "debug":p["debug"]:true ]); }); @@ -360,7 +364,8 @@ boolean chrooted, boolean debug, boolean feedback, - boolean network + boolean network, + string feedback_type ) { boolean mod = false; @@ -377,6 +382,7 @@ oldScript=add(oldScript,"debug",debug); oldScript=add(oldScript,"feedback",feedback); oldScript=add(oldScript,"network_needed",network); + oldScript=add(oldScript,"feedback_type", feedback_type); mod = true; return oldScript; @@ -397,6 +403,7 @@ script=add(script,"debug",debug); script=add(script,"feedback",feedback); script=add(script,"network_needed",network); + script=add(script,"feedback_type", feedback_type); merged=add(merged,script); } @@ -785,7 +792,15 @@ feedback = (string)SCR::Read(.target.string, current_logdir+"/"+scriptName+".log" ); } if( size(feedback) > 0 ) { - Popup::LongText("", `RichText(`opt(`plainText), feedback), 50, 20 ); + if( s["feedback_type"]:"" == "" ) { + Popup::LongText("", `RichText(`opt(`plainText), feedback), 50, 20 ); + } else if( s["feedback_type"]:"" == "message" ) { + Report::Message( feedback ); + } else if( s["feedback_type"]:"" == "warning" ) { + Report::Warning( feedback ); + } else if( s["feedback_type"]:"" == "error" ) { + Report::Error( feedback ); + } } } } Modified: trunk/autoinstallation/src/schema/scripts.rnc URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/schema/scrip... ============================================================================== --- trunk/autoinstallation/src/schema/scripts.rnc (original) +++ trunk/autoinstallation/src/schema/scripts.rnc Wed Jul 1 13:50:19 2009 @@ -54,12 +54,14 @@ element location { text }? & source? & debug? & - feedback? + feedback? & + feedback_type? } chrooted = element chrooted { BOOLEAN } debug = element debug { BOOLEAN } feedback = element feedback { BOOLEAN } +feedback_type = element feedback_type { text } filename = element filename { text } interpreter = element interpreter { text } source = element source { text } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
ug@svn.opensuse.org