From cd71b450891e09998d3fd9fe8149b437a98f65b3 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 22 Jun 2025 22:17:02 +0200 Subject: [PATCH] Add container inactive_file & limit to InfluxDB2 export #3206 --- docs/api.rst | 697 ++++++++++-------- glances/outputs/glances_restful_api.py | 9 +- .../js/components/plugin-containers.vue | 94 +-- glances/outputs/static/public/glances.js | 2 +- glances/plugins/containers/__init__.py | 8 + glances/plugins/containers/engines/docker.py | 2 + glances/plugins/containers/engines/podman.py | 2 + glances/plugins/plugin/model.py | 9 +- 8 files changed, 435 insertions(+), 388 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index d67cb0df..ac6dc2fd 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -160,7 +160,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.3796122074127197}, + "timer": 0.3682515621185303}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -169,7 +169,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.37954068183898926}] + "timer": 0.36815667152404785}] Fields descriptions: @@ -197,7 +197,7 @@ Get a specific item when field matches the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.3796122074127197}]} + "timer": 0.3682515621185303}]} GET cloud --------- @@ -245,21 +245,23 @@ Get plugin stats:: "engine": "docker", "id": "454a8c7f059271f0e7fbb757375014115db3b6e0df2c039e66bb2647f717f67e", "image": ["timescale/timescaledb-ha:pg17"], - "io": {"cumulative_ior": 24920064, "cumulative_iow": 0}, + "io": {"cumulative_ior": 62033920, "cumulative_iow": 0}, "io_rx": None, "io_wx": None, "key": "name", - "memory": {"inactive_file": 7553024, + "memory": {"inactive_file": 4685824, "limit": 16421875712, - "usage": 170262528}, + "usage": 170561536}, + "memory_inactive_file": 4685824, + "memory_limit": 16421875712, "memory_percent": None, - "memory_usage": 170262528, + "memory_usage": 170561536, "name": "timescaledb-for-glances", - "network": {"cumulative_rx": 172655, "cumulative_tx": 77037}, + "network": {"cumulative_rx": 203054, "cumulative_tx": 90186}, "network_rx": None, "network_tx": None, "status": "running", - "uptime": "39 mins"}] + "uptime": "an hour"}] Fields descriptions: @@ -270,6 +272,8 @@ Fields descriptions: * **created**: Container creation date (unit is *None*) * **command**: Container command (unit is *None*) * **cpu_percent**: Container CPU consumption (unit is *percent*) +* **memory_inactive_file**: Container memory inactive file (unit is *byte*) +* **memory_limit**: Container memory limit (unit is *byte*) * **memory_usage**: Container memory usage (unit is *byte*) * **io_rx**: Container IO bytes read rate (unit is *bytepersecond*) * **io_wx**: Container IO bytes write rate (unit is *bytepersecond*) @@ -295,23 +299,25 @@ Get a specific item when field matches the given value:: "engine": "docker", "id": "454a8c7f059271f0e7fbb757375014115db3b6e0df2c039e66bb2647f717f67e", "image": ["timescale/timescaledb-ha:pg17"], - "io": {"cumulative_ior": 24920064, + "io": {"cumulative_ior": 62033920, "cumulative_iow": 0}, "io_rx": None, "io_wx": None, "key": "name", - "memory": {"inactive_file": 7553024, + "memory": {"inactive_file": 4685824, "limit": 16421875712, - "usage": 170262528}, + "usage": 170561536}, + "memory_inactive_file": 4685824, + "memory_limit": 16421875712, "memory_percent": None, - "memory_usage": 170262528, + "memory_usage": 170561536, "name": "timescaledb-for-glances", - "network": {"cumulative_rx": 172655, - "cumulative_tx": 77037}, + "network": {"cumulative_rx": 203054, + "cumulative_tx": 90186}, "network_rx": None, "network_tx": None, "status": "running", - "uptime": "39 mins"}]} + "uptime": "an hour"}]} GET core -------- @@ -338,19 +344,19 @@ Get plugin stats:: # curl http://localhost:61208/api/4/cpu {"cpucore": 16, - "ctx_switches": 769574166, + "ctx_switches": 836161231, "guest": 0.0, - "idle": 92.4, - "interrupts": 308408102, - "iowait": 1.3, + "idle": 92.2, + "interrupts": 334832065, + "iowait": 1.2, "irq": 0.0, "nice": 0.0, - "soft_interrupts": 61314500, + "soft_interrupts": 66287793, "steal": 0.0, "syscalls": 0, - "system": 2.9, - "total": 7.0, - "user": 3.4} + "system": 3.0, + "total": 7.5, + "user": 3.7} Fields descriptions: @@ -383,7 +389,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/cpu/total - {"total": 7.0} + {"total": 7.5} GET diskio ---------- @@ -393,10 +399,10 @@ Get plugin stats:: # curl http://localhost:61208/api/4/diskio [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 11332324864, - "read_count": 603864, - "write_bytes": 19931874304, - "write_count": 2092501}, + "read_bytes": 13632835072, + "read_count": 742167, + "write_bytes": 21066335232, + "write_count": 2228629}, {"disk_name": "nvme0n1p1", "key": "disk_name", "read_bytes": 12949504, @@ -436,10 +442,10 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/diskio/disk_name/value/nvme0n1 {"nvme0n1": [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 11332324864, - "read_count": 603864, - "write_bytes": 19931874304, - "write_count": 2092501}]} + "read_bytes": 13632835072, + "read_count": 742167, + "write_bytes": 21066335232, + "write_count": 2228629}]} GET folders ----------- @@ -466,14 +472,14 @@ Get plugin stats:: # curl http://localhost:61208/api/4/fs [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 761794158592, + "free": 761777639424, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", "options": "rw,relatime", "percent": 20.0, "size": 1003736440832, - "used": 190879776768}, + "used": 190896295936}, {"device_name": "zsfpool", "free": 41680896, "fs_type": "zfs", @@ -504,14 +510,14 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/fs/mnt_point/value// {"/": [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 761794158592, + "free": 761777639424, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", "options": "rw,relatime", "percent": 20.0, "size": 1003736440832, - "used": 190879776768}]} + "used": 190896295936}]} GET gpu ------- @@ -584,9 +590,9 @@ Get plugin stats:: # curl http://localhost:61208/api/4/load {"cpucore": 16, - "min1": 1.33642578125, - "min15": 0.787109375, - "min5": 1.06787109375} + "min1": 0.91357421875, + "min15": 0.90576171875, + "min5": 1.00537109375} Fields descriptions: @@ -598,7 +604,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/load/min1 - {"min1": 1.33642578125} + {"min1": 0.91357421875} GET mem ------- @@ -606,16 +612,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/4/mem - {"active": 9752326144, - "available": 1487818752, - "buffers": 31051776, - "cached": 2230222848, - "free": 1487818752, - "inactive": 4722712576, - "percent": 90.9, - "shared": 769691648, + {"active": 6456958976, + "available": 865419264, + "buffers": 62226432, + "cached": 1580470272, + "free": 865419264, + "inactive": 8565628928, + "percent": 94.7, + "shared": 680034304, "total": 16421875712, - "used": 14934056960} + "used": 15556456448} Fields descriptions: @@ -642,13 +648,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/4/memswap - {"free": 229376, + {"free": 200704, "percent": 100.0, - "sin": 1334226944, - "sout": 5940338688, + "sin": 1535938560, + "sout": 6195224576, "time_since_update": 1, "total": 4294963200, - "used": 4294733824} + "used": 4294762496} Fields descriptions: @@ -673,32 +679,32 @@ Get plugin stats:: # curl http://localhost:61208/api/4/network [{"alias": None, "bytes_all": None, - "bytes_all_gauge": 555231074, + "bytes_all_gauge": 572188356, "bytes_all_rate_per_sec": None, "bytes_recv": None, - "bytes_recv_gauge": 341594852, + "bytes_recv_gauge": 352553274, "bytes_recv_rate_per_sec": None, "bytes_sent": None, - "bytes_sent_gauge": 213636222, + "bytes_sent_gauge": 219635082, "bytes_sent_rate_per_sec": None, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.383251428604126}, + "time_since_update": 0.37450194358825684}, {"alias": None, "bytes_all": None, - "bytes_all_gauge": 30225, + "bytes_all_gauge": 32977, "bytes_all_rate_per_sec": None, "bytes_recv": None, "bytes_recv_gauge": 0, "bytes_recv_rate_per_sec": None, "bytes_sent": None, - "bytes_sent_gauge": 30225, + "bytes_sent_gauge": 32977, "bytes_sent_rate_per_sec": None, "interface_name": "ipv6leakintrf0", "key": "interface_name", "speed": 0, - "time_since_update": 0.383251428604126}] + "time_since_update": 0.37450194358825684}] Fields descriptions: @@ -727,18 +733,18 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/network/interface_name/value/wlp0s20f3 {"wlp0s20f3": [{"alias": None, "bytes_all": None, - "bytes_all_gauge": 555231074, + "bytes_all_gauge": 572188356, "bytes_all_rate_per_sec": None, "bytes_recv": None, - "bytes_recv_gauge": 341594852, + "bytes_recv_gauge": 352553274, "bytes_recv_rate_per_sec": None, "bytes_sent": None, - "bytes_sent_gauge": 213636222, + "bytes_sent_gauge": 219635082, "bytes_sent_rate_per_sec": None, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.383251428604126}]} + "time_since_update": 0.37450194358825684}]} GET now ------- @@ -746,7 +752,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/4/now - {"custom": "2025-06-22 18:22:53 CEST", "iso": "2025-06-22T18:22:53+02:00"} + {"custom": "2025-06-22 18:59:00 CEST", "iso": "2025-06-22T18:59:00+02:00"} Fields descriptions: @@ -756,7 +762,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/now/iso - {"iso": "2025-06-22T18:22:53+02:00"} + {"iso": "2025-06-22T18:59:00+02:00"} GET percpu ---------- @@ -768,31 +774,31 @@ Get plugin stats:: "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 25.0, + "idle": 27.0, "interrupt": None, - "iowait": 0.0, + "iowait": 1.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 10.0, - "total": 75.0, + "system": 6.0, + "total": 73.0, "user": 0.0}, {"cpu_number": 1, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 32.0, + "idle": 35.0, "interrupt": None, - "iowait": 0.0, + "iowait": 1.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 68.0, + "total": 65.0, "user": 0.0}] Fields descriptions: @@ -829,7 +835,7 @@ Get plugin stats:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.016936, + "status": 0.013013, "timeout": 3}] Fields descriptions: @@ -857,7 +863,7 @@ Get a specific item when field matches the given value:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.016936, + "status": 0.013013, "timeout": 3}]} GET processcount @@ -866,7 +872,7 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/4/processcount - {"pid_max": 0, "running": 2, "sleeping": 424, "thread": 2209, "total": 575} + {"pid_max": 0, "running": 1, "sleeping": 426, "thread": 2115, "total": 573} Fields descriptions: @@ -879,7 +885,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/processcount/total - {"total": 575} + {"total": 573} GET processlist --------------- @@ -914,65 +920,90 @@ Get plugin stats:: "cpu_times": {"children_system": 0.27, "children_user": 0.08, "iowait": 0.0, - "system": 3045.45, - "user": 1877.77}, + "system": 3298.33, + "user": 2034.8}, "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [102701056, + "io_counters": [107157504, 32768, 0, 0, 0, - 1365398528, - 760889344, + 1818813440, + 971116544, 0, 0, 0, - 99730432, + 121641984, 643072, 0, 0, 0, - 116122624, - 344064, + 236739584, + 348160, 0, 0, 0, - 10363904, + 18920448, 0, 0, 0, 0, - 43321344, + 18153472, + 0, + 0, + 0, + 0, + 11788288, + 0, + 0, + 0, + 0, + 7098368, + 0, + 0, + 0, + 0, + 30167040, + 0, + 0, + 0, + 0, + 62865408, + 9912320, + 0, + 0, + 0, + 215826432, + 142090240, + 0, + 0, + 0, + 69390336, 81920, 0, 0, 0, - 147589120, - 132931584, - 0, - 0, - 0, - 8920064, + 13773824, 0, 0, 0, 0, - 73924608, + 82088960, 0, 0, 0, 0, - 38301696, + 83050496, 0, 0, 0, 0, - 1230848, + 1284096, 8192, 0, 0, 0, - 1818624, + 5726208, 0, 0, 0, @@ -982,13 +1013,13 @@ Get plugin stats:: 0, 0, 0, - 851968, + 983040, 0, 0, 0, 0, - 7394304, - 6295552, + 28279808, + 6742016, 0, 0, 0, @@ -1003,14 +1034,14 @@ Get plugin stats:: 0, 0], "key": "pid", - "memory_info": {"data": 7859228672, + "memory_info": {"data": 8399622144, "dirty": 0, "lib": 0, - "rss": 6381924352, - "shared": 28991488, + "rss": 6738046976, + "shared": 22175744, "text": 142934016, "vms": 1496234172416}, - "memory_percent": 38.862334997070526, + "memory_percent": 41.03092176660605, "name": "code", "nice": 0, "num_threads": 18, @@ -1042,25 +1073,25 @@ Get plugin stats:: "--disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess", "--variations-seed-version"], "cpu_percent": 0.0, - "cpu_times": {"children_system": 760.22, - "children_user": 170.94, + "cpu_times": {"children_system": 823.48, + "children_user": 197.83, "iowait": 0.0, - "system": 735.2, - "user": 2372.27}, + "system": 783.73, + "user": 2536.64}, "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [1365398528, 760889344, 0, 0, 0], + "io_counters": [1818813440, 971116544, 0, 0, 0], "key": "pid", - "memory_info": {"data": 3502342144, + "memory_info": {"data": 3558211584, "dirty": 0, "lib": 0, - "rss": 1511571456, - "shared": 38739968, + "rss": 1537818624, + "shared": 33570816, "text": 142934016, - "vms": 1524465074176}, - "memory_percent": 9.204621216901828, + "vms": 1524451495936}, + "memory_percent": 9.36445172871614, "name": "code", "nice": 0, - "num_threads": 83, + "num_threads": 57, "pid": 16602, "status": "S", "time_since_update": 1, @@ -1092,12 +1123,17 @@ Get plugin stats:: 16602, 17005, 15978, + 336618, + 336617, 16662, - 16074, + 336658, + 336648, + 336668, 15865, + 16074, 16018, - 17530, 16604, + 17530, 16152, 16938, 17345, @@ -1107,66 +1143,91 @@ Get plugin stats:: 15867], "cmdline": ["code"], "cpu_percent": 0, - "cpu_times": {"children_system": 761.63, - "children_user": 175.16, - "system": 4194.55, - "user": 8850.69}, - "io_counters": [102701056, + "cpu_times": {"children_system": 825.2399999999999, + "children_user": 203.46000000000004, + "system": 4523.880000000001, + "user": 9413.799999999997}, + "io_counters": [107157504, 32768, 0, 0, 0, - 1365398528, - 760889344, + 1818813440, + 971116544, 0, 0, 0, - 99730432, + 121641984, 643072, 0, 0, 0, - 116122624, - 344064, + 236739584, + 348160, 0, 0, 0, - 10363904, + 18920448, 0, 0, 0, 0, - 43321344, + 18153472, + 0, + 0, + 0, + 0, + 11788288, + 0, + 0, + 0, + 0, + 7098368, + 0, + 0, + 0, + 0, + 30167040, + 0, + 0, + 0, + 0, + 62865408, + 9912320, + 0, + 0, + 0, + 215826432, + 142090240, + 0, + 0, + 0, + 69390336, 81920, 0, 0, 0, - 147589120, - 132931584, - 0, - 0, - 0, - 8920064, + 13773824, 0, 0, 0, 0, - 73924608, + 82088960, 0, 0, 0, 0, - 38301696, + 83050496, 0, 0, 0, 0, - 1230848, + 1284096, 8192, 0, 0, 0, - 1818624, + 5726208, 0, 0, 0, @@ -1176,13 +1237,13 @@ Get plugin stats:: 0, 0, 0, - 851968, + 983040, 0, 0, 0, 0, - 7394304, - 6295552, + 28279808, + 6742016, 0, 0, 0, @@ -1196,18 +1257,18 @@ Get plugin stats:: 0, 0, 0], - "memory_info": {"data": 22324699136, - "rss": 9708691456, - "shared": 525979648, - "text": 2429878272, - "vms": 19632912211968}, - "memory_percent": 59.12047823444154, + "memory_info": {"data": 26825056256, + "rss": 11080298496, + "shared": 790331392, + "text": 3144548352, + "vms": 27108489060352}, + "memory_percent": 67.47279476669812, "name": "code", "nice": 0, - "nprocs": 17, - "num_threads": 326, + "nprocs": 22, + "num_threads": 346, "pid": "_", - "status": "_", + "status": "S", "time_since_update": 1, "username": "nicolargo"}, {"childrens": [17473], @@ -1216,17 +1277,17 @@ Get plugin stats:: "cpu_times": {"children_system": 0.0, "children_user": 0.0, "iowait": 0.0, - "system": 24.2, - "user": 186.71}, - "io_counters": [374910976, 0, 0, 0, 0], + "system": 24.88, + "user": 192.03}, + "io_counters": [454381568, 0, 0, 0, 0], "memory_info": {"data": 1479667712, "dirty": 0, "lib": 0, - "rss": 661827584, - "shared": 12406784, + "rss": 584589312, + "shared": 11730944, "text": 33955840, "vms": 2726150144}, - "memory_percent": 4.030158281592529, + "memory_percent": 3.5598205847631736, "name": "cloudcode_cli", "nice": 0, "nprocs": 1, @@ -1266,60 +1327,45 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/4/quicklook - {"cpu": 7.0, + {"cpu": 7.5, "cpu_hz": 4475000000.0, - "cpu_hz_current": 1011126874.9999999, + "cpu_hz_current": 2061380999.9999998, "cpu_log_core": 16, "cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H", "cpu_phys_core": 10, - "load": 4.9, - "mem": 90.9, + "load": 5.7, + "mem": 94.7, "percpu": [{"cpu_number": 0, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 25.0, + "idle": 27.0, "interrupt": None, - "iowait": 0.0, + "iowait": 1.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 10.0, - "total": 75.0, + "system": 6.0, + "total": 73.0, "user": 0.0}, {"cpu_number": 1, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 32.0, + "idle": 35.0, "interrupt": None, - "iowait": 0.0, + "iowait": 1.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 68.0, + "total": 65.0, "user": 0.0}, {"cpu_number": 2, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 33.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 1.0, - "total": 67.0, - "user": 0.0}, - {"cpu_number": 3, "dpc": None, "guest": 0.0, "guest_nice": 0.0, @@ -1334,41 +1380,41 @@ Get plugin stats:: "system": 0.0, "total": 66.0, "user": 0.0}, + {"cpu_number": 3, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 36.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 64.0, + "user": 0.0}, {"cpu_number": 4, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 30.0, + "idle": 29.0, "interrupt": None, - "iowait": 0.0, + "iowait": 1.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 3.0, - "total": 70.0, - "user": 1.0}, + "system": 5.0, + "total": 71.0, + "user": 2.0}, {"cpu_number": 5, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 26.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 4.0, - "total": 74.0, - "user": 2.0}, - {"cpu_number": 6, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 31.0, + "idle": 18.0, "interrupt": None, "iowait": 2.0, "irq": 0.0, @@ -1376,14 +1422,14 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 0.0, - "total": 69.0, - "user": 1.0}, - {"cpu_number": 7, + "system": 8.0, + "total": 82.0, + "user": 7.0}, + {"cpu_number": 6, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 22.0, + "idle": 33.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1392,15 +1438,15 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 2.0, - "total": 78.0, - "user": 10.0}, - {"cpu_number": 8, + "total": 67.0, + "user": 0.0}, + {"cpu_number": 7, "dpc": None, "guest": 0.0, "guest_nice": 0.0, "idle": 33.0, "interrupt": None, - "iowait": 1.0, + "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, @@ -1408,8 +1454,68 @@ Get plugin stats:: "steal": 0.0, "system": 0.0, "total": 67.0, + "user": 2.0}, + {"cpu_number": 8, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 35.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 65.0, "user": 0.0}, {"cpu_number": 9, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 36.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 64.0, + "user": 0.0}, + {"cpu_number": 10, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 33.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 67.0, + "user": 1.0}, + {"cpu_number": 11, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 36.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 64.0, + "user": 0.0}, + {"cpu_number": 12, "dpc": None, "guest": 0.0, "guest_nice": 0.0, @@ -1421,99 +1527,54 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 0.0, + "system": 1.0, "total": 66.0, "user": 0.0}, - {"cpu_number": 10, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 32.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 1.0, - "total": 68.0, - "user": 1.0}, - {"cpu_number": 11, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 33.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 67.0, - "user": 0.0}, - {"cpu_number": 12, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 33.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 1.0, - "total": 67.0, - "user": 0.0}, {"cpu_number": 13, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 33.0, + "idle": 34.0, "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 67.0, - "user": 0.0}, - {"cpu_number": 14, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 33.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 67.0, - "user": 0.0}, - {"cpu_number": 15, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 32.0, - "interrupt": None, - "iowait": 0.0, + "iowait": 1.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 68.0, - "user": 0.0}], + "total": 66.0, + "user": 1.0}, + {"cpu_number": 14, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 35.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 65.0, + "user": 0.0}, + {"cpu_number": 15, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 2.0, + "total": 66.0, + "user": 1.0}], "swap": 100.0} Fields descriptions: @@ -1552,14 +1613,14 @@ Get plugin stats:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 44, + "value": 42, "warning": 0}, {"critical": None, "key": "label", "label": "Ambient 3", "type": "temperature_core", "unit": "C", - "value": 36, + "value": 34, "warning": 0}] Fields descriptions: @@ -1621,7 +1682,7 @@ Get a specific item when field matches the given value:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 44, + "value": 42, "warning": 0}]} GET smart @@ -1665,7 +1726,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/4/uptime - "1 day, 4:58:34" + "1 day, 5:34:41" GET version ----------- @@ -1710,8 +1771,8 @@ Get plugin stats:: # curl http://localhost:61208/api/4/wifi [{"key": "ssid", - "quality_level": -66.0, - "quality_link": 44.0, + "quality_level": -68.0, + "quality_link": 42.0, "ssid": "wlp0s20f3"}] Get a specific field:: @@ -1723,8 +1784,8 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/wifi/ssid/value/wlp0s20f3 {"wlp0s20f3": [{"key": "ssid", - "quality_level": -66.0, - "quality_link": 44.0, + "quality_level": -68.0, + "quality_link": 42.0, "ssid": "wlp0s20f3"}]} GET all stats @@ -1788,34 +1849,34 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/4/cpu/history - {"system": [["2025-06-22T18:22:54.444782", 2.9], - ["2025-06-22T18:22:55.515406", 1.4], - ["2025-06-22T18:22:56.534675", 1.4]], - "user": [["2025-06-22T18:22:54.444780", 3.4], - ["2025-06-22T18:22:55.515405", 1.5], - ["2025-06-22T18:22:56.534674", 1.5]]} + {"system": [["2025-06-22T18:59:01.737187", 3.0], + ["2025-06-22T18:59:02.811077", 1.4], + ["2025-06-22T18:59:03.845482", 1.4]], + "user": [["2025-06-22T18:59:01.737185", 3.7], + ["2025-06-22T18:59:02.811075", 1.3], + ["2025-06-22T18:59:03.845480", 1.3]]} Limit history to last 2 values:: # curl http://localhost:61208/api/4/cpu/history/2 - {"system": [["2025-06-22T18:22:55.515406", 1.4], - ["2025-06-22T18:22:56.534675", 1.4]], - "user": [["2025-06-22T18:22:55.515405", 1.5], - ["2025-06-22T18:22:56.534674", 1.5]]} + {"system": [["2025-06-22T18:59:02.811077", 1.4], + ["2025-06-22T18:59:03.845482", 1.4]], + "user": [["2025-06-22T18:59:02.811075", 1.3], + ["2025-06-22T18:59:03.845480", 1.3]]} History for a specific field:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2025-06-22T18:22:53.291867", 2.9], - ["2025-06-22T18:22:54.444782", 2.9], - ["2025-06-22T18:22:55.515406", 1.4], - ["2025-06-22T18:22:56.534675", 1.4]]} + {"system": [["2025-06-22T18:59:00.606500", 3.0], + ["2025-06-22T18:59:01.737187", 3.0], + ["2025-06-22T18:59:02.811077", 1.4], + ["2025-06-22T18:59:03.845482", 1.4]]} Limit history for a specific field to last 2 values:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2025-06-22T18:22:55.515406", 1.4], - ["2025-06-22T18:22:56.534675", 1.4]]} + {"system": [["2025-06-22T18:59:02.811077", 1.4], + ["2025-06-22T18:59:03.845482", 1.4]]} GET limits (used for thresholds) -------------------------------- diff --git a/glances/outputs/glances_restful_api.py b/glances/outputs/glances_restful_api.py index 73594c76..8531ef20 100644 --- a/glances/outputs/glances_restful_api.py +++ b/glances/outputs/glances_restful_api.py @@ -477,6 +477,7 @@ class GlancesRestfulApi: try: # Get the RAW value of the stat ID + # TODO in #3211: use getAllExportsAsDict instead but break UI for uptime, processlist, others ? statval = self.stats.getAllAsDict() except Exception as e: raise HTTPException(status.HTTP_404_NOT_FOUND, f"Cannot get stats ({str(e)})") @@ -565,12 +566,11 @@ class GlancesRestfulApi: try: # Get the RAW value of the stat ID + # TODO in #3211: use get_export instead but break API statval = self.stats.get_plugin(plugin).get_raw() except Exception as e: raise HTTPException(status.HTTP_404_NOT_FOUND, f"Cannot get plugin {plugin} ({str(e)})") - print(statval) - if isinstance(statval, list): statval = statval[:nb] @@ -612,7 +612,7 @@ class GlancesRestfulApi: try: # Get the RAW value of the stat limits - ret = self.stats.get_plugin(plugin).limits + ret = self.stats.get_plugin(plugin).get_limits() except Exception as e: raise HTTPException(status.HTTP_404_NOT_FOUND, f"Cannot get limits for plugin {plugin} ({str(e)})") @@ -655,6 +655,7 @@ class GlancesRestfulApi: try: # Get the RAW value of the stat views + # TODO in #3211: use a non existing (to be created) get_export_item instead but break API ret = self.stats.get_plugin(plugin).get_raw_stats_item(item) except Exception as e: raise HTTPException( @@ -679,6 +680,7 @@ class GlancesRestfulApi: try: # Get the RAW value of the stat views + # TODO in #3211: use a non existing (to be created) get_export_key instead but break API ret = self.stats.get_plugin(plugin).get_raw_stats_key(item, key) except Exception as e: raise HTTPException( @@ -811,6 +813,7 @@ class GlancesRestfulApi: try: # Get the RAW value + # TODO in #3211: use a non existing (to be created) get_export_item_value instead but break API ret = self.stats.get_plugin(plugin).get_raw_stats_value(item, value) except Exception as e: raise HTTPException( diff --git a/glances/outputs/static/js/components/plugin-containers.vue b/glances/outputs/static/js/components/plugin-containers.vue index 7e3a7795..d7860cac 100644 --- a/glances/outputs/static/js/components/plugin-containers.vue +++ b/glances/outputs/static/js/components/plugin-containers.vue @@ -9,29 +9,20 @@ Pod - + @click="args.sort_processes_key = 'name'"> Name Status - + @click="args.sort_processes_key = 'cpu_percent'"> CPU% - + @click="args.sort_processes_key = 'memory_percent'"> MEM MAX @@ -44,15 +35,11 @@ {{ container.name }} - + {{ container.status }} @@ -72,11 +59,7 @@ : $filters.bytes(container.limit) }} - + {{ container.command }} @@ -89,30 +72,21 @@ Engine Pod - + @click="args.sort_processes_key = 'name'"> Name Status Uptime - + @click="args.sort_processes_key = 'cpu_percent'"> CPU% - + @click="args.sort_processes_key = 'memory_percent'"> MEM MAX @@ -130,15 +104,11 @@ {{ container.name }} - + {{ container.status }} @@ -189,11 +159,7 @@ : $filters.bits(container.network_tx) }} - + {{ container.command }} @@ -237,13 +203,17 @@ export default { const { sorter } = this; const containers = (this.stats || []) // .map((containerData) => { + // Memory usage no cache is reflected the algorithm used in Docker top let memory_usage_no_cache; - if (containerData.memory.usage != undefined) { - memory_usage_no_cache = containerData.memory.usage; - if (containerData.memory.inactive_file != undefined) { + + if (containerData.memory_usage != undefined) { + memory_usage_no_cache = containerData.memory_usage; + if (containerData.memory_inactive_file != undefined) { memory_usage_no_cache = - memory_usage_no_cache - containerData.memory.inactive_file; + memory_usage_no_cache - containerData.memory_inactive_file; } + } else { + memory_usage_no_cache = undefined; } return { diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js index db7bf798..d28bc997 100644 --- a/glances/outputs/static/public/glances.js +++ b/glances/outputs/static/public/glances.js @@ -53,4 +53,4 @@ let pp;const dp="undefined"!=typeof window&&window.trustedTypes;if(dp)try{pp=dp. * Licensed under the MIT license */ -const fd="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function hd(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function gd(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function bd(t,e){const r=e.slice(0,e.length-1);for(let e=0;e=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}const vd={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":fd?173:189,"=":fd?61:187,";":fd?59:186,"'":222,"[":219,"]":221,"\\":220},xd={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},wd={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_d={16:!1,18:!1,17:!1,91:!1},kd={};for(let t=1;t<20;t++)vd["f".concat(t)]=111+t;let Sd=[],Ad=null,Ed="all";const Cd=new Map,Td=t=>vd[t.toLowerCase()]||xd[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);function Od(t){Ed=t||"all"}function Dd(){return Ed||"all"}function Id(t){if(void 0===t)Object.keys(kd).forEach((t=>{Array.isArray(kd[t])&&kd[t].forEach((t=>Pd(t))),delete kd[t]})),Md(null);else if(Array.isArray(t))t.forEach((t=>{t.key&&Pd(t)}));else if("object"==typeof t)t.key&&Pd(t);else if("string"==typeof t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{let{key:e,scope:r,method:n,splitKey:i="+"}=t;yd(e).forEach((t=>{const e=t.split(i),o=e.length,s=e[o-1],a="*"===s?"*":Td(s);if(!kd[a])return;r||(r=Dd());const l=o>1?bd(xd,e):[],c=[];kd[a]=kd[a].filter((t=>{const e=(!n||t.method===n)&&t.scope===r&&function(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let t=0;tMd(t)))}))};function jd(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||"all"===e.scope){i=e.mods.length>0;for(const t in _d)Object.prototype.hasOwnProperty.call(_d,t)&&(!_d[t]&&e.mods.indexOf(+t)>-1||_d[t]&&-1===e.mods.indexOf(+t))&&(i=!1);(0!==e.mods.length||_d[16]||_d[18]||_d[17]||_d[91])&&!i&&"*"!==e.shortcut||(e.keys=[],e.keys=e.keys.concat(Sd),!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Nd(t,e){const r=kd["*"];let n=t.keyCode||t.which||t.charCode;if(!Ld.filter.call(this,t))return;if(93!==n&&224!==n||(n=91),-1===Sd.indexOf(n)&&229!==n&&Sd.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach((e=>{const r=wd[e];t[e]&&-1===Sd.indexOf(r)?Sd.push(r):!t[e]&&Sd.indexOf(r)>-1?Sd.splice(Sd.indexOf(r),1):"metaKey"===e&&t[e]&&(Sd=Sd.filter((t=>t in wd||t===n)))})),n in _d){_d[n]=!0;for(const t in xd)xd[t]===n&&(Ld[t]=!0);if(!r)return}for(const e in _d)Object.prototype.hasOwnProperty.call(_d,e)&&(_d[e]=t[wd[e]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===Sd.indexOf(17)&&Sd.push(17),-1===Sd.indexOf(18)&&Sd.push(18),_d[17]=!0,_d[18]=!0);const i=Dd();if(r)for(let n=0;n1&&(i=bd(xd,t)),(t="*"===(t=t[t.length-1])?"*":Td(t))in kd||(kd[t]=[]),kd[t].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:n[a],method:r,key:n[a],splitKey:u,element:s});if(void 0!==s&&window){if(!Cd.has(s)){const t=function(){return Nd(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,s)},e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;Nd(t,s),function(t){let e=t.keyCode||t.which||t.charCode;const r=Sd.indexOf(e);if(r>=0&&Sd.splice(r,1),t.key&&"meta"===t.key.toLowerCase()&&Sd.splice(0,Sd.length),93!==e&&224!==e||(e=91),e in _d){_d[e]=!1;for(const t in xd)xd[t]===e&&(Ld[t]=!1)}}(t)};Cd.set(s,{keydownListener:t,keyupListenr:e,capture:p}),hd(s,"keydown",t,p),hd(s,"keyup",e,p)}if(!Ad){const t=()=>{Sd=[]};Ad={listener:t,capture:p},hd(window,"focus",t,p)}}}function Md(t){const e=Object.values(kd).flat();if(e.findIndex((e=>{let{element:r}=e;return r===t}))<0){const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))}if(e.length<=0||Cd.size<=0){if(Object.keys(Cd).forEach((t=>{const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))})),Cd.clear(),Object.keys(kd).forEach((t=>delete kd[t])),Ad){const{listener:t,capture:e}=Ad;gd(window,"focus",t,e),Ad=null}}}const Rd={getPressedKeyString:function(){return Sd.map((t=>{return e=t,Object.keys(vd).find((t=>vd[t]===e))||(t=>Object.keys(xd).find((e=>xd[e]===t)))(t)||String.fromCharCode(t);var e}))},setScope:Od,getScope:Dd,deleteScope:function(t,e){let r,n;t||(t=Dd());for(const e in kd)if(Object.prototype.hasOwnProperty.call(kd,e))for(r=kd[e],n=0;n{let{element:e}=t;return Md(e)}))}else n++;Dd()===t&&Od(e||"all")},getPressedKeyCodes:function(){return Sd.slice(0)},getAllKeyCodes:function(){const t=[];return Object.keys(kd).forEach((e=>{kd[e].forEach((e=>{let{key:r,scope:n,mods:i,shortcut:o}=e;t.push({scope:n,shortcut:o,mods:i,keys:r.split("+").map((t=>Td(t)))})}))})),t},isPressed:function(t){return"string"==typeof t&&(t=Td(t)),-1!==Sd.indexOf(t)},filter:function(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i="INPUT"===r&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||"TEXTAREA"===r||"SELECT"===r)&&!e.readOnly)&&(n=!1),n},trigger:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(kd).forEach((r=>{kd[r].filter((r=>r.scope===e&&r.shortcut===t)).forEach((t=>{t&&t.method&&t.method()}))}))},unbind:Id,keyMap:vd,modifier:xd,modifierMap:wd};for(const t in Rd)Object.prototype.hasOwnProperty.call(Rd,t)&&(Ld[t]=Rd[t]);if("undefined"!=typeof window){const t=window.hotkeys;Ld.noConflict=e=>(e&&window.hotkeys===Ld&&(window.hotkeys=t),Ld),window.hotkeys=Ld}const qd=Ra({args:void 0,config:void 0,data:void 0,status:"IDLE"});var Bd=r(4644),$d=r.n(Bd);const Ud=new class{limits={};limitSuffix=["critical","careful","warning"];setLimits(t){this.limits=t}getLimit(t,e){return null!=this.limits[t]&&null!=this.limits[t][e]?this.limits[t][e]:null}getAlert(t,e,r,n,i){var o=(i=i||!1)?"_log":"",s=100*(r=r||0)/(n=n||100);if(null!=this.limits[t])for(var a=0;a=this.limits[t][l]){var c=l.lastIndexOf("_");return l.substring(c+1)+o}}return"ok"+o}getAlertLog(t,e,r,n){return this.getAlert(t,e,r,n,!0)}};const Fd=new class{data=void 0;init(t=60){let e;const r=()=>(qd.status="PENDING",Promise.all([fetch("api/4/all",{method:"GET"}).then((t=>t.json())),fetch("api/4/all/views",{method:"GET"}).then((t=>t.json()))]).then((t=>{const e={stats:t[0],views:t[1],isBsd:"FreeBSD"===t[0].system.os_name,isLinux:"Linux"===t[0].system.os_name,isSunOS:"SunOS"===t[0].system.os_name,isMac:"Darwin"===t[0].system.os_name,isWindows:"Windows"===t[0].system.os_name};this.data=e,qd.data=e,qd.status="SUCCESS"})).catch((t=>{console.log(t),qd.status="FAILURE"})).then((()=>{e&&clearTimeout(e),e=setTimeout(r,1e3*t)})));r(),fetch("api/4/all/limits",{method:"GET"}).then((t=>t.json())).then((t=>{Ud.setLimits(t)})),fetch("api/4/args",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.args={...qd.args,...t}})),fetch("api/4/config",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.config={...qd.config,...t}}))}getData(){return this.data}};const zd=new class{constructor(){this.favico=new($d())({animation:"none"})}badge(t){this.favico.badge(t)}reset(){this.favico.reset()}},Hd={key:0},Vd={class:"container-fluid"},Gd={class:"row"},Wd={class:"col-sm-12 col-lg-24 title"},Kd={class:"row"},Xd={class:"col-sm-12 col-lg-24"},Qd={class:"table table-sm table-borderless table-striped table-hover"};const Zd={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((t=>t.json())).then((t=>this.help=t))}};var Yd=r(6262);const Jd=(0,Yd.A)(Zd,[["render",function(t,e,r,n,i,o){return i.help?(xu(),Au("div",Hd,[Iu("div",Vd,[Iu("div",Gd,[Iu("div",Wd,As(i.help.version)+" "+As(i.help.psutil_version),1)]),e[0]||(e[0]=Iu("div",{class:"row"}," ",-1)),Iu("div",Kd,[Iu("div",Xd,As(i.help.configuration_file),1)]),e[1]||(e[1]=Iu("div",{class:"row"}," ",-1))]),Iu("table",Qd,[Iu("thead",null,[Iu("tr",null,[Iu("th",null,As(i.help.header_sort.replace(":","")),1),Iu("th",null,As(i.help.header_show_hide.replace(":","")),1),Iu("th",null,As(i.help.header_toggle.replace(":","")),1),Iu("th",null,As(i.help.header_miscellaneous.replace(":","")),1)])]),Iu("tbody",null,[Iu("tr",null,[Iu("td",null,As(i.help.sort_auto),1),Iu("td",null,As(i.help.show_hide_application_monitoring),1),Iu("td",null,As(i.help.toggle_bits_bytes),1),Iu("td",null,As(i.help.misc_erase_process_filter),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu),1),Iu("td",null,As(i.help.show_hide_diskio),1),Iu("td",null,As(i.help.toggle_count_rate),1),Iu("td",null,As(i.help.misc_generate_history_graphs),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_io_rate),1),Iu("td",null,As(i.help.show_hide_containers),1),Iu("td",null,As(i.help.toggle_used_free),1),Iu("td",null,As(i.help.misc_help),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_mem),1),Iu("td",null,As(i.help.show_hide_top_extended_stats),1),Iu("td",null,As(i.help.toggle_bar_sparkline),1),Iu("td",null,As(i.help.misc_accumulate_processes_by_program),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_process_name),1),Iu("td",null,As(i.help.show_hide_filesystem),1),Iu("td",null,As(i.help.toggle_separate_combined),1),e[2]||(e[2]=Iu("td",null," ",-1))]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu_times),1),Iu("td",null,As(i.help.show_hide_gpu),1),Iu("td",null,As(i.help.toggle_live_cumulative),1),Iu("td",null,As(i.help.misc_reset_processes_summary_min_max),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_user),1),Iu("td",null,As(i.help.show_hide_ip),1),Iu("td",null,As(i.help.toggle_linux_percentage),1),Iu("td",null,As(i.help.misc_quit),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_tcp_connection),1),Iu("td",null,As(i.help.toggle_cpu_individual_combined),1),Iu("td",null,As(i.help.misc_reset_history),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_alert),1),Iu("td",null,As(i.help.toggle_gpu_individual_combined),1),Iu("td",null,As(i.help.misc_delete_warning_alerts),1)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_network),1),Iu("td",null,As(i.help.toggle_short_full),1),Iu("td",null,As(i.help.misc_delete_warning_and_critical_alerts),1)]),Iu("tr",null,[e[6]||(e[6]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.sort_cpu_times),1),e[7]||(e[7]=Iu("td",null," ",-1)),e[8]||(e[8]=Iu("td",null," ",-1))]),Iu("tr",null,[e[9]||(e[9]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_irq),1),e[10]||(e[10]=Iu("td",null," ",-1)),e[11]||(e[11]=Iu("td",null," ",-1))]),Iu("tr",null,[e[12]||(e[12]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_raid_plugin),1),e[13]||(e[13]=Iu("td",null," ",-1)),e[14]||(e[14]=Iu("td",null," ",-1))]),Iu("tr",null,[e[15]||(e[15]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_sensors),1),e[16]||(e[16]=Iu("td",null," ",-1)),e[17]||(e[17]=Iu("td",null," ",-1))]),Iu("tr",null,[e[18]||(e[18]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_wifi_module),1),e[19]||(e[19]=Iu("td",null," ",-1)),e[20]||(e[20]=Iu("td",null," ",-1))]),Iu("tr",null,[e[21]||(e[21]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_processes),1),e[22]||(e[22]=Iu("td",null," ",-1)),e[23]||(e[23]=Iu("td",null," ",-1))]),Iu("tr",null,[e[24]||(e[24]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_left_sidebar),1),e[25]||(e[25]=Iu("td",null," ",-1)),e[26]||(e[26]=Iu("td",null," ",-1))]),Iu("tr",null,[e[27]||(e[27]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_quick_look),1),e[28]||(e[28]=Iu("td",null," ",-1)),e[29]||(e[29]=Iu("td",null," ",-1))]),Iu("tr",null,[e[30]||(e[30]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_cpu_mem_swap),1),e[31]||(e[31]=Iu("td",null," ",-1)),e[32]||(e[32]=Iu("td",null," ",-1))]),Iu("tr",null,[e[33]||(e[33]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_all),1),e[34]||(e[34]=Iu("td",null," ",-1)),e[35]||(e[35]=Iu("td",null," ",-1))])])]),e[36]||(e[36]=Mu('
 

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

',5))])):Ru("v-if",!0)}]]),tm={id:"alerts",class:"plugin"},em={key:0,class:"title"},rm={key:1,class:"title"},nm={class:"table table-sm table-borderless"},im={scope:"row"},om={scope:"row"},sm={scope:"row"};var am=r(2543);const lm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.alert},alerts(){return(this.stats||[]).map((t=>{const e={};if(e.state=t.state,e.type=t.type,e.begin=1e3*t.begin,e.end=1e3*t.end,e.ongoing=-1==t.end,e.min=t.min,e.avg=t.avg,e.max=t.max,t.top.length>0&&(e.top=": "+t.top.join(", ")),!e.ongoing){const t=e.end-e.begin,r=parseInt(t/1e3%60),n=parseInt(t/6e4%60),i=parseInt(t/36e5%24);e.duration=(0,am.padStart)(i,2,"0")+":"+(0,am.padStart)(n,2,"0")+":"+(0,am.padStart)(r,2,"0")}return e}))},hasAlerts(){return this.countAlerts>0},countAlerts(){return this.alerts.length},hasOngoingAlerts(){return this.countOngoingAlerts>0},countOngoingAlerts(){return this.alerts.filter((({ongoing:t})=>t)).length}},watch:{countOngoingAlerts(){this.countOngoingAlerts?zd.badge(this.countOngoingAlerts):zd.reset()}},methods:{formatDate(t){const e=(new Date).getTimezoneOffset(),r=Math.trunc(Math.abs(e)/60),n=Math.abs(e%60);let i=e<=0?"+":"-";i+=String(r).padStart(2,"0")+String(n).padStart(2,"0");const o=new Date(t);return String(o.getFullYear())+"-"+String(o.getMonth()+1).padStart(2,"0")+"-"+String(o.getDate()).padStart(2,"0")+" "+String(o.getHours()).padStart(2,"0")+":"+String(o.getMinutes()).padStart(2,"0")+":"+String(o.getSeconds()).padStart(2,"0")+"("+i+")"},clear(){fetch("api/4/events/clear/all",{method:"POST",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>product.value=t))}}},cm=(0,Yd.A)(lm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",tm,[o.hasAlerts?(xu(),Au("span",em,[Lu(" Warning or critical alerts (last "+As(o.countAlerts)+" entries) ",1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(xu(),Au("span",rm,"No warning or critical alert detected")),Iu("table",nm,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.alerts,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",im,[Iu("span",null,As(o.formatDate(e.begin)),1)]),Iu("td",om,[Iu("span",null,"("+As(e.ongoing?"ongoing":e.duration)+")",1)]),Iu("td",sm,[Al(Iu("span",null,As(e.state)+" on ",513),[[xp,!e.ongoing]]),Iu("span",{class:xs(e.state.toLowerCase())},As(e.type),3),Iu("span",null,"("+As(t.$filters.number(e.max,1))+")",1),Iu("span",null,As(e.top),1)])])))),128))])])])}]]),um={key:0,id:"cloud",class:"plugin"},pm={class:"title"};const dm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cloud},provider(){return void 0!==this.stats.id?`${stats.platform}`:null},instance(){const{stats:t}=this;return void 0!==this.stats.id?`${t.type} instance ${t.name} (${t.region})`:null}}},mm=(0,Yd.A)(dm,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(xu(),Au("section",um,[Iu("span",pm,As(o.provider),1),Lu(" "+As(o.instance),1)])):Ru("v-if",!0)}]]),fm={id:"connections",class:"plugin"},hm={class:"table table-sm table-borderless margin-bottom"},gm={class:"text-end"},bm={class:"text-end"},ym={class:"text-end"},vm={class:"text-end"};const xm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.connections},view(){return this.data.views.connections},listen(){return this.stats.LISTEN},initiated(){return this.stats.initiated},established(){return this.stats.ESTABLISHED},terminated(){return this.stats.terminated},tracked(){return{count:this.stats.nf_conntrack_count,max:this.stats.nf_conntrack_max}}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},wm=(0,Yd.A)(xm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",fm,[Iu("table",hm,[e[5]||(e[5]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"TCP CONNECTIONS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("td",{scope:"row"},"Listen",-1)),Iu("td",gm,As(o.listen),1)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"Initiated",-1)),Iu("td",bm,As(o.initiated),1)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"Established",-1)),Iu("td",ym,As(o.established),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"Terminated",-1)),Iu("td",vm,As(o.terminated),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"Tracked",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("nf_conntrack_percent")])},As(o.tracked.count)+"/"+As(o.tracked.max),3)])])])])}]]),_m={id:"cpu",class:"plugin"},km={class:"table-responsive"},Sm={class:"table-sm table-borderless"},Am={class:"justify-content-between"},Em={scope:"col"},Cm={class:"table table-sm table-borderless"},Tm={key:0,scope:"col"},Om={class:"d-none d-xl-block d-xxl-block"},Dm={class:"table table-sm table-borderless"},Im={scope:"col"},Pm={scope:"col",class:"text-end"},jm={scope:"col"},Nm={scope:"col",class:"text-end"},Lm={scope:"col"},Mm={scope:"col",class:"text-end"},Rm={key:0,scope:"col"},qm={scope:"col"},Bm={class:"d-none d-xxl-block"},$m={class:"table table-sm table-borderless"},Um={key:0,scope:"col"},Fm={scope:"col"},zm={scope:"col",class:"text-end"},Hm={key:0,scope:"col"},Vm={key:1,scope:"col",class:"text-end"},Gm={key:0,scope:"col"},Wm={key:1,scope:"col",class:"text-end"};const Km={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cpu},view(){return this.data.views.cpu},isLinux(){return this.data.isLinux},isSunOS(){return this.data.isSunOS},isWindows(){return this.data.isWindows},total(){return this.stats.total},user(){return this.stats.user},system(){return this.stats.system},idle(){return this.stats.idle},nice(){return this.stats.nice},irq(){return this.stats.irq},iowait(){return this.stats.iowait},dpc(){return this.stats.dpc},steal(){return this.stats.steal},guest(){return this.stats.guest},ctx_switches(){const{stats:t}=this;return t.ctx_switches?Math.floor(t.ctx_switches/t.time_since_update):null},interrupts(){const{stats:t}=this;return t.interrupts?Math.floor(t.interrupts/t.time_since_update):null},soft_interrupts(){const{stats:t}=this;return t.soft_interrupts?Math.floor(t.soft_interrupts/t.time_since_update):null},syscalls(){const{stats:t}=this;return t.syscalls?Math.floor(t.syscalls/t.time_since_update):null}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Xm=(0,Yd.A)(Km,[["render",function(t,e,r,n,i,o){return xu(),Au("section",_m,[Ru(" d-none d-xxl-block "),Iu("div",km,[Iu("table",Sm,[Iu("tbody",null,[Iu("tr",Am,[Iu("td",Em,[Iu("table",Cm,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"CPU",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("total")])},[Iu("span",null,As(o.total)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"col"},"user:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("user")])},[Iu("span",null,As(o.user)+"%",1)],2)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"col"},"system:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("system")])},[Iu("span",null,As(o.system)+"%",1)],2)]),Iu("tr",null,[null!=o.iowait?(xu(),Au("td",Tm,"iowait:")):Ru("v-if",!0),null!=o.iowait?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("iowait")])},[Iu("span",null,As(o.iowait)+"%",1)],2)):Ru("v-if",!0)])])])]),Iu("td",null,[Iu("template",Om,[Iu("table",Dm,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",Im,"idle:",512),[[xp,null!=o.idle]]),Al(Iu("td",Pm,[Iu("span",null,As(o.idle)+"%",1)],512),[[xp,null!=o.idle]])]),Iu("tr",null,[Al(Iu("td",jm,"irq:",512),[[xp,null!=o.irq]]),Al(Iu("td",Nm,[Iu("span",null,As(o.irq)+"%",1)],512),[[xp,null!=o.irq]])]),Iu("tr",null,[Al(Iu("td",Lm,"nice:",512),[[xp,null!=o.nice]]),Al(Iu("td",Mm,[Iu("span",null,As(o.nice)+"%",1)],512),[[xp,null!=o.nice]])]),Iu("tr",null,[null==o.iowait&&null!=o.dpc?(xu(),Au("td",Rm,"dpc:")):Ru("v-if",!0),null==o.iowait&&null!=o.dpc?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("dpc")])},[Iu("span",null,As(o.dpc)+"%",1)],2)):Ru("v-if",!0),Al(Iu("td",qm,"steal:",512),[[xp,null!=o.steal]]),Al(Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("steal")])},[Iu("span",null,As(o.steal)+"%",1)],2),[[xp,null!=o.steal]])])])])])]),Iu("td",null,[Iu("template",Bm,[Iu("table",$m,[Iu("tbody",null,[Iu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",Um," ctx_sw:")):Ru("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("ctx_switches")])},[Iu("span",null,As(o.ctx_switches),1)],2)):Ru("v-if",!0)]),Iu("tr",null,[Al(Iu("td",Fm,"inter:",512),[[xp,null!=o.interrupts]]),Al(Iu("td",zm,[Iu("span",null,As(o.interrupts),1)],512),[[xp,null!=o.interrupts]])]),Iu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Hm,"sw_int: ")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Vm,[Iu("span",null,As(o.soft_interrupts),1)]))]),Iu("tr",null,[o.isLinux&&null!=o.guest?(xu(),Au("td",Gm,"guest:")):Ru("v-if",!0),o.isLinux&&null!=o.guest?(xu(),Au("td",Wm,[Iu("span",null,As(o.guest)+"%",1)])):Ru("v-if",!0)])])])])])])])])])])}]]),Qm={key:0,id:"diskio",class:"plugin"},Zm={class:"table table-sm table-borderless margin-bottom"},Ym={scope:"col",class:"text-end w-25"},Jm={scope:"col",class:"text-end w-25"},tf={scope:"col",class:"text-end w-25"},ef={scope:"col",class:"text-end w-25"},rf={scope:"row",class:"text-truncate"};var nf=r(4728),of=r.n(nf);function sf(t,e){return af(t=8*Math.round(t),e)+"b"}function af(t,e){if(e=e||!1,isNaN(parseFloat(t))||!isFinite(t)||0==t)return t;const r=["Y","Z","E","P","T","G","M","K"],n={Y:12089258196146292e8,Z:11805916207174113e5,E:0x1000000000000000,P:0x4000000000000,T:1099511627776,G:1073741824,M:1048576,K:1024};for(var i=0;i1){var a=0;return s<10?a=2:s<100&&(a=1),e?a="MK"==o?0:(0,am.min)([1,a]):"K"==o&&(a=0),parseFloat(s).toFixed(a)+o}}return t.toFixed(0)}function lf(t){return void 0===t||""===t?"?":t}function cf(t,e,r){return e=e||0,r=r||" ",String(t).padStart(e,r)}function uf(t,e){return"function"!=typeof t.slice&&(t=String(t)),t.slice(0,e)}function pf(t,e,r=!0){return e=e||8,t.length>e?r?t.substring(0,e-1)+"_":"_"+t.substring(t.length-e+1):t}function df(t){if(void 0===t)return t;var e=function(t){var e=document.createElement("div");return e.innerText=t,e.innerHTML}(t),r=e.replace(/\n/g,"
");return of()(r)}function mf(t,e){return void 0===t||isNaN(t)?"-":new Intl.NumberFormat("en-US","number"==typeof e?{maximumFractionDigits:e}:e).format(t)}function ff(t){for(var e=0,r=0;r`${t}: ${e}`)).join(" / ")}const bf={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.diskio},view(){return this.data.views.diskio},disks(){const t=this.stats.map((t=>({name:t.disk_name,alias:void 0!==t.alias?t.alias:null,bitrate:{txps:af(t.read_bytes_rate_per_sec),rxps:af(t.write_bytes_rate_per_sec)},count:{txps:af(t.read_count_rate_per_sec),rxps:af(t.write_count_rate_per_sec)}}))).filter((t=>{const e=this.view[t.name].read_bytes_rate_per_sec,r=this.view[t.name].write_bytes_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,am.orderBy)(t,["name"])},hasDisks(){return this.disks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},yf=(0,Yd.A)(bf,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",Qm,[Iu("table",Zm,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"DISK I/O",-1)),Al(Iu("th",Ym,"Rps",512),[[xp,!o.args.diskio_iops]]),Al(Iu("th",Jm,"Wps",512),[[xp,!o.args.diskio_iops]]),Al(Iu("th",tf,"IORps",512),[[xp,o.args.diskio_iops]]),Al(Iu("th",ef,"IOWps",512),[[xp,o.args.diskio_iops]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",rf,As(t.$filters.minSize(e.alias?e.alias:e.name,16)),1),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"write_bytes_rate_per_sec")])},As(e.bitrate.txps),3),[[xp,!o.args.diskio_iops]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"read_bytes_rate_per_sec")])},As(e.bitrate.rxps),3),[[xp,!o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.txps),513),[[xp,o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.rxps),513),[[xp,o.args.diskio_iops]])])))),128))])])])):Ru("v-if",!0)}]]),vf={key:0,id:"containers",class:"plugin"},xf={class:"table-responsive d-md-none"},wf={class:"table table-sm table-borderless table-striped table-hover"},_f={scope:"col"},kf={scope:"col"},Sf={scope:"col"},Af={scope:"col"},Ef={class:"table-responsive d-none d-md-block"},Cf={class:"table table-sm table-borderless table-striped table-hover"},Tf={scope:"col"},Of={scope:"col"},Df={scope:"col"},If={scope:"col"},Pf={scope:"col"},jf={scope:"col"},Nf={scope:"col"},Lf={scope:"col"},Mf={scope:"col"},Rf={scope:"col"};const qf={props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.containers},views(){return this.data.views.containers},containers(){const{sorter:t}=this,e=(this.stats||[]).map((t=>{let e;return null!=t.memory.usage&&(e=t.memory.usage,null!=t.memory.inactive_file&&(e-=t.memory.inactive_file)),{id:t.id,name:t.name,status:t.status,uptime:t.uptime,cpu_percent:t.cpu.total,memory_usage:e,limit:t.memory.limit,io_rx:t.io_rx,io_wx:t.io_wx,network_rx:t.network_rx,network_tx:t.network_tx,command:t.command,image:t.image,engine:t.engine,pod_id:t.pod_id}}));return(0,am.orderBy)(e,[t.column].map((t=>e=>e["memory_percent"===t?"memory_usage":t]??-1/0),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name},showPod(){return this.views.show_pod_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{io_counters:"disk IO",cpu_percent:"CPU consumption",memory_usage:"memory consumption",cpu_times:"uptime",name:"container name",None:"None"}[t]||t}})}}},methods:{getDisableStats:()=>Ud.getLimit("containers","containers_disable_stats")||[]}},Bf=(0,Yd.A)(qf,[["render",function(t,e,r,n,i,o){return o.containers.length?(xu(),Au("section",vf,[e[6]||(e[6]=Iu("span",{class:"title"},"CONTAINERS",-1)),Al(Iu("span",null,As(o.containers.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.containers.length>1]]),Iu("div",xf,[Iu("table",wf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",_f,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",kf,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Sf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Af,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs(["Paused"===e.status&&"careful","exited"===e.status&&"warning",!["Paused","exited"].includes(e.status)&&"ok"])},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.memory_usage??NaN)?"-":t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.limit??NaN)?"-":t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])]),Iu("div",Ef,[Iu("table",Cf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",Tf,"Engine",512),[[xp,o.showEngine]]),Al(Iu("td",Of,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",Df,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",If,"Uptime",512),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[4]||(e[4]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[5]||(e[5]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Pf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",jf,"IORps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Nf,"IOWps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Lf,"RXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Mf,"TXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Rf,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.engine),513),[[xp,o.showEngine]]),Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs(["Paused"===e.status&&"careful","exited"===e.status&&"warning",!["Paused","exited"].includes(e.status)&&"ok"])},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(e.uptime),513),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.memory_usage??NaN)?"-":t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.limit??NaN)?"-":t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.io_rx??NaN)?"-":t.$filters.bytes(e.io_rx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.io_wx??NaN)?"-":t.$filters.bytes(e.io_wx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.network_rx??NaN)?"-":t.$filters.bits(e.network_rx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.network_tx??NaN)?"-":t.$filters.bits(e.network_tx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])])])):Ru("v-if",!0)}]]),$f={key:0,id:"folders",class:"plugin"},Uf={class:"table table-sm table-borderless margin-bottom"},Ff={scope:"row"},zf={key:0,class:"visible-lg-inline"};const Hf={props:{data:{type:Object}},computed:{stats(){return this.data.stats.folders},folders(){return this.stats.map((t=>({path:t.path,size:t.size,errno:t.errno,careful:t.careful,warning:t.warning,critical:t.critical})))},hasFolders(){return this.folders.length>0}},methods:{getDecoration:t=>t.errno>0?"error":null!==t.critical&&t.size>1e6*t.critical?"critical":null!==t.warning&&t.size>1e6*t.warning?"warning":null!==t.careful&&t.size>1e6*t.careful?"careful":"ok"}},Vf=(0,Yd.A)(Hf,[["render",function(t,e,r,n,i,o){return o.hasFolders?(xu(),Au("section",$f,[Iu("table",Uf,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"FOLDERS"),Iu("th",{scope:"col",class:"text-end"},"Size")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.folders,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Ff,As(e.path),1),Iu("td",{class:xs(["text-end",o.getDecoration(e)])},[e.errno>0?(xu(),Au("span",zf,"?")):Ru("v-if",!0),Lu(" "+As(t.$filters.bytes(e.size)),1)],2)])))),128))])])])):Ru("v-if",!0)}]]),Gf={key:0,id:"fs",class:"plugin"},Wf={class:"table table-sm table-borderless margin-bottom"},Kf={key:0,scope:"col",class:"text-end w-25"},Xf={key:1,scope:"col",class:"text-end w-25"},Qf={scope:"row"},Zf={key:0,class:"visible-lg-inline"},Yf={scope:"row",class:"text-end"};const Jf={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.fs},view(){return this.data.views.fs},fileSystems(){const t=this.stats.map((t=>({name:t.device_name,mountPoint:t.mnt_point,percent:t.percent,size:t.size,used:t.used,free:t.free,alias:void 0!==t.alias?t.alias:null})));return(0,am.orderBy)(t,["mnt_point"])},hasFs(){return this.fileSystems.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},th=(0,Yd.A)(Jf,[["render",function(t,e,r,n,i,o){return o.hasFs?(xu(),Au("section",Gf,[Iu("table",Wf,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"FILE SYSTEM",-1)),o.args.fs_free_space?(xu(),Au("th",Xf,"Free")):(xu(),Au("th",Kf,"Used")),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end w-25"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.fileSystems,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Qf,[Lu(As(t.$filters.minSize(e.alias?e.alias:e.mountPoint,16,t.begin=!1))+" ",1),(e.alias?e.alias:e.mountPoint).length+e.name.length<=15?(xu(),Au("span",Zf," ("+As(e.name)+") ",1)):Ru("v-if",!0)]),o.args.fs_free_space?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.free)),3)):(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.used)),3)),Iu("td",Yf,As(t.$filters.bytes(e.size)),1)])))),128))])])])):Ru("v-if",!0)}]]),eh={key:0,id:"gpu",class:"plugin"},rh={class:"title text-truncate"},nh={key:0,class:"table-responsive"},ih={key:1,class:"col text-end"},oh={key:1,class:"col text-end"},sh={key:1,class:"col text-end"},ah={key:1,class:"table-responsive"},lh={class:"table table-sm table-borderless"},ch={class:"col"},uh={key:1,class:"col"},ph={key:3,class:"col text-end"},dh={key:2,class:"table-responsive"},mh={class:"table table-sm table-borderless"},fh={key:1,class:"col"},hh={key:1,class:"col"},gh={key:1,class:"col"};const bh={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.gpu},view(){return this.data.views.gpu},gpus(){return this.stats},name(){let t="GPU";const{stats:e}=this;return 1===e.length?t=e[0].name:e.length&&(t=`${e.length} GPU ${e[0].name}`),t},mean(){const t={proc:null,mem:null,temperature:null},{stats:e}=this;if(!e.length)return t;for(const r of e)t.proc+=r.proc,t.mem+=r.mem,t.temperature+=r.temperature;return t.proc=t.proc/e.length,t.mem=t.mem/e.length,t.temperature=t.temperature/e.length,t}},methods:{getDecoration(t,e){if(void 0!==this.view[t][e])return this.view[t][e].decoration.toLowerCase()},getMeanDecoration:t=>"DEFAULT"}},yh=(0,Yd.A)(bh,[["render",function(t,e,r,n,i,o){return null!=o.gpus?(xu(),Au("section",eh,[Iu("div",rh,As(o.name),1),Ru(" single gpu "),1===o.gpus.length?(xu(),Au("div",nh,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("table",{key:n,class:"table table-sm table-borderless"},[Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{class:"col"},"proc:",-1)),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",ih,e[0]||(e[0]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"%",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",oh,e[2]||(e[2]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",{class:"col"},"temp:",-1)),null!=r.temperature?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"temperature")])},[Iu("span",null,As(t.$filters.number(r.temperature,0)),1)],2)):Ru("v-if",!0),null==r.temperature?(xu(),Au("td",sh,e[4]||(e[4]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])))),128))])):Ru("v-if",!0),Ru(" multiple gpus - one line per gpu (no mean) "),!o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",ah,[Iu("table",lh,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("tr",{key:n},[Iu("td",ch,As(r.gpu_id)+":",1),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",uh,e[6]||(e[6]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0),e[8]||(e[8]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:2,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"% ",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",ph,e[7]||(e[7]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0),Ru(" multiple gpus - mean "),o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",dh,[Iu("table",mh,[Iu("tbody",null,[Iu("tr",null,[e[10]||(e[10]=Iu("td",{class:"col"},"proc mean:",-1)),null!=o.mean.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("proc")])},[Iu("span",null,As(t.$filters.number(o.mean.proc,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.proc?(xu(),Au("td",fh,e[9]||(e[9]=[Iu("span",null,"N/A",-1),Lu(">")]))):Ru("v-if",!0)]),Iu("tr",null,[e[12]||(e[12]=Iu("td",{class:"col"},"mem mean:",-1)),null!=o.mean.mem?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("mem")])},[Iu("span",null,As(t.$filters.number(o.mean.mem,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.mem?(xu(),Au("td",hh,e[11]||(e[11]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[14]||(e[14]=Iu("td",{class:"col"},"temp mean:",-1)),null!=o.mean.temperature?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("temperature")])},[Iu("span",null,As(t.$filters.number(o.mean.temperature,0))+"°C",1)],2)):Ru("v-if",!0),null==o.mean.temperature?(xu(),Au("td",gh,e[13]||(e[13]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])])):Ru("v-if",!0)])):Ru("v-if",!0)}]]),vh={id:"system",class:"plugin"},xh={key:0,class:"critical"},wh={class:"title"};const _h={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},isDisconnected(){return"FAILURE"===this.store.status}}},kh=(0,Yd.A)(_h,[["render",function(t,e,r,n,i,o){return xu(),Au("section",vh,[o.isDisconnected?(xu(),Au("span",xh,"Disconnected from")):Ru("v-if",!0),Iu("span",wh,As(o.hostname),1)])}]]),Sh={key:0,id:"ip",class:"plugin"},Ah={key:0,class:"title"},Eh={key:1},Ch={key:2,class:"title"},Th={key:3},Oh={key:4,class:"text-truncate"};const Dh={props:{data:{type:Object}},computed:{ipStats(){return this.data.stats.ip},address(){return this.ipStats.address},gateway(){return this.ipStats.gateway},maskCdir(){return this.ipStats.mask_cidr},publicAddress(){return this.ipStats.public_address},publicInfo(){return this.ipStats.public_info_human}}},Ih=(0,Yd.A)(Dh,[["render",function(t,e,r,n,i,o){return o.address?(xu(),Au("section",Sh,[o.address?(xu(),Au("span",Ah,"IP")):Ru("v-if",!0),o.address?(xu(),Au("span",Eh,As(o.address)+"/"+As(o.maskCdir),1)):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Ch,"Pub")):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Th,As(o.publicAddress),1)):Ru("v-if",!0),o.publicInfo?(xu(),Au("span",Oh,As(o.publicInfo),1)):Ru("v-if",!0)])):Ru("v-if",!0)}]]),Ph={id:"irq",class:"plugin"},jh={class:"table table-sm table-borderless margin-bottom"},Nh={scope:"row"},Lh={scope:"row",class:"text-end"};const Mh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.irq},irqs(){return this.stats.map((t=>({irq_line:t.irq_line,irq_rate:t.irq_rate})))}}},Rh=(0,Yd.A)(Mh,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Ph,[Iu("table",jh,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"IRQ"),Iu("th",{scope:"col",class:"text-end"},"Rate/s")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.irqs,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Nh,As(t.irq_line),1),Iu("td",Lh,As(t.irq_rate),1)])))),128))])])])}]]),qh={key:0,id:"load",class:"plugin"},Bh={class:"table-responsive"},$h={class:"table table-sm table-borderless"},Uh={scope:"col",class:"text-end"},Fh={class:"text-end"};const zh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.load},view(){return this.data.views.load},cpucore(){return this.stats.cpucore},min1(){return this.stats.min1},min5(){return this.stats.min5},min15(){return this.stats.min15}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Hh=(0,Yd.A)(zh,[["render",function(t,e,r,n,i,o){return null!=o.cpucore?(xu(),Au("section",qh,[Iu("div",Bh,[Iu("table",$h,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"LOAD",-1)),Iu("td",Uh,As(o.cpucore)+"-core",1)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"1 min:",-1)),Iu("td",Fh,[Iu("span",null,As(t.$filters.number(o.min1,2)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"5 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min5")])},[Iu("span",null,As(t.$filters.number(o.min5,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"15 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min15")])},[Iu("span",null,As(t.$filters.number(o.min15,2)),1)],2)])])])])])):Ru("v-if",!0)}]]),Vh={id:"mem",class:"plugin"},Gh={class:"table-responsive"},Wh={class:"table-sm table-borderless"},Kh={class:"justify-content-between"},Xh={scope:"col"},Qh={class:"table table-sm table-borderless"},Zh={class:"text-end"},Yh={class:"d-none d-xl-block d-xxl-block"},Jh={class:"table table-sm table-borderless"},tg={scope:"col"},eg={scope:"col"},rg={scope:"col"},ng={scope:"col"},ig={scope:"col"},og={scope:"col"},sg={scope:"col"},ag={scope:"col"};const lg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.mem},view(){return this.data.views.mem},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free},active(){return this.stats.active},inactive(){return this.stats.inactive},buffers(){return this.stats.buffers},cached(){return this.stats.cached}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},cg=(0,Yd.A)(lg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Vh,[Ru(" d-none d-xxl-block "),Iu("div",Gh,[Iu("table",Wh,[Iu("tbody",null,[Iu("tr",Kh,[Iu("td",Xh,[Iu("table",Qh,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"MEM",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",Zh,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("free")])},[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)],2)])])])]),Iu("td",null,[Iu("template",Yh,[Iu("table",Jh,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",tg," active: ",512),[[xp,null!=o.active]]),Al(Iu("td",eg,[Iu("span",null,As(t.$filters.bytes(o.active)),1)],512),[[xp,null!=o.active]])]),Iu("tr",null,[Al(Iu("td",rg," inactive: ",512),[[xp,null!=o.inactive]]),Al(Iu("td",ng,[Iu("span",null,As(t.$filters.bytes(o.inactive)),1)],512),[[xp,null!=o.inactive]])]),Iu("tr",null,[Al(Iu("td",ig," buffers: ",512),[[xp,null!=o.buffers]]),Al(Iu("td",og,[Iu("span",null,As(t.$filters.bytes(o.buffers)),1)],512),[[xp,null!=o.buffers]])]),Iu("tr",null,[Al(Iu("td",sg," cached: ",512),[[xp,null!=o.cached]]),Al(Iu("td",ag,[Iu("span",null,As(t.$filters.bytes(o.cached)),1)],512),[[xp,null!=o.cached]])])])])])])])])])])])}]]),ug={id:"memswap",class:"plugin"},pg={class:"table-responsive"},dg={class:"table table-sm table-borderless"},mg={class:"text-end"},fg={class:"text-end"};const hg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.memswap},view(){return this.data.views.memswap},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},gg=(0,Yd.A)(hg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",ug,[Iu("div",pg,[Iu("table",dg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"SWAP",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",mg,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",fg,[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)])])])])])])}]]),bg={key:0,id:"network",class:"plugin"},yg={class:"table table-sm table-borderless margin-bottom"},vg={scope:"col",class:"text-end w-25"},xg={scope:"col",class:"text-end w-25"},wg={scope:"col",class:"text-end w-25"},_g={scope:"col",class:"text-end w-25"},kg={scope:"col",class:"text-end w-25"},Sg={scope:"col",class:"text-end w-25"},Ag={scope:"col",class:"text-end w-25"},Eg={scope:"col",class:"text-end w-25"},Cg={scope:"row",class:"visible-lg-inline text-truncate"},Tg={class:"text-end"},Og={class:"text-end"};const Dg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.network},view(){return this.data.views.network},networks(){const t=this.stats.map((t=>{const e=void 0!==t.alias?t.alias:null;return{interfaceName:t.interface_name,ifname:e||t.interface_name,bytes_recv_rate_per_sec:t.bytes_recv_rate_per_sec,bytes_sent_rate_per_sec:t.bytes_sent_rate_per_sec,bytes_all_rate_per_sec:t.bytes_all_rate_per_sec,bytes_recv:t.bytes_recv,bytes_sent:t.bytes_sent,bytes_all:t.bytes_all}})).filter((t=>{const e=this.view[t.interfaceName].bytes_recv_rate_per_sec,r=this.view[t.interfaceName].bytes_sent_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,am.orderBy)(t,["interfaceName"])},hasNetworks(){return this.networks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},Ig=(0,Yd.A)(Dg,[["render",function(t,e,r,n,i,o){return o.hasNetworks?(xu(),Au("section",bg,[Iu("table",yg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"NETWORK",-1)),Al(Iu("th",vg,"Rxps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",xg,"Txps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",wg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",_g,"Rx+Txps",512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",kg,"Rx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Sg,"Tx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Ag,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Eg,"Rx+Tx",512),[[xp,o.args.network_cumul&&o.args.network_sum]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.networks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Cg,As(t.$filters.minSize(e.alias?e.alias:e.ifname,16)),1),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_recv_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_recv_rate_per_sec):t.$filters.bits(e.bytes_recv_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_sent_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_sent_rate_per_sec):t.$filters.bits(e.bytes_sent_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Tg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all_rate_per_sec):t.$filters.bits(e.bytes_all_rate_per_sec)),513),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_recv):t.$filters.bits(e.bytes_recv)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_sent):t.$filters.bits(e.bytes_sent)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Og,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all):t.$filters.bits(e.bytes_all)),513),[[xp,o.args.network_cumul&&o.args.network_sum]])])))),128))])])])):Ru("v-if",!0)}]]),Pg={id:"now",class:"plugin"};const jg={props:{data:{type:Object}},computed:{date_custom(){return this.data.stats.now.custom}}},Ng=(0,Yd.A)(jg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Pg,[Iu("span",null,As(o.date_custom),1)])}]]),Lg={id:"percpu",class:"plugin"},Mg={class:"table-responsive"},Rg={class:"table-sm table-borderless"},qg={key:0,scope:"col"},Bg={key:1,scope:"col"},$g={key:0,scope:"col"},Ug={key:1,scope:"col"};const Fg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},percpuStats(){return this.data.stats.percpu}},methods:{getUserAlert:t=>Ud.getAlert("percpu","percpu_user_",t.user),getSystemAlert:t=>Ud.getAlert("percpu","percpu_system_",t.system),getIOWaitAlert:t=>Ud.getAlert("percpu","percpu_iowait_",t.system)}},zg=(0,Yd.A)(Fg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Lg,[Ru(" d-none d-xl-block d-xxl-block "),Iu("div",Mg,[Iu("table",Rg,[Iu("thead",null,[Iu("tr",null,[o.args.disable_quicklook?(xu(),Au("th",qg,"CPU")):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Bg,"total")):Ru("v-if",!0),e[0]||(e[0]=Iu("td",{scope:"col"},"user",-1)),e[1]||(e[1]=Iu("td",{scope:"col"},"system",-1)),e[2]||(e[2]=Iu("td",{scope:"col"},"idle",-1)),e[3]||(e[3]=Iu("td",{scope:"col"},"iowait",-1)),e[4]||(e[4]=Iu("td",{scope:"col"},"steel",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.percpuStats,((t,e)=>(xu(),Au("tr",{key:e},[o.args.disable_quicklook?(xu(),Au("td",$g,"CPU"+As(t.cpu_number),1)):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Ug,As(t.total)+"%",1)):Ru("v-if",!0),Iu("td",{scope:"col",class:xs(o.getUserAlert(t))},As(t.user)+"%",3),Iu("td",{scope:"col",class:xs(o.getSystemAlert(t))},As(t.system)+"%",3),Al(Iu("td",{scope:"col"},As(t.idle)+"%",513),[[xp,null!=t.idle]]),Al(Iu("td",{scope:"col",class:xs(o.getIOWaitAlert(t))},As(t.iowait)+"%",3),[[xp,null!=t.iowait]]),Al(Iu("td",{scope:"col"},As(t.steal)+"%",513),[[xp,null!=t.steal]])])))),128))])])])])}]]),Hg={key:0,id:"ports",class:"plugin"},Vg={class:"table table-sm table-borderless margin-bottom"},Gg={scope:"row"},Wg={key:0},Kg={key:1},Xg={key:2},Qg={key:3},Zg={key:0},Yg={key:1},Jg={key:2};const tb={props:{data:{type:Object}},computed:{stats(){return this.data.stats.ports},ports(){return this.stats},hasPorts(){return this.ports.length>0}},methods:{getPortDecoration:t=>null===t.status?"careful":!1===t.status?"critical":null!==t.rtt_warning&&t.status>t.rtt_warning?"warning":"ok",getWebDecoration:t=>null===t.status?"careful":-1===[200,301,302].indexOf(t.status)?"critical":null!==t.rtt_warning&&t.elapsed>t.rtt_warning?"warning":"ok"}},eb=(0,Yd.A)(tb,[["render",function(t,e,r,n,i,o){return o.hasPorts?(xu(),Au("section",Hg,[Iu("table",Vg,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.ports,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Gg,[Ru(" prettier-ignore "),Lu(" "+As(t.$filters.minSize(e.description?e.description:e.host+" "+e.port,20)),1)]),e.host?(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Wg,"Scanning")):"false"==e.status?(xu(),Au("span",Kg,"Timeout")):"true"==e.status?(xu(),Au("span",Xg,"Open")):(xu(),Au("span",Qg,As(t.$filters.number(1e3*e.status,0))+"ms",1))],2)):Ru("v-if",!0),e.url?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Zg,"Scanning")):"Error"==e.status?(xu(),Au("span",Yg,"Error")):(xu(),Au("span",Jg,"Code "+As(e.status),1))],2)):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0)}]]),rb={key:0},nb={key:1},ib={key:0,class:"row"},ob={class:"col-lg-18"};const sb={key:0,id:"amps",class:"plugin"},ab={class:"table table-sm table-borderless"},lb={key:0},cb=["innerHTML"];const ub={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((t=>null!==t.result))},hasAmps(){return this.processes.length>0}},methods:{getNameDecoration(t){const e=t.count,r=t.countmin,n=t.countmax;let i="ok";return i=e>0?(null===r||e>=r)&&(null===n||e<=n)?"ok":"careful":null===r?"ok":"critical",i}}},pb=(0,Yd.A)(ub,[["render",function(t,e,r,n,i,o){return o.hasAmps?(xu(),Au("section",sb,[Iu("table",ab,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",{class:xs(o.getNameDecoration(e))},As(e.name),3),e.regex?(xu(),Au("td",lb,As(e.count),1)):Ru("v-if",!0),Iu("td",{class:"process-result",innerHTML:t.$filters.nl2br(e.result)},null,8,cb)])))),128))])]),Ru('
\n
\n
\n {{ process.name }}\n
\n
{{ process.count }}
\n
\n
\n ')])):Ru("v-if",!0)}]]),db={id:"processcount",class:"plugin"},mb={class:"title"};const fb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.processcount},total(){return this.stats.total||0},running(){return this.stats.running||0},sleeping(){return this.stats.sleeping||0},stopped(){return this.stats.stopped||0},thread(){return this.stats.thread||0}}},hb=(0,Yd.A)(fb,[["render",function(t,e,r,n,i,o){return xu(),Au("section",db,[e[0]||(e[0]=Iu("span",{class:"title"},"TASKS",-1)),Iu("span",null,As(o.total)+" ("+As(o.thread)+" thr),",1),Iu("span",null,As(o.running)+" run,",1),Iu("span",null,As(o.sleeping)+" slp,",1),Iu("span",null,As(o.stopped)+" oth",1),Iu("span",null,As(o.args.programs?"Programs":"Threads"),1),Iu("span",mb,As(r.sorter.auto?"sorted automatically":"sorted"),1),Iu("span",null,"by "+As(r.sorter.getColumnLabel(r.sorter.column)),1)])}]]),gb={key:0,id:"processlist",class:"plugin"},bb={key:0,class:"extendedstats"},yb={class:"careful"},vb={class:"careful"},xb={class:"careful"},wb={class:"careful"},_b={class:"table-responsive d-lg-none"},kb={class:"table table-sm table-borderless table-striped table-hover"},Sb={scope:"col"},Ab=["onClick"],Eb={class:"table-responsive-md d-none d-lg-block"},Cb={class:"table table-sm table-borderless table-striped table-hover"},Tb={scope:"col"},Ob={scope:"col"},Db={scope:"col"},Ib={scope:"col"},Pb={scope:"col"},jb=["onClick"],Nb={key:0,scope:"row",class:""},Lb={key:1,id:"processlist",class:"plugin"},Mb={class:"table-responsive d-lg-none"},Rb={class:"table table-sm table-borderless table-striped table-hover"},qb={class:"table-responsive d-none d-lg-block"},Bb={class:"table table-sm table-borderless table-striped table-hover"},$b={class:""},Ub={class:""},Fb={scope:"row"},zb={scope:"row",class:"table-cell widtd-60"};const Hb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats_processlist(){return this.data.stats.processlist},stats_core(){return this.data.stats.core},cpucore(){return 0!==this.stats_core.log?this.stats_core.log:1},extended_stats(){return this.stats_processlist.find((t=>!0===t.extended_stats))||null},processes(){const{sorter:t}=this,e=(this.stats_processlist||[]).map((t=>this.updateProcess(t,this.data.stats.isWindows,this.args,this.cpucore)));return(0,am.orderBy)(e,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentProcesses(){return(this.stats_processlist||[]).some((({io_counters:t})=>t))},stats_programlist(){return this.data.stats.programlist},programs(){const{sorter:t}=this,e=this.data.stats.isWindows,r=(this.stats_programlist||[]).map((t=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=hf([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),null===t.cpu_percent&&(t.cpu_percent=-1),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t)));return(0,am.orderBy)(r,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentPrograms(){return(this.stats_programlist||[]).some((({io_counters:t})=>t))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{updateProcess:(t,e,r,n)=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=hf([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),t.irix=1,null===t.cpu_percent?t.cpu_percent=-1:r.disable_irix&&(t.irix=n),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.name=t.name+" "+t.cmdline.slice(1).join(" ").replace(/\n/g," "),t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t),getCpuPercentAlert:t=>Ud.getAlert("processlist","processlist_cpu_",t.cpu_percent),getMemoryPercentAlert:t=>Ud.getAlert("processlist","processlist_mem_",t.cpu_percent),getDisableStats:()=>Ud.getLimit("processlist","processlist_disable_stats")||[],setExtendedStats(t){fetch("api/4/processes/extended/"+t.toString(),{method:"POST"}).then((t=>t.json())),this.$forceUpdate()},disableExtendedStats(){fetch("api/4/processes/extended/disable",{method:"POST"}).then((t=>t.json())),this.$forceUpdate()}}},Vb={components:{GlancesPluginAmps:pb,GlancesPluginProcesscount:hb,GlancesPluginProcesslist:(0,Yd.A)(Hb,[["render",function(t,e,r,n,i,o){return xu(),Au(fu,null,[Ru(" Display processes "),o.args.programs?Ru("v-if",!0):(xu(),Au("section",gb,[null!==o.extended_stats?(xu(),Au("div",bb,[Iu("div",null,[e[24]||(e[24]=Iu("span",{class:"title"},"Pinned task: ",-1)),Iu("span",null,As(t.$filters.limitTo(o.extended_stats.cmdline,80)),1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.disableExtendedStats())},"Unpin")])]),Iu("div",null,[e[25]||(e[25]=Iu("span",null,"CPU Min/Max/Mean: ",-1)),Iu("span",yb,As(t.$filters.number(o.extended_stats.cpu_min,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_max,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_mean,1))+"%",1),e[26]||(e[26]=Iu("span",null,"Affinity: ",-1)),Iu("span",vb,As(o.extended_stats.cpu_affinity|t.length),1)]),Iu("div",null,[e[27]||(e[27]=Iu("span",null,"MEM Min/Max/Mean: ",-1)),Iu("span",xb,As(t.$filters.number(o.extended_stats.memory_min,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_max,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_mean,1))+"%",1),e[28]||(e[28]=Iu("span",null,"Memory info: ",-1)),Iu("span",wb,As(t.$filters.dictToString(o.extended_stats.memory_info)),1)])])):Ru("v-if",!0),Iu("div",_b,[Iu("table",kb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[1]||(e[1]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[2]||(e[2]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Sb," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[3]||(e[3]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[4]||(e[4]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,Ab)))),128))])])]),Iu("div",Eb,[Iu("table",Cb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[5]||(e[5]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[6]||(e[6]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Tb," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Ob," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Db," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[7]||(e[7]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","timemillis"===r.sorter.column&&"sort"]),onClick:e[8]||(e[8]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","num_threads"===r.sorter.column&&"sort"]),onClick:e[9]||(e[9]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Ib,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",Pb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[10]||(e[10]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[11]||(e[11]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[12]||(e[12]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e.pid)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),"?"==e.timeplus?Al((xu(),Au("td",Nb,"?",512)),[[xp,!o.getDisableStats().includes("cpu_times")]]):Ru("v-if",!0),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,jb)))),128))])])])])),Ru(" Display programs "),o.args.programs?(xu(),Au("section",Lb,[Iu("div",Mb,[Iu("table",Rb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[13]||(e[13]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[14]||(e[14]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[15]||(e[15]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])]),Iu("div",qb,[Iu("table",Bb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[16]||(e[16]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[17]||(e[17]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",$b," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Ub," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[18]||(e[18]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[19]||(e[19]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[20]||(e[20]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Fb,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",zb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[21]||(e[21]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[22]||(e[22]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[23]||(e[23]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])])):Ru("v-if",!0)],64)}]])},props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["username","name"].includes(t)},getColumnLabel:function(t){return{cpu_percent:"CPU consumption",memory_percent:"memory consumption",username:"user name",timemillis:"process time",cpu_times:"process time",io_counters:"disk IO",name:"process name",None:"None"}[t]||t}})}}}},Gb=(0,Yd.A)(Vb,[["render",function(t,e,r,n,i,o){const s=ec("glances-plugin-processcount"),a=ec("glances-plugin-amps"),l=ec("glances-plugin-processlist");return o.args.disable_process?(xu(),Au("div",rb,"PROCESSES DISABLED (press 'z' to display)")):(xu(),Au("div",nb,[Pu(s,{sorter:i.sorter,data:r.data},null,8,["sorter","data"]),o.args.disable_amps?Ru("v-if",!0):(xu(),Au("div",ib,[Iu("div",ob,[Pu(a,{data:r.data},null,8,["data"])])])),Pu(l,{sorter:i.sorter,data:r.data,"onUpdate:sorter":e[0]||(e[0]=t=>o.args.sort_processes_key=t)},null,8,["sorter","data"])]))}]]),Wb={id:"quicklook",class:"plugin"},Kb={class:"d-flex justify-content-between"},Xb={class:"text-start text-truncate"},Qb={key:0,class:"text-end d-none d-xxl-block frequency"},Zb={class:"table-responsive"},Yb={class:"table table-sm table-borderless"},Jb={key:0},ty={scope:"col",class:"progress"},ey=["aria-valuenow"],ry={scope:"col",class:"text-end"},ny={scope:"col"},iy={scope:"col",class:"progress"},oy=["aria-valuenow"],sy={scope:"col",class:"text-end"},ay={scope:"col"},ly={scope:"col",class:"progress"},cy=["aria-valuenow"],uy={scope:"col",class:"text-end"};const py={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return(this.stats.cpu_hz_current/1e6).toFixed(0)},cpu_hz(){return(this.stats.cpu_hz/1e6).toFixed(0)},percpus(){const t=this.stats.percpu.map((({cpu_number:t,total:e})=>({number:t,total:e}))),e=parseInt(this.config.percpu.max_cpu_display);if(this.stats.percpu.length>e){var r=t.sort((function(t,e){return e.total-t.total}));const n={number:"x",total:Number((r.slice(e).reduce(((t,{total:e})=>t+e),0)/(this.stats.percpu.length-e)).toFixed(1))};(r=r.slice(0,e)).push(n)}return this.stats.percpu.length<=e?t:r},stats_list_after_cpu(){return this.view.list.filter((t=>!t.includes("cpu")))}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},dy=(0,Yd.A)(py,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Wb,[Iu("div",Kb,[Iu("span",Xb,As(o.cpu_name),1),o.cpu_hz_current?(xu(),Au("span",Qb,As(o.cpu_hz_current)+"/"+As(o.cpu_hz)+"Ghz ",1)):Ru("v-if",!0)]),Iu("div",Zb,[Iu("table",Yb,[o.args.percpu?Ru("v-if",!0):(xu(),Au("tr",Jb,[e[0]||(e[0]=Iu("td",{scope:"col"},"CPU",-1)),Iu("td",ty,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":o.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.cpu}%;`)},"   ",14,ey)]),Iu("td",ry,[Iu("span",null,As(o.cpu)+"%",1)])])),o.args.percpu?(xu(!0),Au(fu,{key:1},oc(o.percpus,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ny,"CPU"+As(t.number),1),Iu("td",iy,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":t.total,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${t.total}%;`)},"   ",14,oy)]),Iu("td",sy,[Iu("span",null,As(t.total)+"%",1)])])))),128)):Ru("v-if",!0),(xu(!0),Au(fu,null,oc(o.stats_list_after_cpu,(t=>(xu(),Au("tr",null,[Iu("td",ay,As(t.toUpperCase()),1),Iu("td",ly,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration(t)}`),role:"progressbar","aria-valuenow":o.stats[t],"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.stats[t]}%;`)},"   ",14,cy)]),Iu("td",uy,[Iu("span",null,As(o.stats[t])+"%",1)])])))),256))])])])}]]),my={key:0,id:"raid",class:"plugin"},fy={class:"table table-sm table-borderless margin-bottom"},hy={scope:"col"},gy={scope:"row"},by={class:"warning"};const yy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const t=Object.entries(this.stats).map((([t,e])=>{const r=Object.entries(e.components).map((([t,e])=>({number:e,name:t})));return{name:t,type:null==e.type?"UNKNOWN":e.type,used:e.used,available:e.available,status:e.status,degraded:e.used0}},methods:{getAlert:t=>t.inactive?"critical":t.degraded?"warning":"ok"}},vy=(0,Yd.A)(yy,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",my,[Iu("table",fy,[Iu("thead",null,[Iu("tr",null,[Iu("th",hy,"RAID disks "+As(o.disks.length),1),e[0]||(e[0]=Iu("th",{scope:"col",class:"text-end"},"Used",-1)),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",gy,[Lu(As(t.type.toUpperCase())+" "+As(t.name)+" ",1),Al(Iu("div",by,"└─ Degraded mode",512),[[xp,t.degraded]]),Al(Iu("div",null,"   └─ "+As(t.config),513),[[xp,t.degraded]]),Al(Iu("div",{class:"critical"},"└─ Status "+As(t.status),513),[[xp,t.inactive]]),t.inactive?(xu(!0),Au(fu,{key:0},oc(t.components,((e,r)=>(xu(),Au("div",{key:r},"    "+As(r===t.components.length-1?"└─":"├─")+" disk "+As(e.number)+": "+As(e.name),1)))),128)):Ru("v-if",!0)]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.used),3),[[xp,"active"==t.status]]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.available),3),[[xp,"active"==t.status]])])))),128))])])])):Ru("v-if",!0)}]]),xy={key:0,id:"smart",class:"plugin"},wy={class:"table table-sm table-borderless margin-bottom"},_y={scope:"row"},ky={scope:"row"},Sy={scope:"row",class:"text-end text-truncate"};const Ay={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((t=>({name:t.DeviceName,details:Object.entries(t).filter((([t])=>"DeviceName"!==t)).sort((([,t],[,e])=>t.namee.name?1:0)).map((([t,e])=>e))})))},hasDrives(){return this.drives.length>0}}},Ey=(0,Yd.A)(Ay,[["render",function(t,e,r,n,i,o){return o.hasDrives?(xu(),Au("section",xy,[Iu("table",wy,[e[1]||(e[1]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SMART DISKS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.drives,((t,r)=>(xu(),Au(fu,{key:r},[Iu("tr",null,[Iu("td",_y,As(t.name),1),e[0]||(e[0]=Iu("td",{scope:"col",class:"text-end"},null,-1))]),(xu(!0),Au(fu,null,oc(t.details,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ky,As(t.name),1),Iu("td",Sy,As(t.raw),1)])))),128))],64)))),128))])])])):Ru("v-if",!0)}]]),Cy={key:0,id:"sensors",class:"plugin"},Ty={class:"table table-sm table-borderless"},Oy={scope:"row"};const Dy={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},view(){return this.data.views.sensors},sensors(){return this.stats.map((t=>(this.args.fahrenheit&&"battery"!=t.type&&"fan_speed"!=t.type&&(t.value=parseFloat(1.8*t.value+32).toFixed(1),t.unit="F"),t)))},hasSensors(){return this.sensors.length>0}},methods:{getDecoration(t){if(void 0!==this.view[t].value.decoration)return this.view[t].value.decoration.toLowerCase()}}},Iy=(0,Yd.A)(Dy,[["render",function(t,e,r,n,i,o){return o.hasSensors?(xu(),Au("section",Cy,[Iu("table",Ty,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SENSORS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.sensors,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Oy,As(t.label),1),Iu("td",{class:xs(["text-end",o.getDecoration(t.label)])},As(t.value)+As(t.unit),3)])))),128))])])])):Ru("v-if",!0)}]]),Py={id:"system",class:"plugin"},jy={key:0,class:"critical"},Ny={class:"title"},Ly={key:1,class:"text-truncate"};const My={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},Ry=(0,Yd.A)(My,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Py,[o.isDisconnected?(xu(),Au("span",jy,"Disconnected from")):Ru("v-if",!0),Iu("span",Ny,As(o.hostname),1),o.isDisconnected?Ru("v-if",!0):(xu(),Au("span",Ly,As(o.humanReadableName),1))])}]]),qy={id:"uptime",class:"plugin"};const By={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},$y=(0,Yd.A)(By,[["render",function(t,e,r,n,i,o){return xu(),Au("section",qy,[Iu("span",null,"Uptime: "+As(o.value),1)])}]]),Uy={key:0,id:"vms",class:"plugin"},Fy={class:"table table-sm table-borderless table-striped table-hover"};const zy={props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.vms},views(){return this.data.views.vms},vms(){const{sorter:t}=this,e=(this.stats||[]).map((t=>({id:t.id,name:t.name,status:null!=t.status?t.status:"-",cpu_count:null!=t.cpu_count?t.cpu_count:"-",cpu_time:null!=t.cpu_time?t.cpu_time:"-",cpu_time_rate_per_sec:null!=t.cpu_time_rate_per_sec?t.cpu_time_rate_per_sec:"?",memory_usage:null!=t.memory_usage?t.memory_usage:"-",memory_total:null!=t.memory_total?t.memory_total:"-",load_1min:null!=t.load_1min?t.load_1min:"-",load_5min:null!=t.load_5min?t.load_5min:"-",load_15min:null!=t.load_15min?t.load_15min:"-",release:t.release,image:t.image,engine:t.engine,engine_version:t.engine_version})));return(0,am.orderBy)(e,[t.column].reduce(((t,e)=>("memory_usage"===e&&(e=["memory_usage"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["load_1min","cpu_time","memory_usage","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_time",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{load_1min:"load",cpu_time:"CPU time",memory_usage:"memory consumption",name:"VM name",None:"None"}[t]||t}})}}}},Hy=(0,Yd.A)(zy,[["render",function(t,e,r,n,i,o){return o.vms.length?(xu(),Au("section",Uy,[e[8]||(e[8]=Iu("span",{class:"title"},"VMs",-1)),Al(Iu("span",null,As(o.vms.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.vms.length>1]]),Iu("table",Fy,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",null,"Engine",512),[[xp,o.showEngine]]),Iu("td",{class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),e[4]||(e[4]=Iu("td",null,"Status",-1)),e[5]||(e[5]=Iu("td",null,"Core",-1)),Iu("td",{class:xs(["sortable","cpu_time"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_time")}," CPU% ",2),Iu("td",{class:xs(["sortable","memory_usage"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_usage")}," MEM ",2),e[6]||(e[6]=Iu("td",null,"/ MAX",-1)),Iu("td",{class:xs(["sortable","load_1min"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="load_1min")}," LOAD 1/5/15min ",2),e[7]||(e[7]=Iu("td",null,"Release",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.vms,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",null,As(e.engine),513),[[xp,o.showEngine]]),Iu("td",null,As(e.name),1),Iu("td",{class:xs("stopped"==e.status?"careful":"ok")},As(e.status),3),Iu("td",null,As(t.$filters.number(e.cpu_count,1)),1),Iu("td",null,As(t.$filters.number(e.cpu_time,1)),1),Iu("td",null,As(t.$filters.bytes(e.memory_usage)),1),Iu("td",null," / "+As(t.$filters.bytes(e.memory_total)),1),Iu("td",null,As(t.$filters.number(e.load_1min))+"/"+As(t.$filters.number(e.load_5min))+"/"+As(t.$filters.number(e.load_15min)),1),Iu("td",null,As(e.release),1)])))),128))])])])):Ru("v-if",!0)}]]),Vy={key:0,id:"wifi",class:"plugin"},Gy={class:"table table-sm table-borderless margin-bottom"},Wy={scope:"row"};const Ky={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const t=this.stats.map((t=>{if(""!==t.ssid)return{ssid:t.ssid,quality_level:t.quality_level}})).filter(Boolean);return(0,am.orderBy)(t,["ssid"])},hasHotpots(){return this.hotspots.length>0}},methods:{getDecoration(t,e){if(void 0!==this.view[t.ssid][e])return this.view[t.ssid][e].decoration.toLowerCase()}}},Xy=(0,Yd.A)(Ky,[["render",function(t,e,r,n,i,o){return o.hasHotpots?(xu(),Au("section",Vy,[Iu("table",Gy,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"WIFI"),Iu("th",{scope:"col",class:"text-end"},"dBm")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.hotspots,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Wy,As(t.$filters.limitTo(e.ssid,20)),1),Iu("td",{scope:"row",class:xs(["text-end",o.getDecoration(e,"quality_level")])},As(e.quality_level),3)])))),128))])])])):Ru("v-if",!0)}]]),Qy=JSON.parse('{"H":["network","ports","wifi","connections","diskio","fs","irq","folders","raid","smart","sensors"]}'),Zy={components:{GlancesHelp:Jd,GlancesPluginAlert:cm,GlancesPluginCloud:mm,GlancesPluginConnections:wm,GlancesPluginCpu:Xm,GlancesPluginDiskio:yf,GlancesPluginContainers:Bf,GlancesPluginFolders:Vf,GlancesPluginFs:th,GlancesPluginGpu:yh,GlancesPluginHostname:kh,GlancesPluginIp:Ih,GlancesPluginIrq:Rh,GlancesPluginLoad:Hh,GlancesPluginMem:cg,GlancesPluginMemswap:gg,GlancesPluginNetwork:Ig,GlancesPluginNow:Ng,GlancesPluginPercpu:zg,GlancesPluginPorts:eb,GlancesPluginProcess:Gb,GlancesPluginQuicklook:dy,GlancesPluginRaid:vy,GlancesPluginSensors:Iy,GlancesPluginSmart:Ey,GlancesPluginSystem:Ry,GlancesPluginUptime:$y,GlancesPluginVms:Hy,GlancesPluginWifi:Xy},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},data(){return this.store.data||{}},dataLoaded(){return void 0!==this.store.data},hasGpu(){return this.store.data.stats.gpu.length>0},isLinux(){return this.store.data.isLinux},title(){const{data:t}=this,e=t.stats&&t.stats.system&&t.stats.system.hostname||"";return e?`${e} - Glances`:"Glances"},leftMenu(){return void 0!==this.config.outputs&&void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):Qy.H}},watch:{title(){document&&(document.title=this.title)}},mounted(){const t=window.__GLANCES__||{},e=isFinite(t["refresh-time"])?parseInt(t["refresh-time"],10):void 0;Fd.init(e),this.setupHotKeys()},beforeUnmount(){Ld.unbind()},methods:{setupHotKeys(){Ld("a",(()=>{this.store.args.sort_processes_key=null})),Ld("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),Ld("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),Ld("u",(()=>{this.store.args.sort_processes_key="username"})),Ld("p",(()=>{this.store.args.sort_processes_key="name"})),Ld("i",(()=>{this.store.args.sort_processes_key="io_counters"})),Ld("t",(()=>{this.store.args.sort_processes_key="timemillis"})),Ld("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),Ld("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),Ld("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),Ld("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),Ld("j",(()=>{this.store.args.programs=!this.store.args.programs})),Ld("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),Ld("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),Ld("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),Ld("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),Ld("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),Ld("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),Ld("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),Ld("b",(()=>{this.store.args.byte=!this.store.args.byte})),Ld("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),Ld("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),Ld("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),Ld("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),Ld("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),Ld("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),Ld("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),Ld("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),Ld("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),Ld("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),Ld("5",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook,this.store.args.disable_cpu=!this.store.args.disable_cpu,this.store.args.disable_mem=!this.store.args.disable_mem,this.store.args.disable_memswap=!this.store.args.disable_memswap,this.store.args.disable_load=!this.store.args.disable_load,this.store.args.disable_gpu=!this.store.args.disable_gpu})),Ld("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),Ld("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),Ld("shift+V",(()=>{this.store.args.disable_vms=!this.store.args.disable_vms})),Ld("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi})),Ld("0",(()=>{this.store.args.disable_irix=!this.store.args.disable_irix}))}}};const Yy=Fp((0,Yd.A)(Zy,[["render",function(t,e,r,n,i,o){const s=ec("glances-help"),a=ec("glances-plugin-hostname"),l=ec("glances-plugin-uptime"),c=ec("glances-plugin-system"),u=ec("glances-plugin-ip"),p=ec("glances-plugin-now"),d=ec("glances-plugin-cloud"),m=ec("glances-plugin-quicklook"),f=ec("glances-plugin-cpu"),h=ec("glances-plugin-gpu"),g=ec("glances-plugin-mem"),b=ec("glances-plugin-memswap"),y=ec("glances-plugin-load"),v=ec("glances-plugin-vms"),x=ec("glances-plugin-containers"),w=ec("glances-plugin-process"),_=ec("glances-plugin-alert");return o.dataLoaded?o.args.help_tag?(xu(),Eu(s,{key:1})):(xu(),Au("main",Gp,[Ru(" Display minimal header on low screen size (smarthphone) "),Iu("div",Wp,[Iu("div",Kp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Xp,[Pu(a,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",Qp,[Pu(l,{data:o.data},null,8,["data"])]))])]),Ru(" Display standard header on others screen sizes "),Iu("div",Zp,[Iu("div",Yp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Jp,[Pu(c,{data:o.data},null,8,["data"])])),o.args.disable_ip?Ru("v-if",!0):(xu(),Au("div",td,[Pu(u,{data:o.data},null,8,["data"])])),o.args.disable_now?Ru("v-if",!0):(xu(),Au("div",ed,[Pu(p,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",rd,[Pu(l,{data:o.data},null,8,["data"])]))])]),Iu("div",nd,[o.args.disable_cloud?Ru("v-if",!0):(xu(),Au("div",id,[Pu(d,{data:o.data},null,8,["data"])]))]),Ru(" Display top menu with CPU, MEM, LOAD..."),Iu("div",od,[Ru(" Quicklook "),o.args.disable_quicklook?Ru("v-if",!0):(xu(),Au("div",sd,[Pu(m,{data:o.data},null,8,["data"])])),Ru(" CPU "),o.args.disable_cpu&&o.args.percpu?Ru("v-if",!0):(xu(),Au("div",ad,[Pu(f,{data:o.data},null,8,["data"])])),Ru(' TODO: percpu need to be refactor\n
\n \n
\n
\n \n
'),Ru(" GPU "),!o.args.disable_gpu&&o.hasGpu?(xu(),Au("div",ld,[Pu(h,{data:o.data},null,8,["data"])])):Ru("v-if",!0),Ru(" MEM "),o.args.disable_mem?Ru("v-if",!0):(xu(),Au("div",cd,[Pu(g,{data:o.data},null,8,["data"])])),Ru(" SWAP "),o.args.disable_memswap?Ru("v-if",!0):(xu(),Au("div",ud,[Pu(b,{data:o.data},null,8,["data"])])),Ru(" LOAD "),o.args.disable_load?Ru("v-if",!0):(xu(),Au("div",pd,[Pu(y,{data:o.data},null,8,["data"])]))]),Ru(" Display bottom of the screen with sidebar and processlist "),Iu("div",dd,[Iu("div",md,[o.args.disable_left_sidebar?Ru("v-if",!0):(xu(),Au("div",{key:0,class:xs(["col-3 d-none d-md-block",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[(xu(!0),Au(fu,null,oc(o.leftMenu,(t=>{return xu(),Au(fu,null,[o.args[`disable_${t}`]?Ru("v-if",!0):(xu(),Eu((e=`glances-plugin-${t}`,Wo(e)?nc(tc,e,!1)||e:e||rc),{key:0,id:`${t}`,data:o.data},null,8,["id","data"]))],64);var e})),256))],2)),Iu("div",{class:xs(["col",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[o.args.disable_vms?Ru("v-if",!0):(xu(),Eu(v,{key:0,data:o.data},null,8,["data"])),o.args.disable_containers?Ru("v-if",!0):(xu(),Eu(x,{key:1,data:o.data},null,8,["data"])),Pu(w,{data:o.data},null,8,["data"]),o.args.disable_alert?Ru("v-if",!0):(xu(),Eu(_,{key:2,data:o.data},null,8,["data"]))],2)])])])):(xu(),Au("div",Vp,e[0]||(e[0]=[Iu("div",{class:"loader"},"Glances is loading...",-1)])))}]]));Yy.config.globalProperties.$filters=e,Yy.mount("#app")})()})(); \ No newline at end of file +const fd="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function hd(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function gd(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function bd(t,e){const r=e.slice(0,e.length-1);for(let e=0;e=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}const vd={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":fd?173:189,"=":fd?61:187,";":fd?59:186,"'":222,"[":219,"]":221,"\\":220},xd={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},wd={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_d={16:!1,18:!1,17:!1,91:!1},kd={};for(let t=1;t<20;t++)vd["f".concat(t)]=111+t;let Sd=[],Ad=null,Ed="all";const Cd=new Map,Td=t=>vd[t.toLowerCase()]||xd[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);function Od(t){Ed=t||"all"}function Dd(){return Ed||"all"}function Id(t){if(void 0===t)Object.keys(kd).forEach((t=>{Array.isArray(kd[t])&&kd[t].forEach((t=>Pd(t))),delete kd[t]})),Md(null);else if(Array.isArray(t))t.forEach((t=>{t.key&&Pd(t)}));else if("object"==typeof t)t.key&&Pd(t);else if("string"==typeof t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{let{key:e,scope:r,method:n,splitKey:i="+"}=t;yd(e).forEach((t=>{const e=t.split(i),o=e.length,s=e[o-1],a="*"===s?"*":Td(s);if(!kd[a])return;r||(r=Dd());const l=o>1?bd(xd,e):[],c=[];kd[a]=kd[a].filter((t=>{const e=(!n||t.method===n)&&t.scope===r&&function(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let t=0;tMd(t)))}))};function jd(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||"all"===e.scope){i=e.mods.length>0;for(const t in _d)Object.prototype.hasOwnProperty.call(_d,t)&&(!_d[t]&&e.mods.indexOf(+t)>-1||_d[t]&&-1===e.mods.indexOf(+t))&&(i=!1);(0!==e.mods.length||_d[16]||_d[18]||_d[17]||_d[91])&&!i&&"*"!==e.shortcut||(e.keys=[],e.keys=e.keys.concat(Sd),!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Nd(t,e){const r=kd["*"];let n=t.keyCode||t.which||t.charCode;if(!Ld.filter.call(this,t))return;if(93!==n&&224!==n||(n=91),-1===Sd.indexOf(n)&&229!==n&&Sd.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach((e=>{const r=wd[e];t[e]&&-1===Sd.indexOf(r)?Sd.push(r):!t[e]&&Sd.indexOf(r)>-1?Sd.splice(Sd.indexOf(r),1):"metaKey"===e&&t[e]&&(Sd=Sd.filter((t=>t in wd||t===n)))})),n in _d){_d[n]=!0;for(const t in xd)xd[t]===n&&(Ld[t]=!0);if(!r)return}for(const e in _d)Object.prototype.hasOwnProperty.call(_d,e)&&(_d[e]=t[wd[e]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===Sd.indexOf(17)&&Sd.push(17),-1===Sd.indexOf(18)&&Sd.push(18),_d[17]=!0,_d[18]=!0);const i=Dd();if(r)for(let n=0;n1&&(i=bd(xd,t)),(t="*"===(t=t[t.length-1])?"*":Td(t))in kd||(kd[t]=[]),kd[t].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:n[a],method:r,key:n[a],splitKey:u,element:s});if(void 0!==s&&window){if(!Cd.has(s)){const t=function(){return Nd(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,s)},e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;Nd(t,s),function(t){let e=t.keyCode||t.which||t.charCode;const r=Sd.indexOf(e);if(r>=0&&Sd.splice(r,1),t.key&&"meta"===t.key.toLowerCase()&&Sd.splice(0,Sd.length),93!==e&&224!==e||(e=91),e in _d){_d[e]=!1;for(const t in xd)xd[t]===e&&(Ld[t]=!1)}}(t)};Cd.set(s,{keydownListener:t,keyupListenr:e,capture:p}),hd(s,"keydown",t,p),hd(s,"keyup",e,p)}if(!Ad){const t=()=>{Sd=[]};Ad={listener:t,capture:p},hd(window,"focus",t,p)}}}function Md(t){const e=Object.values(kd).flat();if(e.findIndex((e=>{let{element:r}=e;return r===t}))<0){const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))}if(e.length<=0||Cd.size<=0){if(Object.keys(Cd).forEach((t=>{const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))})),Cd.clear(),Object.keys(kd).forEach((t=>delete kd[t])),Ad){const{listener:t,capture:e}=Ad;gd(window,"focus",t,e),Ad=null}}}const Rd={getPressedKeyString:function(){return Sd.map((t=>{return e=t,Object.keys(vd).find((t=>vd[t]===e))||(t=>Object.keys(xd).find((e=>xd[e]===t)))(t)||String.fromCharCode(t);var e}))},setScope:Od,getScope:Dd,deleteScope:function(t,e){let r,n;t||(t=Dd());for(const e in kd)if(Object.prototype.hasOwnProperty.call(kd,e))for(r=kd[e],n=0;n{let{element:e}=t;return Md(e)}))}else n++;Dd()===t&&Od(e||"all")},getPressedKeyCodes:function(){return Sd.slice(0)},getAllKeyCodes:function(){const t=[];return Object.keys(kd).forEach((e=>{kd[e].forEach((e=>{let{key:r,scope:n,mods:i,shortcut:o}=e;t.push({scope:n,shortcut:o,mods:i,keys:r.split("+").map((t=>Td(t)))})}))})),t},isPressed:function(t){return"string"==typeof t&&(t=Td(t)),-1!==Sd.indexOf(t)},filter:function(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i="INPUT"===r&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||"TEXTAREA"===r||"SELECT"===r)&&!e.readOnly)&&(n=!1),n},trigger:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(kd).forEach((r=>{kd[r].filter((r=>r.scope===e&&r.shortcut===t)).forEach((t=>{t&&t.method&&t.method()}))}))},unbind:Id,keyMap:vd,modifier:xd,modifierMap:wd};for(const t in Rd)Object.prototype.hasOwnProperty.call(Rd,t)&&(Ld[t]=Rd[t]);if("undefined"!=typeof window){const t=window.hotkeys;Ld.noConflict=e=>(e&&window.hotkeys===Ld&&(window.hotkeys=t),Ld),window.hotkeys=Ld}const qd=Ra({args:void 0,config:void 0,data:void 0,status:"IDLE"});var Bd=r(4644),$d=r.n(Bd);const Ud=new class{limits={};limitSuffix=["critical","careful","warning"];setLimits(t){this.limits=t}getLimit(t,e){return null!=this.limits[t]&&null!=this.limits[t][e]?this.limits[t][e]:null}getAlert(t,e,r,n,i){var o=(i=i||!1)?"_log":"",s=100*(r=r||0)/(n=n||100);if(null!=this.limits[t])for(var a=0;a=this.limits[t][l]){var c=l.lastIndexOf("_");return l.substring(c+1)+o}}return"ok"+o}getAlertLog(t,e,r,n){return this.getAlert(t,e,r,n,!0)}};const Fd=new class{data=void 0;init(t=60){let e;const r=()=>(qd.status="PENDING",Promise.all([fetch("api/4/all",{method:"GET"}).then((t=>t.json())),fetch("api/4/all/views",{method:"GET"}).then((t=>t.json()))]).then((t=>{const e={stats:t[0],views:t[1],isBsd:"FreeBSD"===t[0].system.os_name,isLinux:"Linux"===t[0].system.os_name,isSunOS:"SunOS"===t[0].system.os_name,isMac:"Darwin"===t[0].system.os_name,isWindows:"Windows"===t[0].system.os_name};this.data=e,qd.data=e,qd.status="SUCCESS"})).catch((t=>{console.log(t),qd.status="FAILURE"})).then((()=>{e&&clearTimeout(e),e=setTimeout(r,1e3*t)})));r(),fetch("api/4/all/limits",{method:"GET"}).then((t=>t.json())).then((t=>{Ud.setLimits(t)})),fetch("api/4/args",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.args={...qd.args,...t}})),fetch("api/4/config",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.config={...qd.config,...t}}))}getData(){return this.data}};const zd=new class{constructor(){this.favico=new($d())({animation:"none"})}badge(t){this.favico.badge(t)}reset(){this.favico.reset()}},Hd={key:0},Vd={class:"container-fluid"},Gd={class:"row"},Wd={class:"col-sm-12 col-lg-24 title"},Kd={class:"row"},Xd={class:"col-sm-12 col-lg-24"},Qd={class:"table table-sm table-borderless table-striped table-hover"};const Zd={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((t=>t.json())).then((t=>this.help=t))}};var Yd=r(6262);const Jd=(0,Yd.A)(Zd,[["render",function(t,e,r,n,i,o){return i.help?(xu(),Au("div",Hd,[Iu("div",Vd,[Iu("div",Gd,[Iu("div",Wd,As(i.help.version)+" "+As(i.help.psutil_version),1)]),e[0]||(e[0]=Iu("div",{class:"row"}," ",-1)),Iu("div",Kd,[Iu("div",Xd,As(i.help.configuration_file),1)]),e[1]||(e[1]=Iu("div",{class:"row"}," ",-1))]),Iu("table",Qd,[Iu("thead",null,[Iu("tr",null,[Iu("th",null,As(i.help.header_sort.replace(":","")),1),Iu("th",null,As(i.help.header_show_hide.replace(":","")),1),Iu("th",null,As(i.help.header_toggle.replace(":","")),1),Iu("th",null,As(i.help.header_miscellaneous.replace(":","")),1)])]),Iu("tbody",null,[Iu("tr",null,[Iu("td",null,As(i.help.sort_auto),1),Iu("td",null,As(i.help.show_hide_application_monitoring),1),Iu("td",null,As(i.help.toggle_bits_bytes),1),Iu("td",null,As(i.help.misc_erase_process_filter),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu),1),Iu("td",null,As(i.help.show_hide_diskio),1),Iu("td",null,As(i.help.toggle_count_rate),1),Iu("td",null,As(i.help.misc_generate_history_graphs),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_io_rate),1),Iu("td",null,As(i.help.show_hide_containers),1),Iu("td",null,As(i.help.toggle_used_free),1),Iu("td",null,As(i.help.misc_help),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_mem),1),Iu("td",null,As(i.help.show_hide_top_extended_stats),1),Iu("td",null,As(i.help.toggle_bar_sparkline),1),Iu("td",null,As(i.help.misc_accumulate_processes_by_program),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_process_name),1),Iu("td",null,As(i.help.show_hide_filesystem),1),Iu("td",null,As(i.help.toggle_separate_combined),1),e[2]||(e[2]=Iu("td",null," ",-1))]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu_times),1),Iu("td",null,As(i.help.show_hide_gpu),1),Iu("td",null,As(i.help.toggle_live_cumulative),1),Iu("td",null,As(i.help.misc_reset_processes_summary_min_max),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_user),1),Iu("td",null,As(i.help.show_hide_ip),1),Iu("td",null,As(i.help.toggle_linux_percentage),1),Iu("td",null,As(i.help.misc_quit),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_tcp_connection),1),Iu("td",null,As(i.help.toggle_cpu_individual_combined),1),Iu("td",null,As(i.help.misc_reset_history),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_alert),1),Iu("td",null,As(i.help.toggle_gpu_individual_combined),1),Iu("td",null,As(i.help.misc_delete_warning_alerts),1)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_network),1),Iu("td",null,As(i.help.toggle_short_full),1),Iu("td",null,As(i.help.misc_delete_warning_and_critical_alerts),1)]),Iu("tr",null,[e[6]||(e[6]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.sort_cpu_times),1),e[7]||(e[7]=Iu("td",null," ",-1)),e[8]||(e[8]=Iu("td",null," ",-1))]),Iu("tr",null,[e[9]||(e[9]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_irq),1),e[10]||(e[10]=Iu("td",null," ",-1)),e[11]||(e[11]=Iu("td",null," ",-1))]),Iu("tr",null,[e[12]||(e[12]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_raid_plugin),1),e[13]||(e[13]=Iu("td",null," ",-1)),e[14]||(e[14]=Iu("td",null," ",-1))]),Iu("tr",null,[e[15]||(e[15]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_sensors),1),e[16]||(e[16]=Iu("td",null," ",-1)),e[17]||(e[17]=Iu("td",null," ",-1))]),Iu("tr",null,[e[18]||(e[18]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_wifi_module),1),e[19]||(e[19]=Iu("td",null," ",-1)),e[20]||(e[20]=Iu("td",null," ",-1))]),Iu("tr",null,[e[21]||(e[21]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_processes),1),e[22]||(e[22]=Iu("td",null," ",-1)),e[23]||(e[23]=Iu("td",null," ",-1))]),Iu("tr",null,[e[24]||(e[24]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_left_sidebar),1),e[25]||(e[25]=Iu("td",null," ",-1)),e[26]||(e[26]=Iu("td",null," ",-1))]),Iu("tr",null,[e[27]||(e[27]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_quick_look),1),e[28]||(e[28]=Iu("td",null," ",-1)),e[29]||(e[29]=Iu("td",null," ",-1))]),Iu("tr",null,[e[30]||(e[30]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_cpu_mem_swap),1),e[31]||(e[31]=Iu("td",null," ",-1)),e[32]||(e[32]=Iu("td",null," ",-1))]),Iu("tr",null,[e[33]||(e[33]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_all),1),e[34]||(e[34]=Iu("td",null," ",-1)),e[35]||(e[35]=Iu("td",null," ",-1))])])]),e[36]||(e[36]=Mu('
 

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

',5))])):Ru("v-if",!0)}]]),tm={id:"alerts",class:"plugin"},em={key:0,class:"title"},rm={key:1,class:"title"},nm={class:"table table-sm table-borderless"},im={scope:"row"},om={scope:"row"},sm={scope:"row"};var am=r(2543);const lm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.alert},alerts(){return(this.stats||[]).map((t=>{const e={};if(e.state=t.state,e.type=t.type,e.begin=1e3*t.begin,e.end=1e3*t.end,e.ongoing=-1==t.end,e.min=t.min,e.avg=t.avg,e.max=t.max,t.top.length>0&&(e.top=": "+t.top.join(", ")),!e.ongoing){const t=e.end-e.begin,r=parseInt(t/1e3%60),n=parseInt(t/6e4%60),i=parseInt(t/36e5%24);e.duration=(0,am.padStart)(i,2,"0")+":"+(0,am.padStart)(n,2,"0")+":"+(0,am.padStart)(r,2,"0")}return e}))},hasAlerts(){return this.countAlerts>0},countAlerts(){return this.alerts.length},hasOngoingAlerts(){return this.countOngoingAlerts>0},countOngoingAlerts(){return this.alerts.filter((({ongoing:t})=>t)).length}},watch:{countOngoingAlerts(){this.countOngoingAlerts?zd.badge(this.countOngoingAlerts):zd.reset()}},methods:{formatDate(t){const e=(new Date).getTimezoneOffset(),r=Math.trunc(Math.abs(e)/60),n=Math.abs(e%60);let i=e<=0?"+":"-";i+=String(r).padStart(2,"0")+String(n).padStart(2,"0");const o=new Date(t);return String(o.getFullYear())+"-"+String(o.getMonth()+1).padStart(2,"0")+"-"+String(o.getDate()).padStart(2,"0")+" "+String(o.getHours()).padStart(2,"0")+":"+String(o.getMinutes()).padStart(2,"0")+":"+String(o.getSeconds()).padStart(2,"0")+"("+i+")"},clear(){fetch("api/4/events/clear/all",{method:"POST",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>product.value=t))}}},cm=(0,Yd.A)(lm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",tm,[o.hasAlerts?(xu(),Au("span",em,[Lu(" Warning or critical alerts (last "+As(o.countAlerts)+" entries) ",1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(xu(),Au("span",rm,"No warning or critical alert detected")),Iu("table",nm,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.alerts,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",im,[Iu("span",null,As(o.formatDate(e.begin)),1)]),Iu("td",om,[Iu("span",null,"("+As(e.ongoing?"ongoing":e.duration)+")",1)]),Iu("td",sm,[Al(Iu("span",null,As(e.state)+" on ",513),[[xp,!e.ongoing]]),Iu("span",{class:xs(e.state.toLowerCase())},As(e.type),3),Iu("span",null,"("+As(t.$filters.number(e.max,1))+")",1),Iu("span",null,As(e.top),1)])])))),128))])])])}]]),um={key:0,id:"cloud",class:"plugin"},pm={class:"title"};const dm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cloud},provider(){return void 0!==this.stats.id?`${stats.platform}`:null},instance(){const{stats:t}=this;return void 0!==this.stats.id?`${t.type} instance ${t.name} (${t.region})`:null}}},mm=(0,Yd.A)(dm,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(xu(),Au("section",um,[Iu("span",pm,As(o.provider),1),Lu(" "+As(o.instance),1)])):Ru("v-if",!0)}]]),fm={id:"connections",class:"plugin"},hm={class:"table table-sm table-borderless margin-bottom"},gm={class:"text-end"},bm={class:"text-end"},ym={class:"text-end"},vm={class:"text-end"};const xm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.connections},view(){return this.data.views.connections},listen(){return this.stats.LISTEN},initiated(){return this.stats.initiated},established(){return this.stats.ESTABLISHED},terminated(){return this.stats.terminated},tracked(){return{count:this.stats.nf_conntrack_count,max:this.stats.nf_conntrack_max}}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},wm=(0,Yd.A)(xm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",fm,[Iu("table",hm,[e[5]||(e[5]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"TCP CONNECTIONS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("td",{scope:"row"},"Listen",-1)),Iu("td",gm,As(o.listen),1)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"Initiated",-1)),Iu("td",bm,As(o.initiated),1)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"Established",-1)),Iu("td",ym,As(o.established),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"Terminated",-1)),Iu("td",vm,As(o.terminated),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"Tracked",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("nf_conntrack_percent")])},As(o.tracked.count)+"/"+As(o.tracked.max),3)])])])])}]]),_m={id:"cpu",class:"plugin"},km={class:"table-responsive"},Sm={class:"table-sm table-borderless"},Am={class:"justify-content-between"},Em={scope:"col"},Cm={class:"table table-sm table-borderless"},Tm={key:0,scope:"col"},Om={class:"d-none d-xl-block d-xxl-block"},Dm={class:"table table-sm table-borderless"},Im={scope:"col"},Pm={scope:"col",class:"text-end"},jm={scope:"col"},Nm={scope:"col",class:"text-end"},Lm={scope:"col"},Mm={scope:"col",class:"text-end"},Rm={key:0,scope:"col"},qm={scope:"col"},Bm={class:"d-none d-xxl-block"},$m={class:"table table-sm table-borderless"},Um={key:0,scope:"col"},Fm={scope:"col"},zm={scope:"col",class:"text-end"},Hm={key:0,scope:"col"},Vm={key:1,scope:"col",class:"text-end"},Gm={key:0,scope:"col"},Wm={key:1,scope:"col",class:"text-end"};const Km={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cpu},view(){return this.data.views.cpu},isLinux(){return this.data.isLinux},isSunOS(){return this.data.isSunOS},isWindows(){return this.data.isWindows},total(){return this.stats.total},user(){return this.stats.user},system(){return this.stats.system},idle(){return this.stats.idle},nice(){return this.stats.nice},irq(){return this.stats.irq},iowait(){return this.stats.iowait},dpc(){return this.stats.dpc},steal(){return this.stats.steal},guest(){return this.stats.guest},ctx_switches(){const{stats:t}=this;return t.ctx_switches?Math.floor(t.ctx_switches/t.time_since_update):null},interrupts(){const{stats:t}=this;return t.interrupts?Math.floor(t.interrupts/t.time_since_update):null},soft_interrupts(){const{stats:t}=this;return t.soft_interrupts?Math.floor(t.soft_interrupts/t.time_since_update):null},syscalls(){const{stats:t}=this;return t.syscalls?Math.floor(t.syscalls/t.time_since_update):null}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Xm=(0,Yd.A)(Km,[["render",function(t,e,r,n,i,o){return xu(),Au("section",_m,[Ru(" d-none d-xxl-block "),Iu("div",km,[Iu("table",Sm,[Iu("tbody",null,[Iu("tr",Am,[Iu("td",Em,[Iu("table",Cm,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"CPU",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("total")])},[Iu("span",null,As(o.total)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"col"},"user:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("user")])},[Iu("span",null,As(o.user)+"%",1)],2)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"col"},"system:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("system")])},[Iu("span",null,As(o.system)+"%",1)],2)]),Iu("tr",null,[null!=o.iowait?(xu(),Au("td",Tm,"iowait:")):Ru("v-if",!0),null!=o.iowait?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("iowait")])},[Iu("span",null,As(o.iowait)+"%",1)],2)):Ru("v-if",!0)])])])]),Iu("td",null,[Iu("template",Om,[Iu("table",Dm,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",Im,"idle:",512),[[xp,null!=o.idle]]),Al(Iu("td",Pm,[Iu("span",null,As(o.idle)+"%",1)],512),[[xp,null!=o.idle]])]),Iu("tr",null,[Al(Iu("td",jm,"irq:",512),[[xp,null!=o.irq]]),Al(Iu("td",Nm,[Iu("span",null,As(o.irq)+"%",1)],512),[[xp,null!=o.irq]])]),Iu("tr",null,[Al(Iu("td",Lm,"nice:",512),[[xp,null!=o.nice]]),Al(Iu("td",Mm,[Iu("span",null,As(o.nice)+"%",1)],512),[[xp,null!=o.nice]])]),Iu("tr",null,[null==o.iowait&&null!=o.dpc?(xu(),Au("td",Rm,"dpc:")):Ru("v-if",!0),null==o.iowait&&null!=o.dpc?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("dpc")])},[Iu("span",null,As(o.dpc)+"%",1)],2)):Ru("v-if",!0),Al(Iu("td",qm,"steal:",512),[[xp,null!=o.steal]]),Al(Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("steal")])},[Iu("span",null,As(o.steal)+"%",1)],2),[[xp,null!=o.steal]])])])])])]),Iu("td",null,[Iu("template",Bm,[Iu("table",$m,[Iu("tbody",null,[Iu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",Um," ctx_sw:")):Ru("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("ctx_switches")])},[Iu("span",null,As(o.ctx_switches),1)],2)):Ru("v-if",!0)]),Iu("tr",null,[Al(Iu("td",Fm,"inter:",512),[[xp,null!=o.interrupts]]),Al(Iu("td",zm,[Iu("span",null,As(o.interrupts),1)],512),[[xp,null!=o.interrupts]])]),Iu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Hm,"sw_int: ")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Vm,[Iu("span",null,As(o.soft_interrupts),1)]))]),Iu("tr",null,[o.isLinux&&null!=o.guest?(xu(),Au("td",Gm,"guest:")):Ru("v-if",!0),o.isLinux&&null!=o.guest?(xu(),Au("td",Wm,[Iu("span",null,As(o.guest)+"%",1)])):Ru("v-if",!0)])])])])])])])])])])}]]),Qm={key:0,id:"diskio",class:"plugin"},Zm={class:"table table-sm table-borderless margin-bottom"},Ym={scope:"col",class:"text-end w-25"},Jm={scope:"col",class:"text-end w-25"},tf={scope:"col",class:"text-end w-25"},ef={scope:"col",class:"text-end w-25"},rf={scope:"row",class:"text-truncate"};var nf=r(4728),of=r.n(nf);function sf(t,e){return af(t=8*Math.round(t),e)+"b"}function af(t,e){if(e=e||!1,isNaN(parseFloat(t))||!isFinite(t)||0==t)return t;const r=["Y","Z","E","P","T","G","M","K"],n={Y:12089258196146292e8,Z:11805916207174113e5,E:0x1000000000000000,P:0x4000000000000,T:1099511627776,G:1073741824,M:1048576,K:1024};for(var i=0;i1){var a=0;return s<10?a=2:s<100&&(a=1),e?a="MK"==o?0:(0,am.min)([1,a]):"K"==o&&(a=0),parseFloat(s).toFixed(a)+o}}return t.toFixed(0)}function lf(t){return void 0===t||""===t?"?":t}function cf(t,e,r){return e=e||0,r=r||" ",String(t).padStart(e,r)}function uf(t,e){return"function"!=typeof t.slice&&(t=String(t)),t.slice(0,e)}function pf(t,e,r=!0){return e=e||8,t.length>e?r?t.substring(0,e-1)+"_":"_"+t.substring(t.length-e+1):t}function df(t){if(void 0===t)return t;var e=function(t){var e=document.createElement("div");return e.innerText=t,e.innerHTML}(t),r=e.replace(/\n/g,"
");return of()(r)}function mf(t,e){return void 0===t||isNaN(t)?"-":new Intl.NumberFormat("en-US","number"==typeof e?{maximumFractionDigits:e}:e).format(t)}function ff(t){for(var e=0,r=0;r`${t}: ${e}`)).join(" / ")}const bf={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.diskio},view(){return this.data.views.diskio},disks(){const t=this.stats.map((t=>({name:t.disk_name,alias:void 0!==t.alias?t.alias:null,bitrate:{txps:af(t.read_bytes_rate_per_sec),rxps:af(t.write_bytes_rate_per_sec)},count:{txps:af(t.read_count_rate_per_sec),rxps:af(t.write_count_rate_per_sec)}}))).filter((t=>{const e=this.view[t.name].read_bytes_rate_per_sec,r=this.view[t.name].write_bytes_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,am.orderBy)(t,["name"])},hasDisks(){return this.disks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},yf=(0,Yd.A)(bf,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",Qm,[Iu("table",Zm,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"DISK I/O",-1)),Al(Iu("th",Ym,"Rps",512),[[xp,!o.args.diskio_iops]]),Al(Iu("th",Jm,"Wps",512),[[xp,!o.args.diskio_iops]]),Al(Iu("th",tf,"IORps",512),[[xp,o.args.diskio_iops]]),Al(Iu("th",ef,"IOWps",512),[[xp,o.args.diskio_iops]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",rf,As(t.$filters.minSize(e.alias?e.alias:e.name,16)),1),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"write_bytes_rate_per_sec")])},As(e.bitrate.txps),3),[[xp,!o.args.diskio_iops]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"read_bytes_rate_per_sec")])},As(e.bitrate.rxps),3),[[xp,!o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.txps),513),[[xp,o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.rxps),513),[[xp,o.args.diskio_iops]])])))),128))])])])):Ru("v-if",!0)}]]),vf={key:0,id:"containers",class:"plugin"},xf={class:"table-responsive d-md-none"},wf={class:"table table-sm table-borderless table-striped table-hover"},_f={scope:"col"},kf={scope:"col"},Sf={scope:"col"},Af={scope:"col"},Ef={class:"table-responsive d-none d-md-block"},Cf={class:"table table-sm table-borderless table-striped table-hover"},Tf={scope:"col"},Of={scope:"col"},Df={scope:"col"},If={scope:"col"},Pf={scope:"col"},jf={scope:"col"},Nf={scope:"col"},Lf={scope:"col"},Mf={scope:"col"},Rf={scope:"col"};const qf={props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.containers},views(){return this.data.views.containers},containers(){const{sorter:t}=this,e=(this.stats||[]).map((t=>{let e;return null!=t.memory_usage?(e=t.memory_usage,null!=t.memory_inactive_file&&(e-=t.memory_inactive_file)):e=void 0,{id:t.id,name:t.name,status:t.status,uptime:t.uptime,cpu_percent:t.cpu.total,memory_usage:e,limit:t.memory.limit,io_rx:t.io_rx,io_wx:t.io_wx,network_rx:t.network_rx,network_tx:t.network_tx,command:t.command,image:t.image,engine:t.engine,pod_id:t.pod_id}}));return(0,am.orderBy)(e,[t.column].map((t=>e=>e["memory_percent"===t?"memory_usage":t]??-1/0),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name},showPod(){return this.views.show_pod_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{io_counters:"disk IO",cpu_percent:"CPU consumption",memory_usage:"memory consumption",cpu_times:"uptime",name:"container name",None:"None"}[t]||t}})}}},methods:{getDisableStats:()=>Ud.getLimit("containers","containers_disable_stats")||[]}},Bf=(0,Yd.A)(qf,[["render",function(t,e,r,n,i,o){return o.containers.length?(xu(),Au("section",vf,[e[6]||(e[6]=Iu("span",{class:"title"},"CONTAINERS",-1)),Al(Iu("span",null,As(o.containers.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.containers.length>1]]),Iu("div",xf,[Iu("table",wf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",_f,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",kf,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Sf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Af,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs(["Paused"===e.status&&"careful","exited"===e.status&&"warning",!["Paused","exited"].includes(e.status)&&"ok"])},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.memory_usage??NaN)?"-":t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.limit??NaN)?"-":t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])]),Iu("div",Ef,[Iu("table",Cf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",Tf,"Engine",512),[[xp,o.showEngine]]),Al(Iu("td",Of,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",Df,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",If,"Uptime",512),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[4]||(e[4]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[5]||(e[5]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Pf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",jf,"IORps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Nf,"IOWps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Lf,"RXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Mf,"TXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Rf,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.engine),513),[[xp,o.showEngine]]),Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs(["Paused"===e.status&&"careful","exited"===e.status&&"warning",!["Paused","exited"].includes(e.status)&&"ok"])},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(e.uptime),513),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.memory_usage??NaN)?"-":t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.limit??NaN)?"-":t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.io_rx??NaN)?"-":t.$filters.bytes(e.io_rx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.io_wx??NaN)?"-":t.$filters.bytes(e.io_wx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.network_rx??NaN)?"-":t.$filters.bits(e.network_rx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.network_tx??NaN)?"-":t.$filters.bits(e.network_tx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])])])):Ru("v-if",!0)}]]),$f={key:0,id:"folders",class:"plugin"},Uf={class:"table table-sm table-borderless margin-bottom"},Ff={scope:"row"},zf={key:0,class:"visible-lg-inline"};const Hf={props:{data:{type:Object}},computed:{stats(){return this.data.stats.folders},folders(){return this.stats.map((t=>({path:t.path,size:t.size,errno:t.errno,careful:t.careful,warning:t.warning,critical:t.critical})))},hasFolders(){return this.folders.length>0}},methods:{getDecoration:t=>t.errno>0?"error":null!==t.critical&&t.size>1e6*t.critical?"critical":null!==t.warning&&t.size>1e6*t.warning?"warning":null!==t.careful&&t.size>1e6*t.careful?"careful":"ok"}},Vf=(0,Yd.A)(Hf,[["render",function(t,e,r,n,i,o){return o.hasFolders?(xu(),Au("section",$f,[Iu("table",Uf,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"FOLDERS"),Iu("th",{scope:"col",class:"text-end"},"Size")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.folders,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Ff,As(e.path),1),Iu("td",{class:xs(["text-end",o.getDecoration(e)])},[e.errno>0?(xu(),Au("span",zf,"?")):Ru("v-if",!0),Lu(" "+As(t.$filters.bytes(e.size)),1)],2)])))),128))])])])):Ru("v-if",!0)}]]),Gf={key:0,id:"fs",class:"plugin"},Wf={class:"table table-sm table-borderless margin-bottom"},Kf={key:0,scope:"col",class:"text-end w-25"},Xf={key:1,scope:"col",class:"text-end w-25"},Qf={scope:"row"},Zf={key:0,class:"visible-lg-inline"},Yf={scope:"row",class:"text-end"};const Jf={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.fs},view(){return this.data.views.fs},fileSystems(){const t=this.stats.map((t=>({name:t.device_name,mountPoint:t.mnt_point,percent:t.percent,size:t.size,used:t.used,free:t.free,alias:void 0!==t.alias?t.alias:null})));return(0,am.orderBy)(t,["mnt_point"])},hasFs(){return this.fileSystems.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},th=(0,Yd.A)(Jf,[["render",function(t,e,r,n,i,o){return o.hasFs?(xu(),Au("section",Gf,[Iu("table",Wf,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"FILE SYSTEM",-1)),o.args.fs_free_space?(xu(),Au("th",Xf,"Free")):(xu(),Au("th",Kf,"Used")),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end w-25"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.fileSystems,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Qf,[Lu(As(t.$filters.minSize(e.alias?e.alias:e.mountPoint,16,t.begin=!1))+" ",1),(e.alias?e.alias:e.mountPoint).length+e.name.length<=15?(xu(),Au("span",Zf," ("+As(e.name)+") ",1)):Ru("v-if",!0)]),o.args.fs_free_space?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.free)),3)):(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.used)),3)),Iu("td",Yf,As(t.$filters.bytes(e.size)),1)])))),128))])])])):Ru("v-if",!0)}]]),eh={key:0,id:"gpu",class:"plugin"},rh={class:"title text-truncate"},nh={key:0,class:"table-responsive"},ih={key:1,class:"col text-end"},oh={key:1,class:"col text-end"},sh={key:1,class:"col text-end"},ah={key:1,class:"table-responsive"},lh={class:"table table-sm table-borderless"},ch={class:"col"},uh={key:1,class:"col"},ph={key:3,class:"col text-end"},dh={key:2,class:"table-responsive"},mh={class:"table table-sm table-borderless"},fh={key:1,class:"col"},hh={key:1,class:"col"},gh={key:1,class:"col"};const bh={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.gpu},view(){return this.data.views.gpu},gpus(){return this.stats},name(){let t="GPU";const{stats:e}=this;return 1===e.length?t=e[0].name:e.length&&(t=`${e.length} GPU ${e[0].name}`),t},mean(){const t={proc:null,mem:null,temperature:null},{stats:e}=this;if(!e.length)return t;for(const r of e)t.proc+=r.proc,t.mem+=r.mem,t.temperature+=r.temperature;return t.proc=t.proc/e.length,t.mem=t.mem/e.length,t.temperature=t.temperature/e.length,t}},methods:{getDecoration(t,e){if(void 0!==this.view[t][e])return this.view[t][e].decoration.toLowerCase()},getMeanDecoration:t=>"DEFAULT"}},yh=(0,Yd.A)(bh,[["render",function(t,e,r,n,i,o){return null!=o.gpus?(xu(),Au("section",eh,[Iu("div",rh,As(o.name),1),Ru(" single gpu "),1===o.gpus.length?(xu(),Au("div",nh,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("table",{key:n,class:"table table-sm table-borderless"},[Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{class:"col"},"proc:",-1)),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",ih,e[0]||(e[0]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"%",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",oh,e[2]||(e[2]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",{class:"col"},"temp:",-1)),null!=r.temperature?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"temperature")])},[Iu("span",null,As(t.$filters.number(r.temperature,0)),1)],2)):Ru("v-if",!0),null==r.temperature?(xu(),Au("td",sh,e[4]||(e[4]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])))),128))])):Ru("v-if",!0),Ru(" multiple gpus - one line per gpu (no mean) "),!o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",ah,[Iu("table",lh,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("tr",{key:n},[Iu("td",ch,As(r.gpu_id)+":",1),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",uh,e[6]||(e[6]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0),e[8]||(e[8]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:2,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"% ",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",ph,e[7]||(e[7]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0),Ru(" multiple gpus - mean "),o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",dh,[Iu("table",mh,[Iu("tbody",null,[Iu("tr",null,[e[10]||(e[10]=Iu("td",{class:"col"},"proc mean:",-1)),null!=o.mean.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("proc")])},[Iu("span",null,As(t.$filters.number(o.mean.proc,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.proc?(xu(),Au("td",fh,e[9]||(e[9]=[Iu("span",null,"N/A",-1),Lu(">")]))):Ru("v-if",!0)]),Iu("tr",null,[e[12]||(e[12]=Iu("td",{class:"col"},"mem mean:",-1)),null!=o.mean.mem?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("mem")])},[Iu("span",null,As(t.$filters.number(o.mean.mem,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.mem?(xu(),Au("td",hh,e[11]||(e[11]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[14]||(e[14]=Iu("td",{class:"col"},"temp mean:",-1)),null!=o.mean.temperature?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("temperature")])},[Iu("span",null,As(t.$filters.number(o.mean.temperature,0))+"°C",1)],2)):Ru("v-if",!0),null==o.mean.temperature?(xu(),Au("td",gh,e[13]||(e[13]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])])):Ru("v-if",!0)])):Ru("v-if",!0)}]]),vh={id:"system",class:"plugin"},xh={key:0,class:"critical"},wh={class:"title"};const _h={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},isDisconnected(){return"FAILURE"===this.store.status}}},kh=(0,Yd.A)(_h,[["render",function(t,e,r,n,i,o){return xu(),Au("section",vh,[o.isDisconnected?(xu(),Au("span",xh,"Disconnected from")):Ru("v-if",!0),Iu("span",wh,As(o.hostname),1)])}]]),Sh={key:0,id:"ip",class:"plugin"},Ah={key:0,class:"title"},Eh={key:1},Ch={key:2,class:"title"},Th={key:3},Oh={key:4,class:"text-truncate"};const Dh={props:{data:{type:Object}},computed:{ipStats(){return this.data.stats.ip},address(){return this.ipStats.address},gateway(){return this.ipStats.gateway},maskCdir(){return this.ipStats.mask_cidr},publicAddress(){return this.ipStats.public_address},publicInfo(){return this.ipStats.public_info_human}}},Ih=(0,Yd.A)(Dh,[["render",function(t,e,r,n,i,o){return o.address?(xu(),Au("section",Sh,[o.address?(xu(),Au("span",Ah,"IP")):Ru("v-if",!0),o.address?(xu(),Au("span",Eh,As(o.address)+"/"+As(o.maskCdir),1)):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Ch,"Pub")):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Th,As(o.publicAddress),1)):Ru("v-if",!0),o.publicInfo?(xu(),Au("span",Oh,As(o.publicInfo),1)):Ru("v-if",!0)])):Ru("v-if",!0)}]]),Ph={id:"irq",class:"plugin"},jh={class:"table table-sm table-borderless margin-bottom"},Nh={scope:"row"},Lh={scope:"row",class:"text-end"};const Mh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.irq},irqs(){return this.stats.map((t=>({irq_line:t.irq_line,irq_rate:t.irq_rate})))}}},Rh=(0,Yd.A)(Mh,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Ph,[Iu("table",jh,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"IRQ"),Iu("th",{scope:"col",class:"text-end"},"Rate/s")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.irqs,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Nh,As(t.irq_line),1),Iu("td",Lh,As(t.irq_rate),1)])))),128))])])])}]]),qh={key:0,id:"load",class:"plugin"},Bh={class:"table-responsive"},$h={class:"table table-sm table-borderless"},Uh={scope:"col",class:"text-end"},Fh={class:"text-end"};const zh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.load},view(){return this.data.views.load},cpucore(){return this.stats.cpucore},min1(){return this.stats.min1},min5(){return this.stats.min5},min15(){return this.stats.min15}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Hh=(0,Yd.A)(zh,[["render",function(t,e,r,n,i,o){return null!=o.cpucore?(xu(),Au("section",qh,[Iu("div",Bh,[Iu("table",$h,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"LOAD",-1)),Iu("td",Uh,As(o.cpucore)+"-core",1)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"1 min:",-1)),Iu("td",Fh,[Iu("span",null,As(t.$filters.number(o.min1,2)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"5 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min5")])},[Iu("span",null,As(t.$filters.number(o.min5,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"15 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min15")])},[Iu("span",null,As(t.$filters.number(o.min15,2)),1)],2)])])])])])):Ru("v-if",!0)}]]),Vh={id:"mem",class:"plugin"},Gh={class:"table-responsive"},Wh={class:"table-sm table-borderless"},Kh={class:"justify-content-between"},Xh={scope:"col"},Qh={class:"table table-sm table-borderless"},Zh={class:"text-end"},Yh={class:"d-none d-xl-block d-xxl-block"},Jh={class:"table table-sm table-borderless"},tg={scope:"col"},eg={scope:"col"},rg={scope:"col"},ng={scope:"col"},ig={scope:"col"},og={scope:"col"},sg={scope:"col"},ag={scope:"col"};const lg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.mem},view(){return this.data.views.mem},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free},active(){return this.stats.active},inactive(){return this.stats.inactive},buffers(){return this.stats.buffers},cached(){return this.stats.cached}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},cg=(0,Yd.A)(lg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Vh,[Ru(" d-none d-xxl-block "),Iu("div",Gh,[Iu("table",Wh,[Iu("tbody",null,[Iu("tr",Kh,[Iu("td",Xh,[Iu("table",Qh,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"MEM",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",Zh,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("free")])},[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)],2)])])])]),Iu("td",null,[Iu("template",Yh,[Iu("table",Jh,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",tg," active: ",512),[[xp,null!=o.active]]),Al(Iu("td",eg,[Iu("span",null,As(t.$filters.bytes(o.active)),1)],512),[[xp,null!=o.active]])]),Iu("tr",null,[Al(Iu("td",rg," inactive: ",512),[[xp,null!=o.inactive]]),Al(Iu("td",ng,[Iu("span",null,As(t.$filters.bytes(o.inactive)),1)],512),[[xp,null!=o.inactive]])]),Iu("tr",null,[Al(Iu("td",ig," buffers: ",512),[[xp,null!=o.buffers]]),Al(Iu("td",og,[Iu("span",null,As(t.$filters.bytes(o.buffers)),1)],512),[[xp,null!=o.buffers]])]),Iu("tr",null,[Al(Iu("td",sg," cached: ",512),[[xp,null!=o.cached]]),Al(Iu("td",ag,[Iu("span",null,As(t.$filters.bytes(o.cached)),1)],512),[[xp,null!=o.cached]])])])])])])])])])])])}]]),ug={id:"memswap",class:"plugin"},pg={class:"table-responsive"},dg={class:"table table-sm table-borderless"},mg={class:"text-end"},fg={class:"text-end"};const hg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.memswap},view(){return this.data.views.memswap},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},gg=(0,Yd.A)(hg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",ug,[Iu("div",pg,[Iu("table",dg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"SWAP",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",mg,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",fg,[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)])])])])])])}]]),bg={key:0,id:"network",class:"plugin"},yg={class:"table table-sm table-borderless margin-bottom"},vg={scope:"col",class:"text-end w-25"},xg={scope:"col",class:"text-end w-25"},wg={scope:"col",class:"text-end w-25"},_g={scope:"col",class:"text-end w-25"},kg={scope:"col",class:"text-end w-25"},Sg={scope:"col",class:"text-end w-25"},Ag={scope:"col",class:"text-end w-25"},Eg={scope:"col",class:"text-end w-25"},Cg={scope:"row",class:"visible-lg-inline text-truncate"},Tg={class:"text-end"},Og={class:"text-end"};const Dg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.network},view(){return this.data.views.network},networks(){const t=this.stats.map((t=>{const e=void 0!==t.alias?t.alias:null;return{interfaceName:t.interface_name,ifname:e||t.interface_name,bytes_recv_rate_per_sec:t.bytes_recv_rate_per_sec,bytes_sent_rate_per_sec:t.bytes_sent_rate_per_sec,bytes_all_rate_per_sec:t.bytes_all_rate_per_sec,bytes_recv:t.bytes_recv,bytes_sent:t.bytes_sent,bytes_all:t.bytes_all}})).filter((t=>{const e=this.view[t.interfaceName].bytes_recv_rate_per_sec,r=this.view[t.interfaceName].bytes_sent_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,am.orderBy)(t,["interfaceName"])},hasNetworks(){return this.networks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},Ig=(0,Yd.A)(Dg,[["render",function(t,e,r,n,i,o){return o.hasNetworks?(xu(),Au("section",bg,[Iu("table",yg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"NETWORK",-1)),Al(Iu("th",vg,"Rxps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",xg,"Txps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",wg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",_g,"Rx+Txps",512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",kg,"Rx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Sg,"Tx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Ag,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Eg,"Rx+Tx",512),[[xp,o.args.network_cumul&&o.args.network_sum]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.networks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Cg,As(t.$filters.minSize(e.alias?e.alias:e.ifname,16)),1),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_recv_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_recv_rate_per_sec):t.$filters.bits(e.bytes_recv_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_sent_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_sent_rate_per_sec):t.$filters.bits(e.bytes_sent_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Tg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all_rate_per_sec):t.$filters.bits(e.bytes_all_rate_per_sec)),513),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_recv):t.$filters.bits(e.bytes_recv)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_sent):t.$filters.bits(e.bytes_sent)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Og,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all):t.$filters.bits(e.bytes_all)),513),[[xp,o.args.network_cumul&&o.args.network_sum]])])))),128))])])])):Ru("v-if",!0)}]]),Pg={id:"now",class:"plugin"};const jg={props:{data:{type:Object}},computed:{date_custom(){return this.data.stats.now.custom}}},Ng=(0,Yd.A)(jg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Pg,[Iu("span",null,As(o.date_custom),1)])}]]),Lg={id:"percpu",class:"plugin"},Mg={class:"table-responsive"},Rg={class:"table-sm table-borderless"},qg={key:0,scope:"col"},Bg={key:1,scope:"col"},$g={key:0,scope:"col"},Ug={key:1,scope:"col"};const Fg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},percpuStats(){return this.data.stats.percpu}},methods:{getUserAlert:t=>Ud.getAlert("percpu","percpu_user_",t.user),getSystemAlert:t=>Ud.getAlert("percpu","percpu_system_",t.system),getIOWaitAlert:t=>Ud.getAlert("percpu","percpu_iowait_",t.system)}},zg=(0,Yd.A)(Fg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Lg,[Ru(" d-none d-xl-block d-xxl-block "),Iu("div",Mg,[Iu("table",Rg,[Iu("thead",null,[Iu("tr",null,[o.args.disable_quicklook?(xu(),Au("th",qg,"CPU")):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Bg,"total")):Ru("v-if",!0),e[0]||(e[0]=Iu("td",{scope:"col"},"user",-1)),e[1]||(e[1]=Iu("td",{scope:"col"},"system",-1)),e[2]||(e[2]=Iu("td",{scope:"col"},"idle",-1)),e[3]||(e[3]=Iu("td",{scope:"col"},"iowait",-1)),e[4]||(e[4]=Iu("td",{scope:"col"},"steel",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.percpuStats,((t,e)=>(xu(),Au("tr",{key:e},[o.args.disable_quicklook?(xu(),Au("td",$g,"CPU"+As(t.cpu_number),1)):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Ug,As(t.total)+"%",1)):Ru("v-if",!0),Iu("td",{scope:"col",class:xs(o.getUserAlert(t))},As(t.user)+"%",3),Iu("td",{scope:"col",class:xs(o.getSystemAlert(t))},As(t.system)+"%",3),Al(Iu("td",{scope:"col"},As(t.idle)+"%",513),[[xp,null!=t.idle]]),Al(Iu("td",{scope:"col",class:xs(o.getIOWaitAlert(t))},As(t.iowait)+"%",3),[[xp,null!=t.iowait]]),Al(Iu("td",{scope:"col"},As(t.steal)+"%",513),[[xp,null!=t.steal]])])))),128))])])])])}]]),Hg={key:0,id:"ports",class:"plugin"},Vg={class:"table table-sm table-borderless margin-bottom"},Gg={scope:"row"},Wg={key:0},Kg={key:1},Xg={key:2},Qg={key:3},Zg={key:0},Yg={key:1},Jg={key:2};const tb={props:{data:{type:Object}},computed:{stats(){return this.data.stats.ports},ports(){return this.stats},hasPorts(){return this.ports.length>0}},methods:{getPortDecoration:t=>null===t.status?"careful":!1===t.status?"critical":null!==t.rtt_warning&&t.status>t.rtt_warning?"warning":"ok",getWebDecoration:t=>null===t.status?"careful":-1===[200,301,302].indexOf(t.status)?"critical":null!==t.rtt_warning&&t.elapsed>t.rtt_warning?"warning":"ok"}},eb=(0,Yd.A)(tb,[["render",function(t,e,r,n,i,o){return o.hasPorts?(xu(),Au("section",Hg,[Iu("table",Vg,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.ports,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Gg,[Ru(" prettier-ignore "),Lu(" "+As(t.$filters.minSize(e.description?e.description:e.host+" "+e.port,20)),1)]),e.host?(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Wg,"Scanning")):"false"==e.status?(xu(),Au("span",Kg,"Timeout")):"true"==e.status?(xu(),Au("span",Xg,"Open")):(xu(),Au("span",Qg,As(t.$filters.number(1e3*e.status,0))+"ms",1))],2)):Ru("v-if",!0),e.url?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Zg,"Scanning")):"Error"==e.status?(xu(),Au("span",Yg,"Error")):(xu(),Au("span",Jg,"Code "+As(e.status),1))],2)):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0)}]]),rb={key:0},nb={key:1},ib={key:0,class:"row"},ob={class:"col-lg-18"};const sb={key:0,id:"amps",class:"plugin"},ab={class:"table table-sm table-borderless"},lb={key:0},cb=["innerHTML"];const ub={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((t=>null!==t.result))},hasAmps(){return this.processes.length>0}},methods:{getNameDecoration(t){const e=t.count,r=t.countmin,n=t.countmax;let i="ok";return i=e>0?(null===r||e>=r)&&(null===n||e<=n)?"ok":"careful":null===r?"ok":"critical",i}}},pb=(0,Yd.A)(ub,[["render",function(t,e,r,n,i,o){return o.hasAmps?(xu(),Au("section",sb,[Iu("table",ab,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",{class:xs(o.getNameDecoration(e))},As(e.name),3),e.regex?(xu(),Au("td",lb,As(e.count),1)):Ru("v-if",!0),Iu("td",{class:"process-result",innerHTML:t.$filters.nl2br(e.result)},null,8,cb)])))),128))])]),Ru('
\n
\n
\n {{ process.name }}\n
\n
{{ process.count }}
\n
\n
\n ')])):Ru("v-if",!0)}]]),db={id:"processcount",class:"plugin"},mb={class:"title"};const fb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.processcount},total(){return this.stats.total||0},running(){return this.stats.running||0},sleeping(){return this.stats.sleeping||0},stopped(){return this.stats.stopped||0},thread(){return this.stats.thread||0}}},hb=(0,Yd.A)(fb,[["render",function(t,e,r,n,i,o){return xu(),Au("section",db,[e[0]||(e[0]=Iu("span",{class:"title"},"TASKS",-1)),Iu("span",null,As(o.total)+" ("+As(o.thread)+" thr),",1),Iu("span",null,As(o.running)+" run,",1),Iu("span",null,As(o.sleeping)+" slp,",1),Iu("span",null,As(o.stopped)+" oth",1),Iu("span",null,As(o.args.programs?"Programs":"Threads"),1),Iu("span",mb,As(r.sorter.auto?"sorted automatically":"sorted"),1),Iu("span",null,"by "+As(r.sorter.getColumnLabel(r.sorter.column)),1)])}]]),gb={key:0,id:"processlist",class:"plugin"},bb={key:0,class:"extendedstats"},yb={class:"careful"},vb={class:"careful"},xb={class:"careful"},wb={class:"careful"},_b={class:"table-responsive d-lg-none"},kb={class:"table table-sm table-borderless table-striped table-hover"},Sb={scope:"col"},Ab=["onClick"],Eb={class:"table-responsive-md d-none d-lg-block"},Cb={class:"table table-sm table-borderless table-striped table-hover"},Tb={scope:"col"},Ob={scope:"col"},Db={scope:"col"},Ib={scope:"col"},Pb={scope:"col"},jb=["onClick"],Nb={key:0,scope:"row",class:""},Lb={key:1,id:"processlist",class:"plugin"},Mb={class:"table-responsive d-lg-none"},Rb={class:"table table-sm table-borderless table-striped table-hover"},qb={class:"table-responsive d-none d-lg-block"},Bb={class:"table table-sm table-borderless table-striped table-hover"},$b={class:""},Ub={class:""},Fb={scope:"row"},zb={scope:"row",class:"table-cell widtd-60"};const Hb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats_processlist(){return this.data.stats.processlist},stats_core(){return this.data.stats.core},cpucore(){return 0!==this.stats_core.log?this.stats_core.log:1},extended_stats(){return this.stats_processlist.find((t=>!0===t.extended_stats))||null},processes(){const{sorter:t}=this,e=(this.stats_processlist||[]).map((t=>this.updateProcess(t,this.data.stats.isWindows,this.args,this.cpucore)));return(0,am.orderBy)(e,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentProcesses(){return(this.stats_processlist||[]).some((({io_counters:t})=>t))},stats_programlist(){return this.data.stats.programlist},programs(){const{sorter:t}=this,e=this.data.stats.isWindows,r=(this.stats_programlist||[]).map((t=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=hf([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),null===t.cpu_percent&&(t.cpu_percent=-1),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t)));return(0,am.orderBy)(r,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentPrograms(){return(this.stats_programlist||[]).some((({io_counters:t})=>t))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{updateProcess:(t,e,r,n)=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=hf([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),t.irix=1,null===t.cpu_percent?t.cpu_percent=-1:r.disable_irix&&(t.irix=n),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.name=t.name+" "+t.cmdline.slice(1).join(" ").replace(/\n/g," "),t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t),getCpuPercentAlert:t=>Ud.getAlert("processlist","processlist_cpu_",t.cpu_percent),getMemoryPercentAlert:t=>Ud.getAlert("processlist","processlist_mem_",t.cpu_percent),getDisableStats:()=>Ud.getLimit("processlist","processlist_disable_stats")||[],setExtendedStats(t){fetch("api/4/processes/extended/"+t.toString(),{method:"POST"}).then((t=>t.json())),this.$forceUpdate()},disableExtendedStats(){fetch("api/4/processes/extended/disable",{method:"POST"}).then((t=>t.json())),this.$forceUpdate()}}},Vb={components:{GlancesPluginAmps:pb,GlancesPluginProcesscount:hb,GlancesPluginProcesslist:(0,Yd.A)(Hb,[["render",function(t,e,r,n,i,o){return xu(),Au(fu,null,[Ru(" Display processes "),o.args.programs?Ru("v-if",!0):(xu(),Au("section",gb,[null!==o.extended_stats?(xu(),Au("div",bb,[Iu("div",null,[e[24]||(e[24]=Iu("span",{class:"title"},"Pinned task: ",-1)),Iu("span",null,As(t.$filters.limitTo(o.extended_stats.cmdline,80)),1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.disableExtendedStats())},"Unpin")])]),Iu("div",null,[e[25]||(e[25]=Iu("span",null,"CPU Min/Max/Mean: ",-1)),Iu("span",yb,As(t.$filters.number(o.extended_stats.cpu_min,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_max,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_mean,1))+"%",1),e[26]||(e[26]=Iu("span",null,"Affinity: ",-1)),Iu("span",vb,As(o.extended_stats.cpu_affinity|t.length),1)]),Iu("div",null,[e[27]||(e[27]=Iu("span",null,"MEM Min/Max/Mean: ",-1)),Iu("span",xb,As(t.$filters.number(o.extended_stats.memory_min,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_max,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_mean,1))+"%",1),e[28]||(e[28]=Iu("span",null,"Memory info: ",-1)),Iu("span",wb,As(t.$filters.dictToString(o.extended_stats.memory_info)),1)])])):Ru("v-if",!0),Iu("div",_b,[Iu("table",kb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[1]||(e[1]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[2]||(e[2]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Sb," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[3]||(e[3]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[4]||(e[4]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,Ab)))),128))])])]),Iu("div",Eb,[Iu("table",Cb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[5]||(e[5]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[6]||(e[6]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Tb," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Ob," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Db," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[7]||(e[7]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","timemillis"===r.sorter.column&&"sort"]),onClick:e[8]||(e[8]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","num_threads"===r.sorter.column&&"sort"]),onClick:e[9]||(e[9]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Ib,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",Pb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[10]||(e[10]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[11]||(e[11]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[12]||(e[12]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e.pid)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),"?"==e.timeplus?Al((xu(),Au("td",Nb,"?",512)),[[xp,!o.getDisableStats().includes("cpu_times")]]):Ru("v-if",!0),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,jb)))),128))])])])])),Ru(" Display programs "),o.args.programs?(xu(),Au("section",Lb,[Iu("div",Mb,[Iu("table",Rb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[13]||(e[13]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[14]||(e[14]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[15]||(e[15]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])]),Iu("div",qb,[Iu("table",Bb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[16]||(e[16]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[17]||(e[17]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",$b," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Ub," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[18]||(e[18]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[19]||(e[19]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[20]||(e[20]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Fb,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",zb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[21]||(e[21]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[22]||(e[22]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[23]||(e[23]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])])):Ru("v-if",!0)],64)}]])},props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["username","name"].includes(t)},getColumnLabel:function(t){return{cpu_percent:"CPU consumption",memory_percent:"memory consumption",username:"user name",timemillis:"process time",cpu_times:"process time",io_counters:"disk IO",name:"process name",None:"None"}[t]||t}})}}}},Gb=(0,Yd.A)(Vb,[["render",function(t,e,r,n,i,o){const s=ec("glances-plugin-processcount"),a=ec("glances-plugin-amps"),l=ec("glances-plugin-processlist");return o.args.disable_process?(xu(),Au("div",rb,"PROCESSES DISABLED (press 'z' to display)")):(xu(),Au("div",nb,[Pu(s,{sorter:i.sorter,data:r.data},null,8,["sorter","data"]),o.args.disable_amps?Ru("v-if",!0):(xu(),Au("div",ib,[Iu("div",ob,[Pu(a,{data:r.data},null,8,["data"])])])),Pu(l,{sorter:i.sorter,data:r.data,"onUpdate:sorter":e[0]||(e[0]=t=>o.args.sort_processes_key=t)},null,8,["sorter","data"])]))}]]),Wb={id:"quicklook",class:"plugin"},Kb={class:"d-flex justify-content-between"},Xb={class:"text-start text-truncate"},Qb={key:0,class:"text-end d-none d-xxl-block frequency"},Zb={class:"table-responsive"},Yb={class:"table table-sm table-borderless"},Jb={key:0},ty={scope:"col",class:"progress"},ey=["aria-valuenow"],ry={scope:"col",class:"text-end"},ny={scope:"col"},iy={scope:"col",class:"progress"},oy=["aria-valuenow"],sy={scope:"col",class:"text-end"},ay={scope:"col"},ly={scope:"col",class:"progress"},cy=["aria-valuenow"],uy={scope:"col",class:"text-end"};const py={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return(this.stats.cpu_hz_current/1e6).toFixed(0)},cpu_hz(){return(this.stats.cpu_hz/1e6).toFixed(0)},percpus(){const t=this.stats.percpu.map((({cpu_number:t,total:e})=>({number:t,total:e}))),e=parseInt(this.config.percpu.max_cpu_display);if(this.stats.percpu.length>e){var r=t.sort((function(t,e){return e.total-t.total}));const n={number:"x",total:Number((r.slice(e).reduce(((t,{total:e})=>t+e),0)/(this.stats.percpu.length-e)).toFixed(1))};(r=r.slice(0,e)).push(n)}return this.stats.percpu.length<=e?t:r},stats_list_after_cpu(){return this.view.list.filter((t=>!t.includes("cpu")))}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},dy=(0,Yd.A)(py,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Wb,[Iu("div",Kb,[Iu("span",Xb,As(o.cpu_name),1),o.cpu_hz_current?(xu(),Au("span",Qb,As(o.cpu_hz_current)+"/"+As(o.cpu_hz)+"Ghz ",1)):Ru("v-if",!0)]),Iu("div",Zb,[Iu("table",Yb,[o.args.percpu?Ru("v-if",!0):(xu(),Au("tr",Jb,[e[0]||(e[0]=Iu("td",{scope:"col"},"CPU",-1)),Iu("td",ty,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":o.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.cpu}%;`)},"   ",14,ey)]),Iu("td",ry,[Iu("span",null,As(o.cpu)+"%",1)])])),o.args.percpu?(xu(!0),Au(fu,{key:1},oc(o.percpus,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ny,"CPU"+As(t.number),1),Iu("td",iy,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":t.total,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${t.total}%;`)},"   ",14,oy)]),Iu("td",sy,[Iu("span",null,As(t.total)+"%",1)])])))),128)):Ru("v-if",!0),(xu(!0),Au(fu,null,oc(o.stats_list_after_cpu,(t=>(xu(),Au("tr",null,[Iu("td",ay,As(t.toUpperCase()),1),Iu("td",ly,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration(t)}`),role:"progressbar","aria-valuenow":o.stats[t],"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.stats[t]}%;`)},"   ",14,cy)]),Iu("td",uy,[Iu("span",null,As(o.stats[t])+"%",1)])])))),256))])])])}]]),my={key:0,id:"raid",class:"plugin"},fy={class:"table table-sm table-borderless margin-bottom"},hy={scope:"col"},gy={scope:"row"},by={class:"warning"};const yy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const t=Object.entries(this.stats).map((([t,e])=>{const r=Object.entries(e.components).map((([t,e])=>({number:e,name:t})));return{name:t,type:null==e.type?"UNKNOWN":e.type,used:e.used,available:e.available,status:e.status,degraded:e.used0}},methods:{getAlert:t=>t.inactive?"critical":t.degraded?"warning":"ok"}},vy=(0,Yd.A)(yy,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",my,[Iu("table",fy,[Iu("thead",null,[Iu("tr",null,[Iu("th",hy,"RAID disks "+As(o.disks.length),1),e[0]||(e[0]=Iu("th",{scope:"col",class:"text-end"},"Used",-1)),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",gy,[Lu(As(t.type.toUpperCase())+" "+As(t.name)+" ",1),Al(Iu("div",by,"└─ Degraded mode",512),[[xp,t.degraded]]),Al(Iu("div",null,"   └─ "+As(t.config),513),[[xp,t.degraded]]),Al(Iu("div",{class:"critical"},"└─ Status "+As(t.status),513),[[xp,t.inactive]]),t.inactive?(xu(!0),Au(fu,{key:0},oc(t.components,((e,r)=>(xu(),Au("div",{key:r},"    "+As(r===t.components.length-1?"└─":"├─")+" disk "+As(e.number)+": "+As(e.name),1)))),128)):Ru("v-if",!0)]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.used),3),[[xp,"active"==t.status]]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.available),3),[[xp,"active"==t.status]])])))),128))])])])):Ru("v-if",!0)}]]),xy={key:0,id:"smart",class:"plugin"},wy={class:"table table-sm table-borderless margin-bottom"},_y={scope:"row"},ky={scope:"row"},Sy={scope:"row",class:"text-end text-truncate"};const Ay={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((t=>({name:t.DeviceName,details:Object.entries(t).filter((([t])=>"DeviceName"!==t)).sort((([,t],[,e])=>t.namee.name?1:0)).map((([t,e])=>e))})))},hasDrives(){return this.drives.length>0}}},Ey=(0,Yd.A)(Ay,[["render",function(t,e,r,n,i,o){return o.hasDrives?(xu(),Au("section",xy,[Iu("table",wy,[e[1]||(e[1]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SMART DISKS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.drives,((t,r)=>(xu(),Au(fu,{key:r},[Iu("tr",null,[Iu("td",_y,As(t.name),1),e[0]||(e[0]=Iu("td",{scope:"col",class:"text-end"},null,-1))]),(xu(!0),Au(fu,null,oc(t.details,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ky,As(t.name),1),Iu("td",Sy,As(t.raw),1)])))),128))],64)))),128))])])])):Ru("v-if",!0)}]]),Cy={key:0,id:"sensors",class:"plugin"},Ty={class:"table table-sm table-borderless"},Oy={scope:"row"};const Dy={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},view(){return this.data.views.sensors},sensors(){return this.stats.map((t=>(this.args.fahrenheit&&"battery"!=t.type&&"fan_speed"!=t.type&&(t.value=parseFloat(1.8*t.value+32).toFixed(1),t.unit="F"),t)))},hasSensors(){return this.sensors.length>0}},methods:{getDecoration(t){if(void 0!==this.view[t].value.decoration)return this.view[t].value.decoration.toLowerCase()}}},Iy=(0,Yd.A)(Dy,[["render",function(t,e,r,n,i,o){return o.hasSensors?(xu(),Au("section",Cy,[Iu("table",Ty,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SENSORS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.sensors,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Oy,As(t.label),1),Iu("td",{class:xs(["text-end",o.getDecoration(t.label)])},As(t.value)+As(t.unit),3)])))),128))])])])):Ru("v-if",!0)}]]),Py={id:"system",class:"plugin"},jy={key:0,class:"critical"},Ny={class:"title"},Ly={key:1,class:"text-truncate"};const My={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},Ry=(0,Yd.A)(My,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Py,[o.isDisconnected?(xu(),Au("span",jy,"Disconnected from")):Ru("v-if",!0),Iu("span",Ny,As(o.hostname),1),o.isDisconnected?Ru("v-if",!0):(xu(),Au("span",Ly,As(o.humanReadableName),1))])}]]),qy={id:"uptime",class:"plugin"};const By={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},$y=(0,Yd.A)(By,[["render",function(t,e,r,n,i,o){return xu(),Au("section",qy,[Iu("span",null,"Uptime: "+As(o.value),1)])}]]),Uy={key:0,id:"vms",class:"plugin"},Fy={class:"table table-sm table-borderless table-striped table-hover"};const zy={props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.vms},views(){return this.data.views.vms},vms(){const{sorter:t}=this,e=(this.stats||[]).map((t=>({id:t.id,name:t.name,status:null!=t.status?t.status:"-",cpu_count:null!=t.cpu_count?t.cpu_count:"-",cpu_time:null!=t.cpu_time?t.cpu_time:"-",cpu_time_rate_per_sec:null!=t.cpu_time_rate_per_sec?t.cpu_time_rate_per_sec:"?",memory_usage:null!=t.memory_usage?t.memory_usage:"-",memory_total:null!=t.memory_total?t.memory_total:"-",load_1min:null!=t.load_1min?t.load_1min:"-",load_5min:null!=t.load_5min?t.load_5min:"-",load_15min:null!=t.load_15min?t.load_15min:"-",release:t.release,image:t.image,engine:t.engine,engine_version:t.engine_version})));return(0,am.orderBy)(e,[t.column].reduce(((t,e)=>("memory_usage"===e&&(e=["memory_usage"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["load_1min","cpu_time","memory_usage","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_time",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{load_1min:"load",cpu_time:"CPU time",memory_usage:"memory consumption",name:"VM name",None:"None"}[t]||t}})}}}},Hy=(0,Yd.A)(zy,[["render",function(t,e,r,n,i,o){return o.vms.length?(xu(),Au("section",Uy,[e[8]||(e[8]=Iu("span",{class:"title"},"VMs",-1)),Al(Iu("span",null,As(o.vms.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.vms.length>1]]),Iu("table",Fy,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",null,"Engine",512),[[xp,o.showEngine]]),Iu("td",{class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),e[4]||(e[4]=Iu("td",null,"Status",-1)),e[5]||(e[5]=Iu("td",null,"Core",-1)),Iu("td",{class:xs(["sortable","cpu_time"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_time")}," CPU% ",2),Iu("td",{class:xs(["sortable","memory_usage"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_usage")}," MEM ",2),e[6]||(e[6]=Iu("td",null,"/ MAX",-1)),Iu("td",{class:xs(["sortable","load_1min"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="load_1min")}," LOAD 1/5/15min ",2),e[7]||(e[7]=Iu("td",null,"Release",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.vms,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",null,As(e.engine),513),[[xp,o.showEngine]]),Iu("td",null,As(e.name),1),Iu("td",{class:xs("stopped"==e.status?"careful":"ok")},As(e.status),3),Iu("td",null,As(t.$filters.number(e.cpu_count,1)),1),Iu("td",null,As(t.$filters.number(e.cpu_time,1)),1),Iu("td",null,As(t.$filters.bytes(e.memory_usage)),1),Iu("td",null," / "+As(t.$filters.bytes(e.memory_total)),1),Iu("td",null,As(t.$filters.number(e.load_1min))+"/"+As(t.$filters.number(e.load_5min))+"/"+As(t.$filters.number(e.load_15min)),1),Iu("td",null,As(e.release),1)])))),128))])])])):Ru("v-if",!0)}]]),Vy={key:0,id:"wifi",class:"plugin"},Gy={class:"table table-sm table-borderless margin-bottom"},Wy={scope:"row"};const Ky={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const t=this.stats.map((t=>{if(""!==t.ssid)return{ssid:t.ssid,quality_level:t.quality_level}})).filter(Boolean);return(0,am.orderBy)(t,["ssid"])},hasHotpots(){return this.hotspots.length>0}},methods:{getDecoration(t,e){if(void 0!==this.view[t.ssid][e])return this.view[t.ssid][e].decoration.toLowerCase()}}},Xy=(0,Yd.A)(Ky,[["render",function(t,e,r,n,i,o){return o.hasHotpots?(xu(),Au("section",Vy,[Iu("table",Gy,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"WIFI"),Iu("th",{scope:"col",class:"text-end"},"dBm")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.hotspots,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Wy,As(t.$filters.limitTo(e.ssid,20)),1),Iu("td",{scope:"row",class:xs(["text-end",o.getDecoration(e,"quality_level")])},As(e.quality_level),3)])))),128))])])])):Ru("v-if",!0)}]]),Qy=JSON.parse('{"H":["network","ports","wifi","connections","diskio","fs","irq","folders","raid","smart","sensors"]}'),Zy={components:{GlancesHelp:Jd,GlancesPluginAlert:cm,GlancesPluginCloud:mm,GlancesPluginConnections:wm,GlancesPluginCpu:Xm,GlancesPluginDiskio:yf,GlancesPluginContainers:Bf,GlancesPluginFolders:Vf,GlancesPluginFs:th,GlancesPluginGpu:yh,GlancesPluginHostname:kh,GlancesPluginIp:Ih,GlancesPluginIrq:Rh,GlancesPluginLoad:Hh,GlancesPluginMem:cg,GlancesPluginMemswap:gg,GlancesPluginNetwork:Ig,GlancesPluginNow:Ng,GlancesPluginPercpu:zg,GlancesPluginPorts:eb,GlancesPluginProcess:Gb,GlancesPluginQuicklook:dy,GlancesPluginRaid:vy,GlancesPluginSensors:Iy,GlancesPluginSmart:Ey,GlancesPluginSystem:Ry,GlancesPluginUptime:$y,GlancesPluginVms:Hy,GlancesPluginWifi:Xy},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},data(){return this.store.data||{}},dataLoaded(){return void 0!==this.store.data},hasGpu(){return this.store.data.stats.gpu.length>0},isLinux(){return this.store.data.isLinux},title(){const{data:t}=this,e=t.stats&&t.stats.system&&t.stats.system.hostname||"";return e?`${e} - Glances`:"Glances"},leftMenu(){return void 0!==this.config.outputs&&void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):Qy.H}},watch:{title(){document&&(document.title=this.title)}},mounted(){const t=window.__GLANCES__||{},e=isFinite(t["refresh-time"])?parseInt(t["refresh-time"],10):void 0;Fd.init(e),this.setupHotKeys()},beforeUnmount(){Ld.unbind()},methods:{setupHotKeys(){Ld("a",(()=>{this.store.args.sort_processes_key=null})),Ld("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),Ld("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),Ld("u",(()=>{this.store.args.sort_processes_key="username"})),Ld("p",(()=>{this.store.args.sort_processes_key="name"})),Ld("i",(()=>{this.store.args.sort_processes_key="io_counters"})),Ld("t",(()=>{this.store.args.sort_processes_key="timemillis"})),Ld("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),Ld("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),Ld("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),Ld("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),Ld("j",(()=>{this.store.args.programs=!this.store.args.programs})),Ld("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),Ld("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),Ld("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),Ld("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),Ld("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),Ld("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),Ld("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),Ld("b",(()=>{this.store.args.byte=!this.store.args.byte})),Ld("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),Ld("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),Ld("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),Ld("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),Ld("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),Ld("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),Ld("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),Ld("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),Ld("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),Ld("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),Ld("5",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook,this.store.args.disable_cpu=!this.store.args.disable_cpu,this.store.args.disable_mem=!this.store.args.disable_mem,this.store.args.disable_memswap=!this.store.args.disable_memswap,this.store.args.disable_load=!this.store.args.disable_load,this.store.args.disable_gpu=!this.store.args.disable_gpu})),Ld("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),Ld("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),Ld("shift+V",(()=>{this.store.args.disable_vms=!this.store.args.disable_vms})),Ld("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi})),Ld("0",(()=>{this.store.args.disable_irix=!this.store.args.disable_irix}))}}};const Yy=Fp((0,Yd.A)(Zy,[["render",function(t,e,r,n,i,o){const s=ec("glances-help"),a=ec("glances-plugin-hostname"),l=ec("glances-plugin-uptime"),c=ec("glances-plugin-system"),u=ec("glances-plugin-ip"),p=ec("glances-plugin-now"),d=ec("glances-plugin-cloud"),m=ec("glances-plugin-quicklook"),f=ec("glances-plugin-cpu"),h=ec("glances-plugin-gpu"),g=ec("glances-plugin-mem"),b=ec("glances-plugin-memswap"),y=ec("glances-plugin-load"),v=ec("glances-plugin-vms"),x=ec("glances-plugin-containers"),w=ec("glances-plugin-process"),_=ec("glances-plugin-alert");return o.dataLoaded?o.args.help_tag?(xu(),Eu(s,{key:1})):(xu(),Au("main",Gp,[Ru(" Display minimal header on low screen size (smarthphone) "),Iu("div",Wp,[Iu("div",Kp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Xp,[Pu(a,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",Qp,[Pu(l,{data:o.data},null,8,["data"])]))])]),Ru(" Display standard header on others screen sizes "),Iu("div",Zp,[Iu("div",Yp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Jp,[Pu(c,{data:o.data},null,8,["data"])])),o.args.disable_ip?Ru("v-if",!0):(xu(),Au("div",td,[Pu(u,{data:o.data},null,8,["data"])])),o.args.disable_now?Ru("v-if",!0):(xu(),Au("div",ed,[Pu(p,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",rd,[Pu(l,{data:o.data},null,8,["data"])]))])]),Iu("div",nd,[o.args.disable_cloud?Ru("v-if",!0):(xu(),Au("div",id,[Pu(d,{data:o.data},null,8,["data"])]))]),Ru(" Display top menu with CPU, MEM, LOAD..."),Iu("div",od,[Ru(" Quicklook "),o.args.disable_quicklook?Ru("v-if",!0):(xu(),Au("div",sd,[Pu(m,{data:o.data},null,8,["data"])])),Ru(" CPU "),o.args.disable_cpu&&o.args.percpu?Ru("v-if",!0):(xu(),Au("div",ad,[Pu(f,{data:o.data},null,8,["data"])])),Ru(' TODO: percpu need to be refactor\n
\n \n
\n
\n \n
'),Ru(" GPU "),!o.args.disable_gpu&&o.hasGpu?(xu(),Au("div",ld,[Pu(h,{data:o.data},null,8,["data"])])):Ru("v-if",!0),Ru(" MEM "),o.args.disable_mem?Ru("v-if",!0):(xu(),Au("div",cd,[Pu(g,{data:o.data},null,8,["data"])])),Ru(" SWAP "),o.args.disable_memswap?Ru("v-if",!0):(xu(),Au("div",ud,[Pu(b,{data:o.data},null,8,["data"])])),Ru(" LOAD "),o.args.disable_load?Ru("v-if",!0):(xu(),Au("div",pd,[Pu(y,{data:o.data},null,8,["data"])]))]),Ru(" Display bottom of the screen with sidebar and processlist "),Iu("div",dd,[Iu("div",md,[o.args.disable_left_sidebar?Ru("v-if",!0):(xu(),Au("div",{key:0,class:xs(["col-3 d-none d-md-block",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[(xu(!0),Au(fu,null,oc(o.leftMenu,(t=>{return xu(),Au(fu,null,[o.args[`disable_${t}`]?Ru("v-if",!0):(xu(),Eu((e=`glances-plugin-${t}`,Wo(e)?nc(tc,e,!1)||e:e||rc),{key:0,id:`${t}`,data:o.data},null,8,["id","data"]))],64);var e})),256))],2)),Iu("div",{class:xs(["col",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[o.args.disable_vms?Ru("v-if",!0):(xu(),Eu(v,{key:0,data:o.data},null,8,["data"])),o.args.disable_containers?Ru("v-if",!0):(xu(),Eu(x,{key:1,data:o.data},null,8,["data"])),Pu(w,{data:o.data},null,8,["data"]),o.args.disable_alert?Ru("v-if",!0):(xu(),Eu(_,{key:2,data:o.data},null,8,["data"]))],2)])])])):(xu(),Au("div",Vp,e[0]||(e[0]=[Iu("div",{class:"loader"},"Glances is loading...",-1)])))}]]));Yy.config.globalProperties.$filters=e,Yy.mount("#app")})()})(); \ No newline at end of file diff --git a/glances/plugins/containers/__init__.py b/glances/plugins/containers/__init__.py index fb585e33..25d45015 100644 --- a/glances/plugins/containers/__init__.py +++ b/glances/plugins/containers/__init__.py @@ -51,6 +51,14 @@ fields_description = { 'description': 'Container CPU consumption', 'unit': 'percent', }, + 'memory_inactive_file': { + 'description': 'Container memory inactive file', + 'unit': 'byte', + }, + 'memory_limit': { + 'description': 'Container memory limit', + 'unit': 'byte', + }, 'memory_usage': { 'description': 'Container memory usage', 'unit': 'byte', diff --git a/glances/plugins/containers/engines/docker.py b/glances/plugins/containers/engines/docker.py index e2fb5d06..510516f4 100644 --- a/glances/plugins/containers/engines/docker.py +++ b/glances/plugins/containers/engines/docker.py @@ -341,6 +341,8 @@ class DockerExtension: stats['memory_usage'] = stats['memory'].get('usage') if stats['memory'].get('cache') is not None: stats['memory_usage'] -= stats['memory']['cache'] + stats['memory_inactive_file'] = stats['memory'].get('inactive_file') + stats['memory_limit'] = stats['memory'].get('limit') if all(k in stats['io'] for k in ('ior', 'iow', 'time_since_update')): stats['io_rx'] = stats['io']['ior'] // stats['io']['time_since_update'] diff --git a/glances/plugins/containers/engines/podman.py b/glances/plugins/containers/engines/podman.py index 008e09f7..10a5eaca 100644 --- a/glances/plugins/containers/engines/podman.py +++ b/glances/plugins/containers/engines/podman.py @@ -379,6 +379,8 @@ class PodmanExtension: stats['memory_usage'] = stats['memory'].get('usage') if stats['memory'].get('cache') is not None: stats['memory_usage'] -= stats['memory']['cache'] + stats['memory_inactive_file'] = stats['memory'].get('inactive_file') + stats['memory_limit'] = stats['memory'].get('limit') if all(k in stats['io'] for k in ('ior', 'iow', 'time_since_update')): stats['io_rx'] = stats['io']['ior'] // stats['io']['time_since_update'] diff --git a/glances/plugins/plugin/model.py b/glances/plugins/plugin/model.py index 45e9805f..df988044 100644 --- a/glances/plugins/plugin/model.py +++ b/glances/plugins/plugin/model.py @@ -189,15 +189,16 @@ class GlancesPluginModel: def update_stats_history(self): """Update stats history.""" # Build the history - if not (self.get_export() and self.history_enable()): + _get_export = self.get_export() + if not (_get_export and self.history_enable()): return # Itern through items history item_name = '' if self.get_key() is None else self.get_key() for i in self.get_items_history_list(): - if isinstance(self.get_export(), list): + if isinstance(_get_export, list): # Stats is a list of data # Iter through stats (for example, iter through network interface) - for l_export in self.get_export(): + for l_export in _get_export: if i['name'] in l_export: self.stats_history.add( nativestr(l_export[item_name]) + '_' + nativestr(i['name']), @@ -210,7 +211,7 @@ class GlancesPluginModel: # Add the item to the history directly self.stats_history.add( nativestr(i['name']), - self.get_export()[i['name']], + _get_export[i['name']], description=i['description'], history_max_size=self._limits['history_size'], )