-
+
STATUS and Polling
+
|
+ Polling
-
Events that the card monitors (SET UP EVENT LIST):
+
Events that the card monitors (SET UP EVENT LIST):
-
Fetched proactive commands:
+
Fetched proactive commands:
@@ -3956,6 +3958,7 @@ async function pysimPollStatusInit() {
function pysimStartBackendPoll() {
if (_pysimPollTimer) clearInterval(_pysimPollTimer);
+ let _hadData = false;
_pysimPollTimer = setInterval(async () => {
try {
const [log, stk, ps] = await Promise.all([
@@ -3964,12 +3967,19 @@ function pysimStartBackendPoll() {
pysimFetch('/api/poll-status'),
]);
const elLog = document.getElementById('pysim-proactive-log');
- if (elLog && elLog.parentElement && !elLog.parentElement.closest('.hidden')) {
+ const visible = elLog && elLog.parentElement && !elLog.parentElement.closest('.hidden');
+ if (visible) {
pysimProactiveLogRender();
+ pysimEventsRender();
}
pysimUpdatePollUI(ps.enabled, ps.interval);
- if (!ps.enabled && !stk.active && !stk.pending) {
- // card disconnected — clear stale event list
+ if (Array.isArray(log) && log.length > 0) _hadData = true;
+ if (_hadData && !ps.enabled && Array.isArray(log) && log.length === 0) {
+ _hadData = false;
+ const statusEl = document.getElementById('pysim-status');
+ if (statusEl && statusEl.textContent.trim() !== '') {
+ statusEl.innerHTML = 'Card disconnected';
+ }
}
} catch (e) { /* ignore */ }
}, 5000);
@@ -4606,6 +4616,8 @@ const LANG_RU = {
'Card reader inserted': 'Картридер вставлен',
'PROVIDE LOCAL INFORMATION response data': 'Данные для PROVIDE LOCAL INFORMATION',
'Send STATUS': 'Отправить STATUS',
+ 'STATUS and Polling': 'STATUS и опрос',
+ 'Polling': 'Опрос',
'STATUS...': 'STATUS...',
'Saving...': 'Сохранение...',
'Saved': 'Сохранено',