Module: Yast::HttpServerWizardsInclude
- Defined in:
- ../../src/include/http-server/wizards.rb
Instance Method Summary (collapse)
-
- (Object) HttpServerAutoSequence
Whole configuration of http-server but without reading and writing.
-
- (Boolean) HttpServerSequence
Sequences for whole server.
- - (Object) initialize_http_server_wizards(include_target)
- - (Object) MainSequence
- - (Object) VirtualHostSequence(action)
-
- (Object) WizardSequence
Sequences for wizard mode.
Instance Method Details
- (Object) HttpServerAutoSequence
Whole configuration of http-server but without reading and writing. For use with autoinstallation.
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File '../../src/include/http-server/wizards.rb', line 198 def HttpServerAutoSequence # translators: initialization dialog caption caption = _("HTTP Server Configuration") # translators: initialization dialog message contents = Label(_("Initializing ...")) Wizard.CreateDialog Wizard.SetDesktopTitleAndIcon("http-server") Wizard.SetContentsButtons( caption, contents, "", Label.BackButton, Label.NextButton ) ret = MainSequence() UI.CloseDialog ret end |
- (Boolean) HttpServerSequence
Sequences for whole server
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 |
# File '../../src/include/http-server/wizards.rb', line 166 def HttpServerSequence aliases = { "read" => [lambda { ReadDialog() }, true], "main" => lambda { MainSequence() }, "wizard" => lambda { WizardSequence() }, "write" => [lambda { WriteDialog() }, true] } sequence = { "ws_start" => "read", "read" => { :abort => :abort, :next => "main" }, "main" => { :abort => :abort, :next => "write" }, "wizard" => { :abort => :abort, :next => "write" }, "write" => { :abort => :abort, :next => :next } } Wizard.CreateDialog Wizard.SetDesktopTitleAndIcon("http-server") w_mode = HttpServer.isWizardMode Ops.set(sequence, ["read", :next], "wizard") if w_mode ret = Sequencer.Run(aliases, sequence) HttpServer.setWizardMode(false) if w_mode UI.CloseDialog ret == :next end |
- (Object) initialize_http_server_wizards(include_target)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File '../../src/include/http-server/wizards.rb', line 11 def initialize_http_server_wizards(include_target) Yast.import "UI" textdomain "http-server" Yast.import "Label" Yast.import "Sequencer" Yast.import "Wizard" Yast.import "Directory" Yast.include include_target, "http-server/complex.rb" Yast.include include_target, "http-server/dialogs.rb" Yast.include include_target, "http-server/wizard-dialog.rb" end |
- (Object) MainSequence
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/http-server/wizards.rb', line 58 def MainSequence aliases = { "overview" => lambda { OverviewDialog() }, "addhost" => lambda { AddHost() }, "setvhost" => lambda { SetVHostOptions() }, "dir" => lambda { DirDialog() }, "add-vh" => [lambda { VirtualHostSequence("add") }, true], "edit-vh" => [lambda { VirtualHostSequence("edit") }, true] } sequence = { "ws_start" => "overview", "overview" => { :abort => :abort, :next => :next, :dir => "dir", :edit => "edit-vh", :add => "add-vh" }, "add-vh" => #`next { :abort => :abort, :next => "overview" }, "edit-vh" => #`next { :abort => :abort, :next => "overview" }, "setvhost" => { :abort => :abort, :next => "overview", :back => "addhost" }, "dir" => { :abort => :abort, :next => "overview", :back => "overview" } } ret = Sequencer.Run(aliases, sequence) ret end |
- (Object) VirtualHostSequence(action)
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File '../../src/include/http-server/wizards.rb', line 26 def VirtualHostSequence(action) aliases = { "host" => lambda { HostDialog() }, "addhost" => lambda { AddHost() }, "setvhost" => lambda { SetVHostOptions() }, "ssl" => lambda { SSLDialog() }, "dir" => lambda { DirDialog() } } _def = action == "add" ? "addhost" : "host" sequence = { "ws_start" => _def, "host" => { :abort => :abort, :next => :next, #"overview", :ssl => "ssl", :dir => "dir" }, "addhost" => { :abort => :abort, :next => "setvhost" }, "setvhost" => { :abort => :abort, :next => :next, #"overview", :back => "addhost" }, "ssl" => { :abort => :abort, :next => "host", :back => "host" }, "dir" => { :abort => :abort, :next => "host", :back => "host" } } Sequencer.Run(aliases, sequence) end |
- (Object) WizardSequence
Sequences for wizard mode
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 |
# File '../../src/include/http-server/wizards.rb', line 103 def WizardSequence aliases = { "network-device" => lambda { WizardSequence1() }, "modules" => lambda { WizardSequence2() }, "defhost" => lambda { WizardSequence3() }, "hosts" => lambda { WizardSequence4() }, "summary" => lambda { WizardSequence5() }, "addhost" => lambda { AddHost() }, "setvhost" => lambda { SetVHostOptions() }, "ssl" => lambda { SSLDialog() }, "dir" => lambda { DirDialog() }, "main" => lambda { MainSequence() }, "host" => lambda { HostDialog() } } sequence = { "ws_start" => "network-device", "network-device" => { :abort => :abort, :next => "modules" }, "modules" => { :abort => :abort, :next => "defhost" }, "defhost" => { :abort => :abort, :next => "hosts", :ssl => "ssl", :dir => "dir" }, "ssl" => { :abort => :abort, :next => "defhost" }, "dir" => { :abort => :abort, :next => "defhost" }, "hosts" => { :abort => :abort, :next => "summary", :add => "addhost", :edit => "host" }, "addhost" => { :abort => :abort, :next => "setvhost", :back => "hosts" }, "setvhost" => { :abort => :abort, :next => "hosts", :back => "addhost" }, "summary" => { :abort => :abort, :next => :next, :expert => "main" }, "host" => { :abort => :abort, :ssl => "ssl", :next => "hosts", :dir => "dir" }, "main" => { :abort => :abort, :next => :next } } ret = Sequencer.Run(aliases, sequence) ret end |