Module: Yast::ClusterWizardsInclude
- Defined in:
- ../../src/include/cluster/wizards.rb
Instance Method Summary (collapse)
-
- (Object) ClusterAutoSequence
Whole configuration of cluster but without reading and writing.
-
- (Object) ClusterSequence
Whole configuration of cluster.
- - (Object) FirstRunSequence
- - (Object) initialize_cluster_wizards(include_target)
- - (Object) MainSequence
- - (Object) TabSequence
Instance Method Details
- (Object) ClusterAutoSequence
Whole configuration of cluster but without reading and writing. For use with autoinstallation.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File '../../src/include/cluster/wizards.rb', line 170 def ClusterAutoSequence # Initialization dialog caption caption = _("Cluster Configuration") # Initialization dialog contents contents = Label(_("Initializing...")) Wizard.CreateDialog Wizard.SetContentsButtons( caption, contents, "", Label.BackButton, Label.NextButton ) ret = MainSequence() UI.CloseDialog deep_copy(ret) end |
- (Object) ClusterSequence
Whole configuration of cluster
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File '../../src/include/cluster/wizards.rb', line 145 def ClusterSequence aliases = { "read" => [lambda { ReadDialog() }, true], "main" => lambda { MainSequence() }, "write" => [lambda { WriteDialog() }, true] } sequence = { "ws_start" => "read", "read" => { :abort => :abort, :next => "main" }, "main" => { :abort => :abort, :next => "write" }, "write" => { :abort => :abort, :next => :next } } Wizard.CreateDialog ret = Sequencer.Run(aliases, sequence) UI.CloseDialog deep_copy(ret) end |
- (Object) FirstRunSequence
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File '../../src/include/cluster/wizards.rb', line 100 def FirstRunSequence sequence = { "ws_start" => "communication", "communication" => { :next => "security", :back => "communication", :abort => :abort }, "security" => { :next => "csync2", :back => "communication", :abort => :abort }, "csync2" => { :next => "conntrack", :back => "security", :abort => :abort }, "conntrack" => { :next => "service", :back => "csync2", :abort => :abort }, "service" => { :next => :next, :back => "conntrack", :abort => :abort } } ret = Sequencer.Run(@Aliases, sequence) deep_copy(ret) end |
- (Object) initialize_cluster_wizards(include_target)
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File '../../src/include/cluster/wizards.rb', line 30 def initialize_cluster_wizards(include_target) Yast.import "UI" textdomain "cluster" Yast.import "Sequencer" Yast.import "Wizard" Yast.include include_target, "cluster/complex.rb" Yast.include include_target, "cluster/dialogs.rb" Yast.include include_target, "cluster/common.rb" @Aliases = { "communication" => lambda { CommunicationDialog() }, "security" => lambda { SecurityDialog() }, "csync2" => lambda { Csync2Dialog() }, "conntrack" => lambda { ConntrackDialog() }, "service" => lambda { ServiceDialog() } } end |
- (Object) MainSequence
135 136 137 138 139 140 141 |
# File '../../src/include/cluster/wizards.rb', line 135 def MainSequence if Cluster.firstrun return FirstRunSequence() else return TabSequence() end end |
- (Object) TabSequence
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File '../../src/include/cluster/wizards.rb', line 51 def TabSequence anywhere = { :abort => :abort, :next => :next } Builtins.foreach(@DIALOG) do |key| anywhere = Builtins.add( anywhere, Builtins.symbolof(Builtins.toterm(key)), key ) end sequence = { "ws_start" => Ops.get(@DIALOG, 0, "") } Builtins.foreach(@DIALOG) do |key| sequence = Builtins.add(sequence, key, anywhere) end # UI initialization Wizard.OpenTreeNextBackDialog tree = [] Builtins.foreach(@DIALOG) do |key| tree = Wizard.AddTreeItem( tree, Ops.get_string(@PARENT, key, ""), Ops.get_string(@NAME, key, ""), key ) end Wizard.CreateTree(tree, "Cluster") # Buttons redefinition Wizard.SetNextButton(:next, Label.FinishButton) if UI.WidgetExists(Id(:wizardTree)) Wizard.SetBackButton(:help_button, Label.HelpButton) Wizard.SetAbortButton(:abort, Label.CancelButton) else UI.WizardCommand(term(:SetNextButtonLabel, Label.FinishButton)) UI.WizardCommand(term(:SetAbortButtonLabel, Label.CancelButton)) end Wizard.HideBackButton Wizard.SelectTreeItem(Ops.get_string(sequence, "ws_start", "")) ret = Sequencer.Run(@Aliases, sequence) Wizard.CloseDialog deep_copy(ret) end |