[yast-commit] r65057 - /branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp
Author: rhafer Date: Thu Jul 28 11:59:18 2011 New Revision: 65057 URL: http://svn.opensuse.org/viewcvs/yast?rev=65057&view=rev Log: Only show mirror mode checkbox on sle-ha Modified: branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp Modified: branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp?rev=65057&r1=65056&r2=65057&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp Thu Jul 28 11:59:18 2011 @@ -19,6 +19,7 @@ import "LdapServer"; import "HTML"; import "Report"; +import "Pkg"; include "ldap-server/helps.ycp"; include "ldap-server/tree_structure.ycp"; @@ -34,6 +35,7 @@ **********************/ string error_str = ""; +boolean sourcemanager_started = false; list<map> generateTreeRec( list<map> tree, string parent, list<string> children ) { @@ -1079,6 +1081,22 @@ any MasterSetupDialog() { + if ( ! sourcemanager_started ) + { + Pkg::SourceStartManager(true); + } + list<map<string,any> > products = Pkg::ResolvableProperties ("sle-hae", `product, ""); + boolean allowMirrorMode = false; + if ( size(products) > 0 ) + { + foreach( map<string,any> product, products, { + if ( (symbol)product["status"]:`none == `available ) + { + allowMirrorMode = true; + } + }); + } + y2debug("MirrorMode allowed: %1", allowMirrorMode ); term widget = `HSquash( `VSquash( @@ -1094,7 +1112,9 @@ `Password( `id( `te_valid_rootpw ), `opt( `hstretch ), _("&Validate Password") ), `VSpacing( 0.5 ), `Left( - `CheckBox( `id( `cb_mirror_mode ), _("Prepare for MirrorMode replication (generates the serverId attribute)") ) + `ReplacePoint( `id( `rp_mirrormode ), + `Empty() + ) ) ) ) @@ -1104,6 +1124,12 @@ HELPS["master_setup_dialog"]:"help not found", Label::BackButton(), Label::NextButton() ); + if ( allowMirrorMode ) + { + UI::ReplaceWidget(`rp_mirrormode, + `CheckBox( `id( `cb_mirror_mode ), _("Prepare for MirrorMode replication (generates the serverId attribute)") ) + ); + } any ret = nil; while ( true ) { @@ -1131,7 +1157,10 @@ map <string, any> defaults = LdapServer::CreateInitialDefaults(); defaults["configpw"] = pw; LdapServer::SetInitialDefaults(defaults); - LdapServer::WriteSetupMirrorMode( (boolean)UI::QueryWidget( `cb_mirror_mode, `Value ) ); + if ( allowMirrorMode ) + { + LdapServer::WriteSetupMirrorMode( (boolean)UI::QueryWidget( `cb_mirror_mode, `Value ) ); + } break; } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rhafer@svn2.opensuse.org