summaryrefslogtreecommitdiff
path: root/Userland/Applications/SystemMonitor/SystemMonitor.gml
blob: 99ed6dabe88dc586922b29c3ec1b64941671ab12 (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
@GUI::Widget {
    fill_with_background_color: true
    layout: @GUI::VerticalBoxLayout {}

    // Add a tasteful separating line between the menu and the main UI.
    @GUI::HorizontalSeparator {
        fixed_height: 2
    }

    @GUI::Widget {
        layout: @GUI::VerticalBoxLayout {
            margins: [0, 4, 4]
        }

        @GUI::TabWidget {
            name: "main_tabs"

            @GUI::Widget {
                title: "Processes"
                name: "processes"
                layout: @GUI::VerticalBoxLayout {
                    margins: [4]
                    spacing: 0
                }

                @GUI::TreeView {
                    name: "process_table"
                    column_headers_visible: true
                    should_fill_selected_rows: true
                    selection_behavior: "SelectRows"
                }
            }

            @GUI::Widget {
                title: "Performance"
                name: "performance"
                background_role: "Button"
                fill_with_background_color: true
                layout: @GUI::VerticalBoxLayout {
                    margins: [4]
                }

                @GUI::GroupBox {
                    title: "CPU usage"
                    name: "cpu_graph"
                    layout: @GUI::VerticalBoxLayout {}
                }

                @GUI::GroupBox {
                    title: "Memory usage"
                    fixed_height: 120
                    layout: @GUI::VerticalBoxLayout {
                        margins: [6]
                    }

                    @SystemMonitor::GraphWidget {
                        stack_values: true
                        name: "memory_graph"
                    }
                }

                @SystemMonitor::MemoryStatsWidget {
                    name: "memory_stats"
                    memory_graph: "memory_graph"
                }
            }

            @SystemMonitor::StorageTabWidget {
                title: "Storage"
                name: "storage"
                layout: @GUI::VerticalBoxLayout {
                    margins: [4]
                }

                @GUI::TableView {
                    name: "storage_table"
                }
            }

            @SystemMonitor::NetworkStatisticsWidget {
                title: "Network"
                name: "network"
            }

            @SystemMonitor::HardwareTabWidget {
                title: "Hardware"
                name: "hardware"
                layout: @GUI::VerticalBoxLayout {
                    margins: [4]
                }

                @GUI::GroupBox {
                    title: "CPUs"
                    fixed_height: 128
                    layout: @GUI::VerticalBoxLayout {
                        margins: [6]
                    }

                    @GUI::TableView {
                        name: "cpus_table"
                    }
                }

                @GUI::GroupBox {
                    title: "PCI devices"
                    layout: @GUI::VerticalBoxLayout {
                        margins: [6]
                    }

                    @GUI::TableView {
                        name: "pci_dev_table"
                    }
                }
            }
        }
    }

    @GUI::Statusbar {
        segment_count: 3
        name: "statusbar"
    }
}