-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathTable-sort-key.rb
More file actions
46 lines (44 loc) · 1.44 KB
/
Copy pathTable-sort-key.rb
File metadata and controls
46 lines (44 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# encoding: utf-8
module Yast
class TableSortingClient < Client
def main
Yast.import "UI"
UI.OpenDialog(
VBox(
Label("Disk"),
MinSize(
30,
10,
Table(
Header("Device", Right("Size")),
[
Item(Id(1),
term(:cell, term(:sortKey, "sd0a001"), "sda1"),
term(:cell, term(:sortKey, "10240"), "10.00 MiB")),
Item(Id(2),
term(:cell, term(:sortKey, "sd0a010"), "sda10"),
term(:cell, term(:sortKey, "2"), "2.00 KiB")),
Item(Id(3),
term(:cell, term(:sortKey, "sd0a002"), "sda2"),
term(:cell, term(:sortKey, "256"), "0.25 MiB")),
Item(Id(4),
term(:cell, term(:sortKey, "sd0b"), "sdb"),
term(:cell, term(:sortKey, "32"), "32.00 KiB")),
Item(Id(5),
term(:cell, term(:sortKey, "sd0b2"), "sdb2"),
term(:cell, term(:sortKey, "4"), "4.00 KiB")),
Item(Id(6),
term(:cell, term(:sortKey, "sdaa"), "sdaa"),
term(:cell, term(:sortKey, "512"), "0.50 MiB"))
]
)
),
PushButton("&OK")
)
)
UI.UserInput
UI.CloseDialog
end
end
end
Yast::TableSortingClient.new.main