Module: Yast::PartitioningEpLogInclude

Defined in:
../../src/include/partitioning/ep-log.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) CreateLogPanel(user_data)



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
# File '../../src/include/partitioning/ep-log.rb', line 34

def CreateLogPanel(user_data)
  user_data = deep_copy(user_data)
  file = "/var/log/messages"

  UI.ReplaceWidget(
    :tree_panel,
    Greasemonkey.Transform(
      VBox(
        # heading
        term(:IconAndHeading, _("Log"), StorageIcons.log_icon),
        # label for log view
        LogView(
          Id(:log),
          Builtins.sformat(_("Contents of %1:"), file),
          10,
          0
        ),
        # push button text
        PushButton(Id(:update), _("Update"))
      )
    )
  )

  # helptext, %1 is replaced by a filename
  helptext = Builtins.sformat(_("This view shows the content of %1."), file)

  Wizard.RestoreHelp(helptext)

  LogViewCore.Start(Id(:log), { "file" => file })

  nil
end

- (Object) DestroyLogPanel(user_data)



85
86
87
88
89
90
# File '../../src/include/partitioning/ep-log.rb', line 85

def DestroyLogPanel(user_data)
  user_data = deep_copy(user_data)
  LogViewCore.Stop

  nil
end

- (Object) HandleLogPanel(user_data, event)



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File '../../src/include/partitioning/ep-log.rb', line 68

def HandleLogPanel(user_data, event)
  user_data = deep_copy(user_data)
  event = deep_copy(event)
  case Event.IsWidgetActivated(event)
    when :update
      LogViewCore.Update(Id(:log))
  end

  case Event.IsTimeout(event)
    when :timeout
      LogViewCore.Update(Id(:log))
  end

  nil
end

- (Object) initialize_partitioning_ep_log(include_target)



28
29
30
31
32
# File '../../src/include/partitioning/ep-log.rb', line 28

def initialize_partitioning_ep_log(include_target)
  textdomain "storage"

  Yast.import "LogViewCore"
end