fix GUI notifications
This commit is contained in:
parent
55f61390ad
commit
afec6aff61
@ -271,11 +271,14 @@ def send_notify_warn():
|
|||||||
else:
|
else:
|
||||||
|
|
||||||
title = 'Low memory'
|
title = 'Low memory'
|
||||||
|
body = 'Save your unsaved data!'
|
||||||
|
|
||||||
|
""""
|
||||||
body = 'MemAvail: {}%\nSwapFree: {}%'.format(
|
body = 'MemAvail: {}%\nSwapFree: {}%'.format(
|
||||||
round(mem_available / mem_total * 100),
|
round(mem_available / mem_total * 100),
|
||||||
round(swap_free / (swap_total + 0.1) * 100)
|
round(swap_free / (swap_total + 0.1) * 100)
|
||||||
)
|
)
|
||||||
|
"""
|
||||||
|
|
||||||
start_thread(send_notification, title, body)
|
start_thread(send_notification, title, body)
|
||||||
|
|
||||||
@ -289,7 +292,7 @@ def send_notify(threshold, name, pid):
|
|||||||
pid: str process pid
|
pid: str process pid
|
||||||
"""
|
"""
|
||||||
|
|
||||||
title = 'Freeze prevention'
|
title = 'System hang prevention'
|
||||||
|
|
||||||
if hide_corrective_action_type:
|
if hide_corrective_action_type:
|
||||||
body = 'Corrective action applied'
|
body = 'Corrective action applied'
|
||||||
@ -314,7 +317,7 @@ def send_notify_etc(pid, name, command):
|
|||||||
name: str process name
|
name: str process name
|
||||||
pid: str process pid
|
pid: str process pid
|
||||||
"""
|
"""
|
||||||
title = 'Freeze prevention'
|
title = 'System hang prevention'
|
||||||
if hide_corrective_action_type:
|
if hide_corrective_action_type:
|
||||||
body = 'Corrective action applied'
|
body = 'Corrective action applied'
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user