mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-13 22:09:17 +00:00
perf: notification i18n
This commit is contained in:
@@ -22,7 +22,7 @@ class ServerPerformanceMessage(SystemMessage):
|
||||
self.terms_with_errors = terms_with_errors
|
||||
|
||||
def get_html_msg(self) -> dict:
|
||||
subject = gettext("Terminal health check warning")
|
||||
subject = gettext("Component health check warning")
|
||||
context = {
|
||||
'terms_with_errors': self.terms_with_errors
|
||||
}
|
||||
@@ -55,7 +55,7 @@ class ServerPerformanceMessage(SystemMessage):
|
||||
for item, data in items_mapper.items():
|
||||
msg = data['alarm_msg_format']
|
||||
max_threshold = data['max_threshold']
|
||||
value = 123 // i+1
|
||||
value = 123 // i + 1
|
||||
msg = msg.format(max_threshold=max_threshold, value=value, name=term.name)
|
||||
errors.append(msg)
|
||||
terms_with_errors.append([term, errors])
|
||||
@@ -67,7 +67,7 @@ class ServerPerformanceCheckUtil(object):
|
||||
'is_alive': {
|
||||
'default': False,
|
||||
'max_threshold': False,
|
||||
'alarm_msg_format': _('The terminal is offline: {name}')
|
||||
'alarm_msg_format': _('The component is offline: {name}')
|
||||
},
|
||||
'disk_used': {
|
||||
'default': 0,
|
||||
|
Reference in New Issue
Block a user