OTA status stays on the SP page, not in the header; v1.9.7
pysimSendOta wrote its progress/verdict into #pysim-status - the shared header line owned by connect/equip/poll logic - clobbering the card status shown under 'Equip card'. OTA outcomes now live exclusively on the Secured Packet page: - send start: small gray 'Sending OTA...' in #sp-send-result - verdicts: big #sp-por-status + details line, as before - header #pysim-status untouched by OTA flows Version housekeeping: v1.9.6 -> 1.9.7 everywhere; SW cache otaman-v17 -> otaman-v18. Also realigns pyproject.toml which the multi-amend rounds had left stale at 1.9.5.
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ Returns server version for compatibility checking.
|
|||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
```json
|
```json
|
||||||
{"version": "1.9.6"}
|
{"version": "1.9.7"}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `GET /api/status`
|
### `GET /api/status`
|
||||||
|
|||||||
+7
-10
@@ -18,7 +18,7 @@
|
|||||||
<div class="max-w-7xl mx-auto px-6 py-2">
|
<div class="max-w-7xl mx-auto px-6 py-2">
|
||||||
|
|
||||||
<div class="flex items-center justify-between mb-3">
|
<div class="flex items-center justify-between mb-3">
|
||||||
<h1 class="text-2xl font-bold text-heading">OTAMan <span id="slogan" class="text-sm font-normal text-gray-500 dark:text-slate-400 ml-2" data-l10n="SIM OTA with a Human Face">SIM OTA with a Human Face</span> <span class="text-xs text-gray-400 dark:text-slate-500 ml-1">v1.9.6</span></h1>
|
<h1 class="text-2xl font-bold text-heading">OTAMan <span id="slogan" class="text-sm font-normal text-gray-500 dark:text-slate-400 ml-2" data-l10n="SIM OTA with a Human Face">SIM OTA with a Human Face</span> <span class="text-xs text-gray-400 dark:text-slate-500 ml-1">v1.9.7</span></h1>
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<button id="install-btn" class="px-2 py-1 text-xs rounded border border-gray-300 dark:border-slate-600 hover:bg-gray-200 dark:hover:bg-slate-700" style="display:none">INSTALL PWA [for offline use]</button>
|
<button id="install-btn" class="px-2 py-1 text-xs rounded border border-gray-300 dark:border-slate-600 hover:bg-gray-200 dark:hover:bg-slate-700" style="display:none">INSTALL PWA [for offline use]</button>
|
||||||
<a href="https://github.com/anttro/otaman" target="_blank" class="text-xs text-gray-400 hover:text-gray-600 dark:text-slate-500 dark:hover:text-slate-300">github</a>
|
<a href="https://github.com/anttro/otaman" target="_blank" class="text-xs text-gray-400 hover:text-gray-600 dark:text-slate-500 dark:hover:text-slate-300">github</a>
|
||||||
@@ -4085,12 +4085,12 @@ async function pysimSendOta() {
|
|||||||
}
|
}
|
||||||
const sp = document.getElementById('sp-result').value.replace(/[^0-9a-fA-F]/g, '').toUpperCase();
|
const sp = document.getElementById('sp-result').value.replace(/[^0-9a-fA-F]/g, '').toUpperCase();
|
||||||
if (!sp) { alert('No secured packet to send. Generate a secure packet first.'); return; }
|
if (!sp) { alert('No secured packet to send. Generate a secure packet first.'); return; }
|
||||||
const statusEl = document.getElementById('pysim-status');
|
|
||||||
const sendResultEl = document.getElementById('sp-send-result');
|
const sendResultEl = document.getElementById('sp-send-result');
|
||||||
const porStatusEl = document.getElementById('sp-por-status');
|
const porStatusEl = document.getElementById('sp-por-status');
|
||||||
sendResultEl.classList.add('hidden');
|
sendResultEl.classList.remove('hidden', 'text-red-600', 'text-green-600');
|
||||||
|
sendResultEl.classList.add('text-gray-500');
|
||||||
|
sendResultEl.textContent = t('Sending OTA...');
|
||||||
porStatusEl.classList.add('hidden');
|
porStatusEl.classList.add('hidden');
|
||||||
statusEl.innerHTML = '<span class="text-gray-500">' + t('Sending OTA...') + '</span>';
|
|
||||||
try {
|
try {
|
||||||
const data = await pysimFetch('/api/send-ota', { sp, ...spParams() });
|
const data = await pysimFetch('/api/send-ota', { sp, ...spParams() });
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
@@ -4125,23 +4125,20 @@ async function pysimSendOta() {
|
|||||||
rawLine.textContent = 'raw PoR: ' + por.raw;
|
rawLine.textContent = 'raw PoR: ' + por.raw;
|
||||||
sendResultEl.appendChild(rawLine);
|
sendResultEl.appendChild(rawLine);
|
||||||
}
|
}
|
||||||
sendResultEl.classList.remove('hidden', 'text-red-600');
|
sendResultEl.classList.remove('hidden', 'text-red-600', 'text-gray-500');
|
||||||
sendResultEl.classList.add('text-green-600');
|
sendResultEl.classList.add('text-green-600');
|
||||||
statusEl.innerHTML = '<span class="text-green-600">' + esc(msg) + '</span>';
|
|
||||||
} else {
|
} else {
|
||||||
let msg = 'OTA failed';
|
let msg = 'OTA failed';
|
||||||
if (data.error) msg += ': ' + data.error;
|
if (data.error) msg += ': ' + data.error;
|
||||||
if (data.sw) msg += (data.error ? ' | ' : ': ') + 'SW ' + data.sw;
|
if (data.sw) msg += (data.error ? ' | ' : ': ') + 'SW ' + data.sw;
|
||||||
sendResultEl.textContent = msg;
|
sendResultEl.textContent = msg;
|
||||||
sendResultEl.classList.remove('hidden', 'text-green-600');
|
sendResultEl.classList.remove('hidden', 'text-green-600', 'text-gray-500');
|
||||||
sendResultEl.classList.add('text-red-600');
|
sendResultEl.classList.add('text-red-600');
|
||||||
statusEl.innerHTML = '<span class="text-red-500">' + esc(msg) + '</span>';
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
sendResultEl.textContent = 'Error: ' + e.message;
|
sendResultEl.textContent = 'Error: ' + e.message;
|
||||||
sendResultEl.classList.remove('hidden', 'text-green-600');
|
sendResultEl.classList.remove('hidden', 'text-green-600', 'text-gray-500');
|
||||||
sendResultEl.classList.add('text-red-600');
|
sendResultEl.classList.add('text-red-600');
|
||||||
statusEl.innerHTML = '<span class="text-red-500">Error: ' + esc(e.message) + '</span>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
const CACHE = 'otaman-v17';
|
const CACHE = 'otaman-v18';
|
||||||
const URLS = [
|
const URLS = [
|
||||||
'index.html',
|
'index.html',
|
||||||
'help.html',
|
'help.html',
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "pysim-otaman-server"
|
name = "pysim-otaman-server"
|
||||||
version = "1.9.5"
|
version = "1.9.7"
|
||||||
description = "HTTP REST server wrapping pysim for the OTAMan PWA"
|
description = "HTTP REST server wrapping pysim for the OTAMan PWA"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
# pysim is a git-only dependency installed explicitly by setup.bat/setup.sh.
|
# pysim is a git-only dependency installed explicitly by setup.bat/setup.sh.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ from osmocom.construct import GsmOrUcs2Adapter
|
|||||||
from osmocom.tlv import BER_TLV_IE
|
from osmocom.tlv import BER_TLV_IE
|
||||||
|
|
||||||
|
|
||||||
VERSION = '1.9.6'
|
VERSION = '1.9.7'
|
||||||
|
|
||||||
|
|
||||||
# Static file serving (the PWA lives in <repo>/frontend, served by this server
|
# Static file serving (the PWA lives in <repo>/frontend, served by this server
|
||||||
|
|||||||
Reference in New Issue
Block a user