Skip to content

Commit

Permalink
Perform a small code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Apr 22, 2019
1 parent 973bf84 commit 9a1a5e0
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/lib/y2partitioner/widgets/overview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ def items
*graph_items,
summary_item,
settings_item
# TODO: Bring this back to life - disabled for now (bsc#1078849)
# item_for("settings", _("Settings"), icon: Icons::SETTINGS)
]
end

Expand Down Expand Up @@ -188,15 +186,15 @@ def device_graph
def system_items
page = Pages::System.new(hostname, self)
children = [
disks_items,
raids_items,
lvm_items,
bcache_items,
disks_section,
raids_section,
lvm_section,
bcache_section,
# TODO: Bring this back to life - disabled for now (bsc#1078849)
# crypt_files_items,
# device_mapper_items,
nfs_items,
btrfs_items
nfs_section,
btrfs_section
# TODO: Bring this back to life - disabled for now (bsc#1078849)
# unused_items
].compact
Expand All @@ -205,7 +203,7 @@ def system_items
end

# @return [CWM::PagerTreeItem]
def disks_items
def disks_section
devices = device_graph.disk_devices + device_graph.stray_blk_devices

page = Pages::Disks.new(devices, self)
Expand Down Expand Up @@ -235,7 +233,7 @@ def stray_blk_device_item(device)
end

# @return [CWM::PagerTreeItem]
def raids_items
def raids_section
devices = device_graph.software_raids
page = Pages::MdRaids.new(self)
children = devices.map { |m| raid_items(m) }
Expand All @@ -250,7 +248,7 @@ def raid_items(md)
end

# @return [CWM::PagerTreeItem]
def bcache_items
def bcache_section
return nil unless Y2Storage::Bcache.supported?
devices = device_graph.bcaches
page = Pages::Bcaches.new(devices, self)
Expand All @@ -259,7 +257,7 @@ def bcache_items
end

# @return [CWM::PagerTreeItem]
def lvm_items
def lvm_section
devices = device_graph.lvm_vgs
page = Pages::Lvm.new(self)
children = devices.map { |v| lvm_vg_items(v) }
Expand All @@ -280,13 +278,13 @@ def lvm_lv_items(lv)
end

# @return [CWM::PagerTreeItem]
def nfs_items
def nfs_section
page = Pages::NfsMounts.new(self)
section_item(page, Icons::NFS)
end

# @return [CWM::PagerTreeItem]
def btrfs_items
def btrfs_section
page = Pages::Btrfs.new(self)
section_item(page, Icons::BTRFS)
end
Expand Down

0 comments on commit 9a1a5e0

Please sign in to comment.