Class: Yast::ALogClass
- Inherits:
-
Module
- Object
- Module
- Yast::ALogClass
- Defined in:
- ../../src/modules/ALog.rb
Instance Method Summary (collapse)
-
- (Object) CommitPopup
Prompt the user for a message to describe the changes that she did using YaST, logs it using #Note.
- - (Object) doLog(type, msg)
-
- (Object) Item(msg)
Log a change to the system from the system point of view.
- - (Object) main
-
- (Object) Note(msg)
Log a change to the system from the human point of view.
- - (Object) uiInput(label)
Instance Method Details
- (Object) CommitPopup
Prompt the user for a message to describe the changes that she did using YaST, logs it using #Note
104 105 106 107 108 109 110 |
# File '../../src/modules/ALog.rb', line 104 def CommitPopup i = uiInput(_("Enter a log message that describes the changes you made.")) msg = i.nil? ? "*empty log message*" : i Note(msg) nil end |
- (Object) doLog(type, msg)
52 53 54 55 56 57 |
# File '../../src/modules/ALog.rb', line 52 def doLog(type, msg) # TODO: make a separate log, this is just a prototype Builtins.y2internal("{%1} %2", type, msg) nil end |
- (Object) Item(msg)
Log a change to the system from the system point of view. msg should include the file being changed, and what changes are made (TODO: with all detail? or summary?) Example “/etc/ntp.conf: added 'server ntp.example.org'”
64 65 66 67 68 |
# File '../../src/modules/ALog.rb', line 64 def Item(msg) doLog("item", msg) nil end |
- (Object) main
45 46 47 48 49 50 |
# File '../../src/modules/ALog.rb', line 45 def main Yast.import "UI" textdomain "base" Yast.import "Label" end |
- (Object) Note(msg)
Log a change to the system from the human point of view. (It will appear slightly differently in the log) Example “get proper time from the corporate time server as requested in ticket bofh#327”
75 76 77 78 79 |
# File '../../src/modules/ALog.rb', line 75 def Note(msg) doLog("note", msg) nil end |
- (Object) uiInput(label)
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File '../../src/modules/ALog.rb', line 81 def uiInput(label) # TODO: more lines? d = VBox( InputField(Id(:val), label, ""), ButtonBox( PushButton( Id(:ok), Opt(:default, :key_F10, :okButton), Label.OKButton ) ) ) UI.OpenDialog(d) ui = nil ui = UI.UserInput while ui != :ok || ui != :cancel val = nil val = Convert.to_string(UI.QueryWidget(Id(:val), :Value)) if ui == :ok val end |