• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yast / yast-ntp-client / 3618557524

pending completion
3618557524

Pull #173

github

Unknown Committer
Unknown Commit Message
Pull Request #173: WIP: Updated ntp sources handling

166 of 166 new or added lines in 5 files covered. (100.0%)

931 of 1445 relevant lines covered (64.43%)

20.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/include/ntp-client/dialogs.rb
1
# File:  clients/ntp-client.ycp
2
# Package:  Configuration of ntp-client
3
# Summary:  Main file
4
# Authors:  Jiri Srain <jsrain@suse.cz>
5
#
6
# $Id$
7
#
8
# Main file for ntp-client configuration. Uses all other files.
9

10
module Yast
×
11
  module NtpClientDialogsInclude
×
12
    def initialize_ntp_client_dialogs(include_target)
×
13
      textdomain "ntp-client"
×
14

15
      Yast.import "CWM"
×
16
      Yast.import "CWMTab"
×
17
      Yast.import "Label"
×
18
      Yast.import "NtpClient"
×
19
      Yast.import "Popup"
×
20
      Yast.import "Stage"
×
21
      Yast.import "SuSEFirewall"
×
22
      Yast.import "Wizard"
×
23
      Yast.import "Report"
×
24
      Yast.import "Confirm"
×
25

26
      Yast.include include_target, "ntp-client/misc.rb"
×
27

28
      @widgets = nil
×
29
    end
×
30

31
    # Read settings dialog
32
    # @return `abort if aborted and `next otherwise
33
    def ReadDialog
×
34
      Wizard.RestoreHelp(Ops.get_string(@HELPS, "read", ""))
×
35

36
      # checking for root permissions (#158483)
37
      return :abort if !Stage.initial && !Confirm.MustBeRoot
×
38

39
      NtpClient.AbortFunction = fun_ref(method(:PollAbort), "boolean ()")
×
40
      ret = NtpClient.Read
×
41
      NtpClient.AbortFunction = nil
×
42
      ret ? :next : :abort
×
43
    end
×
44

45
    # Write settings dialog
46
    # @return `abort if aborted and `next otherwise
47
    def WriteDialog
×
48
      return :next if Stage.initial
×
49

50
      Wizard.RestoreHelp(Ops.get_string(@HELPS, "write", ""))
×
51
      NtpClient.AbortFunction = fun_ref(method(:PollAbort), "boolean ()")
×
52
      ret = NtpClient.Write
×
53
      NtpClient.AbortFunction = nil
×
54
      ret ? :next : :abort
×
55
    end
×
56
  end
×
57
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc