feat(webui): streamline hub UI by removing CSR/lic export/import options and license management header title
CI Test Suite / Run Component Tests & Pipeline Verification (push) Failing after 13s
CI Test Suite / Run Component Tests & Pipeline Verification (push) Failing after 13s
This commit is contained in:
+1
-61
@@ -1922,7 +1922,7 @@ def serve_webui(request: Request = None):
|
|||||||
<div class="logo-group">
|
<div class="logo-group">
|
||||||
<div class="logo-icon">🛰️</div>
|
<div class="logo-icon">🛰️</div>
|
||||||
<div>
|
<div>
|
||||||
<h1>LOGAR Fleet Hub & License Management</h1>
|
<h1>LOGAR Fleet Hub</h1>
|
||||||
<div class="subtitle">Fleet Log Aggregation & Centralized AI Provisioning</div>
|
<div class="subtitle">Fleet Log Aggregation & Centralized AI Provisioning</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2097,9 +2097,6 @@ def serve_webui(request: Request = None):
|
|||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<div style="font-weight: 600; font-size: 13px; color: var(--text-muted);">PKI & Seat Synchronization:</div>
|
<div style="font-weight: 600; font-size: 13px; color: var(--text-muted);">PKI & Seat Synchronization:</div>
|
||||||
<div style="display:flex; gap:8px; flex-wrap:wrap;">
|
<div style="display:flex; gap:8px; flex-wrap:wrap;">
|
||||||
<a href="/api/license/export-lic" class="btn btn-primary" download>📥 Export .lic Request</a>
|
|
||||||
<button class="btn btn-secondary" onclick="openCsrModal()">📄 View / Copy CSR</button>
|
|
||||||
<button class="btn btn-secondary" onclick="openImportModal()">🔑 Import License (.lic / ca.crt)</button>
|
|
||||||
<button class="btn btn-accent" onclick="triggerMtlsRenewal()">🔄 Sync & Renew via mTLS</button>
|
<button class="btn btn-accent" onclick="triggerMtlsRenewal()">🔄 Sync & Renew via mTLS</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2164,31 +2161,6 @@ def serve_webui(request: Request = None):
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- CSR Modal -->
|
|
||||||
<div id="csrModal" class="modal">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-title">Certificate Signing Request (ca.csr)</div>
|
|
||||||
<textarea id="csrContent" class="form-control" rows="8" readonly></textarea>
|
|
||||||
<div class="modal-actions">
|
|
||||||
<button class="btn btn-secondary" onclick="copyText(document.getElementById('csrContent').value, 'CSR')">Copy to Clipboard</button>
|
|
||||||
<button class="btn btn-outline" onclick="closeModal('csrModal')">Close</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Import Modal -->
|
|
||||||
<div id="importModal" class="modal">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-title">Import & Activate Signed License (.lic / ca.crt)</div>
|
|
||||||
<p style="font-size: 13px; color: var(--text-muted); margin-bottom: 12px;">Paste the activated <code>.lic</code> package or PEM certificate issued by the Master Authority:</p>
|
|
||||||
<textarea id="importContent" class="form-control" rows="8" placeholder="Paste .lic JSON package or -----BEGIN CERTIFICATE----- ..."></textarea>
|
|
||||||
<div class="modal-actions">
|
|
||||||
<button class="btn btn-outline" onclick="closeModal('importModal')">Cancel</button>
|
|
||||||
<button class="btn btn-accent" onclick="submitImport()">Activate License</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Password Modal -->
|
<!-- Password Modal -->
|
||||||
<div id="passwordModal" class="modal">
|
<div id="passwordModal" class="modal">
|
||||||
<div class="modal-content" style="max-width: 440px;">
|
<div class="modal-content" style="max-width: 440px;">
|
||||||
@@ -2347,38 +2319,6 @@ def serve_webui(request: Request = None):
|
|||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
async function openCsrModal() {{
|
|
||||||
const resp = await fetch('/api/license/csr');
|
|
||||||
if (resp.ok) {{
|
|
||||||
const data = await resp.json();
|
|
||||||
document.getElementById('csrContent').value = data.csr;
|
|
||||||
openModal('csrModal');
|
|
||||||
}}
|
|
||||||
}}
|
|
||||||
|
|
||||||
function openImportModal() {{
|
|
||||||
document.getElementById('importContent').value = '';
|
|
||||||
openModal('importModal');
|
|
||||||
}}
|
|
||||||
|
|
||||||
async function submitImport() {{
|
|
||||||
const text = document.getElementById('importContent').value.trim();
|
|
||||||
if (!text) return alert('Please paste certificate or .lic content.');
|
|
||||||
closeModal('importModal');
|
|
||||||
const resp = await fetch('/api/license/import', {{
|
|
||||||
method: 'POST',
|
|
||||||
headers: {{ 'Content-Type': 'application/json' }},
|
|
||||||
body: JSON.stringify({{ raw: text, ca_cert: text }})
|
|
||||||
}});
|
|
||||||
const data = await resp.json();
|
|
||||||
if (resp.ok) {{
|
|
||||||
showAlert('Success: ' + data.message);
|
|
||||||
setTimeout(() => location.reload(), 1200);
|
|
||||||
}} else {{
|
|
||||||
alert('Import Error: ' + (data.detail || 'Failed to activate certificate'));
|
|
||||||
}}
|
|
||||||
}}
|
|
||||||
|
|
||||||
async function triggerMtlsRenewal() {{
|
async function triggerMtlsRenewal() {{
|
||||||
if (!confirm('Sync with master authority to renew certificate and check for seat increases?')) return;
|
if (!confirm('Sync with master authority to renew certificate and check for seat increases?')) return;
|
||||||
showAlert('Syncing with Master Authority...');
|
showAlert('Syncing with Master Authority...');
|
||||||
|
|||||||
@@ -221,9 +221,10 @@ class TestServerLicensingAndWebUI(unittest.TestCase):
|
|||||||
|
|
||||||
response = Server.serve_webui()
|
response = Server.serve_webui()
|
||||||
html = response.body.decode("utf-8")
|
html = response.body.decode("utf-8")
|
||||||
self.assertIn("LOGAR Fleet Hub & License Management", html)
|
self.assertIn("LOGAR Fleet Hub", html)
|
||||||
self.assertIn("Export .lic Request", html)
|
self.assertNotIn("LOGAR Fleet Hub & License Management", html)
|
||||||
self.assertIn("Import License (.lic / ca.crt)", html)
|
self.assertNotIn("Export .lic Request", html)
|
||||||
|
self.assertNotIn("Import License (.lic / ca.crt)", html)
|
||||||
self.assertIn("Sync & Renew via mTLS", html)
|
self.assertIn("Sync & Renew via mTLS", html)
|
||||||
self.assertIn("logar.eibl.tech", html)
|
self.assertIn("logar.eibl.tech", html)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user