Module: Yast::SlpServerWizardsInclude

Defined in:
../../src/include/slp-server/wizards.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) initialize_slp_server_wizards(include_target)



11
12
13
14
15
16
17
18
19
20
21
# File '../../src/include/slp-server/wizards.rb', line 11

def initialize_slp_server_wizards(include_target)
  Yast.import "UI"

  textdomain "slp-server"

  Yast.import "Sequencer"
  Yast.import "Wizard"

  Yast.include include_target, "slp-server/complex.rb"
  Yast.include include_target, "slp-server/dialogs.rb"
end

- (Object) MainSequence

Main workflow of the slp-server configuration

Returns:

  • sequence result



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File '../../src/include/slp-server/wizards.rb', line 25

def MainSequence
  # FIXME: adapt to your needs
  aliases = {
    "overview" => lambda { OverviewDialog() },
    "expert"   => lambda { ExpertDialog() },
    "edit_reg" => lambda { editRegFile }
  }

  # FIXME: adapt to your needs
  sequence = {
    "ws_start" => "overview",
    "overview" => {
      :abort  => :abort,
      :next   => :next,
      :edit   => "edit_reg",
      :expert => "expert"
    },
    "expert"   => { :abort => :abort, :next => "overview" },
    "edit_reg" => { :abort => :abort, :next => "overview" }
  }

  ret = Sequencer.Run(aliases, sequence)

  deep_copy(ret)
end

- (Object) SlpServerAutoSequence

Whole configuration of slp-server but without reading and writing. For use with autoinstallation.

Returns:

  • sequence result



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File '../../src/include/slp-server/wizards.rb', line 79

def SlpServerAutoSequence
  # Initialization dialog caption
  caption = _("SLP Server Configuration")
  # Initialization dialog contents
  contents = Label(_("Initializing..."))

  Wizard.CreateDialog
  Wizard.SetDesktopTitleAndIcon("slp-server")
  Wizard.SetContentsButtons(
    caption,
    contents,
    "",
    Label.BackButton,
    Label.NextButton
  )

  ret = MainSequence()

  UI.CloseDialog
  deep_copy(ret)
end

- (Object) SlpServerSequence

Whole configuration of slp-server

Returns:

  • sequence result



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File '../../src/include/slp-server/wizards.rb', line 53

def SlpServerSequence
  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
  Wizard.SetDesktopTitleAndIcon("slp-server")

  ret = Sequencer.Run(aliases, sequence)

  UI.CloseDialog
  deep_copy(ret)
end