diff --git a/frontend/index.html b/frontend/index.html index 5ec9593..941b7c2 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1036,8 +1036,7 @@
-
-
+
Last refresh:
@@ -1414,7 +1413,7 @@ // ===== Version ===== // Single source of truth for the PWA version: shown in the header and used // by the server version check in pysimConnect(). -const SIMPLE_VERSION = '2.7.4'; +const SIMPLE_VERSION = '2.7.5'; document.getElementById('app-version').textContent = 'v' + SIMPLE_VERSION; // ===== Tab switching ===== @@ -12654,7 +12653,6 @@ function netStateRender(state) { } else { locEl.innerHTML = ''; } - document.getElementById('netstate-area').textContent = loc ? (loc.area + ' ' + loc.lac) : ''; document.getElementById('netstate-read').textContent = state && state.read_at ? new Date(state.read_at * 1000).toLocaleTimeString() : ''; const files = (state && state.files) || {}; @@ -12952,6 +12950,7 @@ const LANG_RU = { 'Raw APDU': 'Отправка APDU', 'Read': 'Прочитать', 'Refresh': 'Обновить', + 'Last refresh': 'Последнее обновление', 'Save': 'Сохранить', 'Raw': 'Данные как на карте', 'Decoded': 'Декодированные данные', diff --git a/frontend/sw.js b/frontend/sw.js index da48323..b412e0b 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'simple-v207'; +const CACHE = 'simple-v208'; const URLS = [ 'index.html', 'help.html', diff --git a/frontend/tests/html.test.js b/frontend/tests/html.test.js index 2664d78..2a6102c 100644 --- a/frontend/tests/html.test.js +++ b/frontend/tests/html.test.js @@ -293,3 +293,8 @@ test('SCP81 listener exposes its four modes with the matching notes', () => { assert.ok(html.includes("mode === 'redirect' && (!hostVal || !portVal)")); assert.ok(html.includes("el.disabled = (mode === 'passthru')")); }); + +test('the network monitor labels its refresh timestamp and has no area line', () => { + assert.match(html, /data-l10n="Last refresh">Last refresh<\/span>: <\/span>/); + assert.ok(!/id="netstate-area"/.test(html), 'the area line is gone; LAI/RAI/TAI live in the EF rows'); +}); diff --git a/frontend/tests/netstate.test.js b/frontend/tests/netstate.test.js index eb06f83..0292d4c 100644 --- a/frontend/tests/netstate.test.js +++ b/frontend/tests/netstate.test.js @@ -47,7 +47,7 @@ eval(code); function setup() { const els = {}; - for (const id of ['netstate-badge', 'netstate-location', 'netstate-area', + for (const id of ['netstate-badge', 'netstate-location', 'netstate-read', 'netstate-body']) { els[id] = { className: '', textContent: '', innerHTML: '' }; } @@ -109,7 +109,7 @@ test('netStateRender paints the service badge, location and rows', () => { assert.ok(els['netstate-location'].innerHTML.includes( 'TelekomGuest (roaming) · ⛔ PLMN not allowed')); assert.ok(!els['netstate-location'].innerHTML.includes('Telekom · ')); - assert.strictEqual(els['netstate-area'].textContent, 'LAI 6CD7'); + assert.strictEqual(els['netstate-read'].textContent, new Date(1700000000 * 1000).toLocaleTimeString()); assert.ok(els['netstate-body'].innerHTML.includes('EF.IMSI')); assert.ok(els['netstate-body'].innerHTML.includes('262011234567890')); assert.ok(els['netstate-body'].innerHTML.includes('>write<')); diff --git a/pyproject.toml b/pyproject.toml index 0acb06d..e74b9af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pysim-simple-server" -version = "2.7.4" +version = "2.7.5" description = "HTTP REST server wrapping pysim for the SIMple PWA" requires-python = ">=3.8" # pysim is a git-only dependency installed explicitly by setup.bat/setup.sh. diff --git a/pysim_simple_server/server.py b/pysim_simple_server/server.py index bbd1af7..3628bb5 100644 --- a/pysim_simple_server/server.py +++ b/pysim_simple_server/server.py @@ -25,7 +25,7 @@ from osmocom.construct import GsmOrUcs2Adapter from osmocom.tlv import BER_TLV_IE -VERSION = '2.7.4' +VERSION = '2.7.5' MAX_ENVELOPE_SEGMENTS = 5 # max SMS segments for outgoing C-APDU in ENVELOPE