Module: Yast::SupportWizardsInclude

Defined in:
../../src/include/support/wizards.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) initialize_support_wizards(include_target)



30
31
32
33
34
35
36
37
38
39
40
# File '../../src/include/support/wizards.rb', line 30

def initialize_support_wizards(include_target)
  Yast.import "UI"

  textdomain "support"

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

  Yast.include include_target, "support/complex.rb"
  Yast.include include_target, "support/dialogs.rb"
end

- (Object) MainSequence

Main workflow of the support configuration

Returns:

  • sequence result



44
45
46
47
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
# File '../../src/include/support/wizards.rb', line 44

def MainSequence
  # FIXME: adapt to your needs
  aliases = {
    "overview"   => lambda { OverviewDialog() },
    "upload1"    => lambda { UploadDialog(false) },
    "upload2"    => lambda { UploadDialog(true) },
    "parameters" => lambda { ParametersDialog() },
    "expert"     => lambda { ExpertDialog() },
    "contact"    => lambda { ContactDialog() },
    "generate"   => lambda { GenerateDialog() },
    "files"      => lambda { FilesDialog() }
  }

  # FIXME: adapt to your needs
  sequence = {
    "ws_start"   => "overview",
    "overview"   => {
      :cancel  => :abort,
      :abort   => :abort,
      :back    => :back,
      :tarball => "parameters",
      :upload  => "upload1",
      :next    => :next
    },
    "upload1"    => {
      :cancel => :abort,
      :abort  => :abort,
      :back   => "overview",
      :next   => "overview"
    },
    "parameters" => {
      :cancel => :abort,
      :abort  => :abort,
      :expert => "expert",
      :next   => "contact"
    },
    "expert"     => {
      :cancel => :abort,
      :abort  => :abort,
      :back   => :back,
      :next   => "parameters"
    },
    "contact"    => {
      :cancel => :abort,
      :abort  => :abort,
      :back   => :back,
      :next   => "generate"
    },
    "generate"   => {
      :cancel => :abort,
      :abort  => :abort,
      :back   => :back,
      :next   => "files"
    },
    "files"      => {
      :cancel => :abort,
      :abort  => :abort,
      :back   => :back,
      :next   => "upload2"
    },
    "upload2"    => {
      :cancel => :abort,
      :abort  => :abort,
      :back   => "overview",
      :next   => "overview"
    }
  }

  ret = Sequencer.Run(aliases, sequence)

  deep_copy(ret)
end

- (Object) SupportAutoSequence

Whole configuration of support but without reading and writing. For use with autoinstallation.

Returns:

  • sequence result



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File '../../src/include/support/wizards.rb', line 145

def SupportAutoSequence
  # Initialization dialog caption
  caption = _("Support 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) SupportSequence

Whole configuration of support

Returns:

  • sequence result



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File '../../src/include/support/wizards.rb', line 119

def SupportSequence
  aliases = {
    "read"  => [lambda { ReadDialog() }, true],
    "main"  => lambda { MainSequence() },
    "write" => [lambda { WriteDialog() }, true]
  }

  sequence = {
    "ws_start" => "read",
    "read"     => { :abort => :abort, :next => "main" },
    "main"     => { :cancel => :abort, :abort => :abort, :next => "write" },
    "write"    => { :abort => :abort, :next => :next }
  }

  Wizard.CreateDialog
  Wizard.SetDesktopTitle("support")

  ret = Sequencer.Run(aliases, sequence)

  UI.CloseDialog
  deep_copy(ret)
end