diff -r c270b6c8162b -r 53c66c4aefa3 tests/projects/svghmi_widgets/py_ext_0@py_ext/pyfile.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/projects/svghmi_widgets/py_ext_0@py_ext/pyfile.xml Tue Jan 25 17:05:14 2022 +0100 @@ -0,0 +1,93 @@ + + + + + + + + + + 0 and extra[0] != "": + fAlarms = [alrm for alrm in Alarms if alrm[1].find(extra[0])!=-1] + else: + fAlarms = Alarms + new_range = len(fAlarms) + delta = new_range - visible + new_position = 0 if delta <= 0 else delta if old_position > delta else old_position + new_visible = new_range if delta <= 0 else visible + + visible_alarms = [] + for ts, text, status, alarmid in fAlarms[new_position:new_position + new_visible]: + visible_alarms.append({ + "time": time.ctime(ts), + "text": text, # TODO translate text + "status": status, + "alarmid": alarmid + }) + + return new_range, new_position, visible_alarms + + +]]> + + + + + + + + + + + + + +