YaST2 Developers Documentation: yast2



functions
files
intro

yast2

modules/Report.ycp
Messages handling
Report module collects warnings and errors from modules in auto installation mode. Collected messages can be displayed later.

Imports

  • Popup
  • Summary

Global Functions

global Summary () -> string

Summary of current settings

Return value:
Html formatted configuration summary

global Import (map settings) -> boolean

Get all the Report configuration from a map. the map may be empty.

Parameters:
settings Map with settings (keys: "messages", "errors", "warnings"; values: map
Return value:
success

global Export () -> map

Dump the Report settings to a map, for autoinstallation use.

Return value:
map with settings

global ClearYesNoMessages () -> void

Clear stored yes/no messages

global ClearMessages () -> void

Clear stored messages

global ClearErrors () -> void

Clear stored errors

global ClearWarnings () -> void

Clear stored warnings

global ClearAll () -> void

Clear all stored messages (errors, messages and warnings)

global NumYesNoMessages () -> integer

Return number of stored yes/no messages

Return value:
number of messages

global NumMessages () -> integer

Return number of stored messages

Return value:
number of messages

global NumWarnings () -> integer

Return number of stored warnings

Return value:
number of warnings

global NumErrors () -> integer

Return number of stored errors

Return value:
number of errors

global AnyQuestion (string headline, string message, string yes_button_message, string no_button_message, symbol focus) -> boolean

Store new yes/no message text

Parameters:
headline
message
yes_button_message
no_button_message
focus

global Message (string message_string) -> void

Store new message text

Parameters:
message_string message text, it can contain new line characters ("\n")

global ShowText (string headline_string, string message_string) -> void

Store new message text

Parameters:
headline_string
message_string message text, it can contain new line characters ("\n")

global Warning (string warning_string) -> void

Store new warning text

Parameters:
warning_string warning text, it can contain new line characters ("\n")

global Error (string error_string) -> void

Store new error text

Parameters:
error_string error text, it can contain new line characters ("\n")

global DisplayErrors (boolean display, integer timeout) -> void

Error popup dialog can displayed immediately when new error is stored. This function enables or diables popuping of dialogs.

Parameters:
display if true then display error popups immediately
timeout dialog is automatically closed after timeout seconds. Value 0 means no time out, dialog will be closed only by user.

global DisplayWarnings (boolean display, integer timeout) -> void

Warning popup dialog can displayed immediately when new warningr is stored. This function enables or diables popuping of dialogs.

Parameters:
display if true then display warning popups immediately
timeout dialog is automatically closed after timeout seconds. Value 0 means no time out, dialog will be closed only by user.

global DisplayMessages (boolean display, integer timeout) -> void

Message popup dialog can be displayed immediately when a new message is stored. This function enables or diables popuping of dialogs.

Parameters:
display if true then display message popups immediately
timeout dialog is automatically closed after timeout seconds. Value 0 means no time out, dialog will be closed only by user.

global DisplayYesNoMessages (boolean display, integer timeout) -> void

Yes/No Message popup dialog can be displayed immediately when a new message is stored. This function enables or diables popuping of dialogs.

Parameters:
display if true then display message popups immediately
timeout dialog is automatically closed after timeout seconds. Value 0 means no time out, dialog will be closed only by user.

global LogWarnings (boolean log) -> void

Set warnings logging to .y2log file

Parameters:
log if log is true then warning messages will be logged

global LogYesNoMessages (boolean log) -> void

Set yes/no messages logging to .y2log file

Parameters:
log if log is true then messages will be logged

global LogMessages (boolean log) -> void

Set messages logging to .y2log file

Parameters:
log if log is true then messages will be logged

global LogErrors (boolean log) -> void

Set warnings logging to .y2log file

Parameters:
log if log is true then warning messages will be logged

global GetMessages (boolean w, boolean e, boolean m, boolean ynm) -> string

Create rich text string from stored warning, message or error messages. Every new line character "\n" is replaced by string "
".

Parameters:
w include warnings in returned string
e include errors in returned string
m include messages in returned string
ynm
Return value:
rich text string

YaST2 Developers Documentation