Module: Yast::FcoeClientWizardsInclude
- Defined in:
- ../../src/include/fcoe-client/wizards.rb
Instance Method Summary (collapse)
- - (Object) EditDialog
-
- (Object) FcoeClientAutoSequence
Whole configuration of fcoe-client but without reading and writing.
-
- (Object) FcoeClientSequence
Whole configuration of fcoe-client.
-
- (Object) GlobalDialog
Main workflow of the fcoe-client configuration.
- - (Object) initialize_fcoe_client_wizards(include_target)
- - (Object) MainSequence
Instance Method Details
- (Object) EditDialog
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File '../../src/include/fcoe-client/wizards.rb', line 208 def EditDialog caption = _("Change FCoE Settings") = { "edit" => { "widget" => :custom, "help" => Ops.get_string(@HELPS, "change", ""), "custom_widget" => EditDialogContents(), "init" => fun_ref(method(:InitEditDialog), "void (string)"), "handle" => fun_ref( method(:HandleEditDialog), "symbol (string, map)" ), "store" => fun_ref( method(:StoreEditDialog), "void (string, map)" ) } } contents = VBox("edit") w = CWM.CreateWidgets( ["edit"], Convert.convert( , :from => "map <string, any>", :to => "map <string, map <string, any>>" ) ) contents = CWM.PrepareDialog(contents, w) Wizard.SetContentsButtons( caption, contents, Ops.get_string(@HELPS, "change", ""), # help Label.BackButton, Label.NextButton ) ret = CWM.Run( w, { :abort => fun_ref(method(:ReallyAbort), "boolean ()") } ) deep_copy(ret) end |
- (Object) FcoeClientAutoSequence
Whole configuration of fcoe-client but without reading and writing. For use with autoinstallation.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File '../../src/include/fcoe-client/wizards.rb', line 313 def FcoeClientAutoSequence # Initialization dialog caption caption = _("FcoeClient 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) FcoeClientSequence
Whole configuration of fcoe-client
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File '../../src/include/fcoe-client/wizards.rb', line 283 def FcoeClientSequence 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.OpenCancelOKDialog if Mode.normal Wizard.SetDesktopTitleAndIcon("fcoe-client") else Wizard.SetTitleIcon("fcoe") end ret = Sequencer.Run(aliases, sequence) Wizard.CloseDialog deep_copy(ret) end |
- (Object) GlobalDialog
Main workflow of the fcoe-client configuration
48 49 50 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 99 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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File '../../src/include/fcoe-client/wizards.rb', line 48 def GlobalDialog = { "serv" => { "widget" => :custom, "help" => Ops.get_string(@HELPS, "services", ""), "custom_widget" => ServicesDialogContent(), "handle" => fun_ref( method(:HandleServicesDialog), "symbol (string, map)" ), "init" => fun_ref( method(:InitServicesDialog), "void (string)" ), "store" => fun_ref( method(:StoreServicesDialog), "void (string, map)" ) }, "inter" => { "widget" => :custom, "help" => Ops.get_string(@HELPS, "interfaces", ""), "custom_widget" => InterfacesDialogContent(), "handle" => fun_ref( method(:HandleInterfacesDialog), "symbol (string, map)" ), "init" => fun_ref( method(:InitInterfacesDialog), "void (string)" ), "store" => fun_ref( method(:StoreInterfacesDialog), "void (string, map)" ) }, "config" => { "widget" => :custom, "help" => Ops.get_string(@HELPS, "configuration", ""), "custom_widget" => ConfigurationDialogContent(), "init" => fun_ref( method(:InitConfigurationDialog), "void (string)" ), "handle" => fun_ref( method(:HandleConfigurationDialog), "symbol (string, map)" ), "store" => fun_ref( method(:StoreConfigurationDialog), "void (string, map)" ) } } tabs = {} tab_order = [] ini_tab = "" if Stage.initial tabs = { "interfaces" => { # Header of tab in tab widget "header" => _("&Interfaces"), "widget_names" => ["inter"], "contents" => InterfacesDialogContent() }, "configuration" => { # Header of tab in tab widget "header" => _("&Configuration"), "widget_names" => ["config"], "contents" => ConfigurationDialogContent() } } ini_tab = "interfaces" tab_order = ["interfaces", "configuration"] else tabs = { "services" => { # Header of tab in tab widget "header" => _("&Services"), "widget_names" => ["serv"], "contents" => ServicesDialogContent() }, "interfaces" => { # Header of tab in tab widget "header" => _("&Interfaces"), "widget_names" => ["inter"], "contents" => InterfacesDialogContent() }, "configuration" => { # Header of tab in tab widget "header" => _("&Configuration"), "widget_names" => ["config"], "contents" => ConfigurationDialogContent() } } status_map = FcoeClient.GetStartStatus if CWMTab.LastTab == nil || CWMTab.LastTab == "" # first run if Ops.get(status_map, "fcoe", false) == true && Ops.get(status_map, "lldpad", false) == true ini_tab = "interfaces" else ini_tab = "services" end else # get correct tab to return after 'Edit' ini_tab = CWMTab.LastTab end tab_order = ["services", "interfaces", "configuration"] end wd = { "tab" => CWMTab.CreateWidget( { "tab_order" => tab_order, "tabs" => tabs, "widget_descr" => , "initial_tab" => ini_tab } ) } contents = VBox("tab") w = CWM.CreateWidgets( ["tab"], Convert.convert( wd, :from => "map <string, any>", :to => "map <string, map <string, any>>" ) ) # Initialization dialog caption caption = _("Fibre Channel over Ethernet Configuration") contents = CWM.PrepareDialog(contents, w) Wizard.SetContentsButtons( caption, contents, "", #help Label.BackButton, Label.FinishButton ) Wizard.SetNextButton(:next, Label.OKButton) Wizard.SetAbortButton(:abort, Label.CancelButton) Wizard.HideBackButton # TODO: rename icon to yast-fcoe (yast2-theme package) if Mode.normal Wizard.SetDesktopTitleAndIcon("fcoe-client") else Wizard.SetTitleIcon("fcoe") end CWM.Run(w, { :abort => fun_ref(method(:ReallyAbort), "boolean ()") }) end |
- (Object) initialize_fcoe_client_wizards(include_target)
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File '../../src/include/fcoe-client/wizards.rb', line 29 def initialize_fcoe_client_wizards(include_target) Yast.import "UI" textdomain "fcoe-client" Yast.import "Mode" Yast.import "Sequencer" Yast.import "Wizard" Yast.import "CWM" Yast.import "CWMTab" Yast.import "CWMServiceStart" Yast.include include_target, "fcoe-client/complex.rb" Yast.include include_target, "fcoe-client/dialogs.rb" end |
- (Object) MainSequence
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File '../../src/include/fcoe-client/wizards.rb', line 257 def MainSequence aliases = { "global" => lambda { GlobalDialog() }, "edit" => lambda do EditDialog() end } sequence = { "ws_start" => "global", "global" => { :abort => :abort, :edit => "edit", :next => :next }, "edit" => { :abort => :abort, :next => "global" } } Wizard.OpenNextBackDialog if Mode.normal Wizard.SetDesktopTitleAndIcon("fcoe-client") else Wizard.SetTitleIcon("fcoe") end ret = Sequencer.Run(aliases, sequence) Wizard.CloseDialog deep_copy(ret) end |