Skip to content

Commit

Permalink
Merge dba2f27 into e28a63d
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Jan 8, 2020
2 parents e28a63d + dba2f27 commit c74c360
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 20 deletions.
7 changes: 7 additions & 0 deletions package/yast2-kdump.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jan 8 14:25:28 CET 2020 - schubi@suse.de

- Showing default (expected) values for high/low kdump memory.
(bsc#1153940)
- 4.2.7

-------------------------------------------------------------------
Wed Oct 30 10:48:37 UTC 2019 - Josef Reidinger <jreidinger@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-kdump.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-kdump
Version: 4.2.6
Version: 4.2.7
Release: 0
Summary: Configuration of kdump
License: GPL-2.0-only
Expand Down
48 changes: 30 additions & 18 deletions src/include/kdump/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -523,14 +523,19 @@ def tabs
end

def kdump_memory_widget
min = Kdump.memory_limits[:min_low].to_i
max = Kdump.memory_limits[:max_low].to_i
low_min = Kdump.memory_limits[:min_low].to_i
low_max = Kdump.memory_limits[:max_low].to_i
low_default = Kdump.memory_limits[:default_low].to_i
low_label = if Kdump.high_memory_supported?
_("Kdump &Low Memory [MiB]")
else
_("Kdump Memor&y [MiB]")
end
low_label += " (#{min} - #{max})"
# TRANSLATORS: Each momory value is based on MiB
low_range = format(_("(%{low_min} - %{low_max}, default: %{low_default})"),
low_min: low_min,
low_max: low_max,
low_default: low_default)
widgets = [
Left(
HBox(
Expand All @@ -539,37 +544,44 @@ def kdump_memory_widget
HStretch()
)
),
VSpacing(1),
Left(
HBox(
Left(Label(_("Usable Memory [MiB]:"))),
Left(Label(Id("usable_memory"), "0123456789")),
HStretch()
)
),
Left(
IntField(
Id("allocated_low_memory"),
Opt(:notify),
low_label,
min,
max,
0
)
)
VSpacing(1),
Left(IntField(Id("allocated_low_memory"),
Opt(:notify),
low_label,
low_min,
low_max,
0)),
Left(Label(low_range))
]
if Kdump.high_memory_supported?
min = Kdump.memory_limits[:min_high].to_i
max = Kdump.memory_limits[:max_high].to_i
high_min = Kdump.memory_limits[:min_high].to_i
high_max = Kdump.memory_limits[:max_high].to_i
high_default = Kdump.memory_limits[:default_high].to_i
# TRANSLATORS: Each momory value is based on MiB
high_range = format(_("(%{high_min} - %{high_max}, default: %{high_default})"),
high_min: high_min,
high_max: high_max,
high_default: high_default)
widgets << VSpacing(1)
widgets << Left(
IntField(
Id("allocated_high_memory"),
Opt(:notify),
_("Kdump &High Memory [MiB]") + " (#{min} - #{max})",
min,
max,
_("Kdump &High Memory [MiB]"),
high_min,
high_max,
0
)
)
widgets << Left(Label(high_range))
end
VBox(*widgets)
end
Expand Down
3 changes: 2 additions & 1 deletion src/lib/kdump/kdump_calibrator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def total_memory
#
# @return [Hash] Memory limits
def memory_limits
{ min_low: min_low, max_low: max_low, min_high: min_high, max_high: max_high }
{ min_low: min_low, max_low: max_low, default_low: default_low,
min_high: min_high, max_high: max_high, default_high: default_high }
end

private
Expand Down

0 comments on commit c74c360

Please sign in to comment.