Class: Registration::UI::AutoyastConfigDialog

Inherits:
Object
  • Object
show all
Includes:
Yast, Yast::I18n, Yast::Logger, Yast::UIShortcuts
Defined in:
src/lib/registration/ui/autoyast_config_dialog.rb

Overview

this class displays and runs the main dialog for AutoYaST configuration

Constant Summary collapse

ALL_WIDGETS =

list of widget ID in the dialog, add the new widget ID here after adding a new widget to the dialog

[
  :addons, :do_registration, :email, :install_updates,
  :reg_code, :reg_server, :reg_server_cert, :reg_server_cert_fingerprint,
  :reg_server_cert_fingerprint_type, :slp_discovery
].freeze
DATA_WIDGETS =

widgets containing data (serialized to the exported Hash) (:addons belongs to a push button, it does not contain any data)

ALL_WIDGETS - [:addons]
STATUS_WIDGETS =

widgets which should react on the global on/off state (exclude the the on/off checkbox itself)

ALL_WIDGETS - [:do_registration]

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ AutoyastConfigDialog

the constructor

Parameters:


46
47
48
49
50
# File 'src/lib/registration/ui/autoyast_config_dialog.rb', line 46

def initialize(config)
  textdomain "registration"

  @config = config
end

Class Method Details

.run(config) ⇒ Symbol

display and run the dialog for configuring AutoYaST registration

Parameters:

Returns:

  • (Symbol)

    the user input


39
40
41
42
# File 'src/lib/registration/ui/autoyast_config_dialog.rb', line 39

def self.run(config)
  dialog = AutoyastConfigDialog.new(config)
  dialog.run
end

Instance Method Details

#runSymbol

display the extension selection dialog and wait for a button click

Returns:

  • (Symbol)

    user input (:import, :cancel)


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
# File 'src/lib/registration/ui/autoyast_config_dialog.rb', line 54

def run
  caption = _("Product Registration")
  help_text = "<p><b>#{caption}</b></p>"
  help_text += _(
    "<p>Product registration includes your product in SUSE Customer " \
      "Center database,\nenabling you to get online updates and " \
      "technical support.\nTo register while installing automatically, " \
      "select <b>Run Product Registration</b>.</p>"
  )
  help_text += _(
    "<p>If your network deploys a custom registration server, set the " \
    "correct URL of the server\nand the location of the SMT " \
    "certificate in <b>SMT Server Settings</b>. Refer\nto your SMT " \
    "manual for further assistance.</p>"
  )

  # FIXME: the dialog should be created by external code before calling this
  Wizard.CreateDialog
  Wizard.SetContents(caption, content, help_text, false, true)
  Wizard.SetNextButton(:next, Label.FinishButton)

  refresh_widget_state

  ret = handle_dialog

  Wizard.RestoreNextButton

  ret
end