Class List Method List File List

# Module: Yast::NtpClientWizardsInclude

Defined in:
  ../../src/include/ntp-client/wizards.rb

## Instance Method Summary (collapse)

- - (Object) ComplexSequence

  Complex workflow of the ntp-client configuration.

- - (Object) initialize_ntp_client_wizards(include_target)
- - (Object) NtpClientAutoSequence

  Autoyast configuration of ntp-client.

- - (Object) NtpClientSequence

  Whole configuration of ntp-client.

- - (Object) SimpleSequence

  The simple workflow for the NTP client.

## Instance Method Details

### - (`Object`) ComplexSequence

Complex workflow of the ntp-client 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
    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
    # File '../../src/include/ntp-client/wizards.rb', line 25

    def ComplexSequence
      aliases = {
        "main"                 => lambda { MainDialog() },
        "type_select"          => lambda { TypeSelectDialog() },
        "server"               => lambda { ServerDialog() },
        "server_select_local"  => lambda { LocalServerSelectionDialog() },
        "server_select_public" => lambda { PublicServerSelectionDialog() },
        "peer"                 => lambda { PeerDialog() },
        "clock"                => lambda { RadioDialog() },
        "fudge"                => lambda { FudgeDialog() },
        "bcast"                => lambda { BCastDialog() },
        "bcastclient"          => lambda { BCastClientDialog() },
        "store_record"         => [lambda { StoreRecord() }, true]
      }

      sequence = {
        "ws_start"             => "main",
        "main"                 => {
          :abort       => :abort,
          :next        => :next,
          :peer        => "peer",
          :server      => "server",
          :clock       => "clock",
          :bcast       => "bcast",
          :bcastclient => "bcastclient",
          :add         => "type_select"
        },
        "type_select"          => {
          :abort       => :abort,
          :peer        => "peer",
          :server      => "server",
          :clock       => "clock",
          :bcast       => "bcast",
          :bcastclient => "bcastclient"
        },
        "peer"                 => { :abort => :abort, :next => "store_record" },
        "server"               => {
          :abort         => :abort,
          :next          => "store_record",
          :select_local  => "server_select_local",
          :select_public => "server_select_public"
        },
        "server_select_local"  => {
          :abort => :abort,
          :next  => "server",
          :back  => "server"
        },
        "server_select_public" => {
          :abort => :abort,
          :next  => "server",
          :back  => "server"
        },
        "clock"                => {
          :abort => :abort,
          :next  => "store_record",
          :fudge => "fudge"
        },
        "fudge"                => { :abort => :abort, :next => "clock" },
        "bcast"                => { :abort => :abort, :next => "store_record" },
        "bcastclient"          => { :abort => :abort, :next => "store_record" },
        "store_record"         => { :abort => :abort, :next => "main" }
      }

      ret = Sequencer.Run(aliases, sequence)

      ret
    end

### - (`Object`) initialize_ntp_client_wizards(include_target)

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

    def initialize_ntp_client_wizards(include_target)
      Yast.import "UI"

      textdomain "ntp-client"

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

      Yast.include include_target, "ntp-client/dialogs.rb"
    end

### - (`Object`) NtpClientAutoSequence

Autoyast configuration of ntp-client

Returns:

- sequence result

    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
    # File '../../src/include/ntp-client/wizards.rb', line 170

    def NtpClientAutoSequence
      aliases = { "main" => lambda { ComplexSequence() } }

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

      # dialog caption
      caption = _("NTP Client Configuration")
      # label
      contents = Label(_("Initializing ..."))

      Wizard.CreateDialog
      Wizard.SetDesktopTitleAndIcon("ntp-client")
      Wizard.SetContentsButtons(
        caption,
        contents,
        "",
        Label.BackButton,
        Label.NextButton
      )

      ret = Sequencer.Run(aliases, sequence)

      UI.CloseDialog
      ret
    end

### - (`Object`) NtpClientSequence

Whole configuration of ntp-client

Returns:

- sequence result

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

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

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

      Wizard.CreateDialog
      Wizard.SetDesktopTitleAndIcon("ntp-client")
      ret = Sequencer.Run(aliases, sequence)

      UI.CloseDialog
      ret
    end

### - (`Object`) SimpleSequence

The simple workflow for the NTP client

Returns:

- sequence result

    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
    # File '../../src/include/ntp-client/wizards.rb', line 95

    def SimpleSequence
      NtpClient.selected_record = {
        "type"    => "__clock",
        "address" => "127.127.3.2"
      }

      aliases = {
        "switcher"             => [lambda { SelectConfigType() }, true],
        "simple_pre"           => [lambda { SimpleDialogPrepare() }, true],
        "simple"               => lambda { SimpleDialog() },
        "simple_post"          => [lambda { SimpleDialogFinish() }, true],
        "server_select_local"  => lambda { LocalServerSelectionDialog() },
        "server_select_public" => lambda { PublicServerSelectionDialog() },
        "complex"              => lambda { ComplexSequence() }
      }

      sequence = {
        "ws_start"             => "switcher",
        "switcher"             => {
          :simple  => "simple_pre",
          :complex => "complex"
        },
        "simple_pre"           => { :abort => :abort, :next => "simple" },
        "simple"               => {
          :abort         => :abort,
          :next          => "simple_post",
          :complex       => "complex",
          :select_local  => "server_select_local",
          :select_public => "server_select_public"
        },
        "simple_post"          => { :abort => :abort, :next => :next },
        "server_select_local"  => {
          :abort => :abort,
          :next  => "simple",
          :back  => "simple"
        },
        "server_select_public" => {
          :abort => :abort,
          :next  => "simple",
          :back  => "simple"
        },
        "complex"              => { :abort => :abort, :next => :next }
      }

      ret = Sequencer.Run(aliases, sequence)

      ret
    end