This commit is contained in:
Joshua Hare 2025-08-12 23:14:09 +10:00
parent 27f9a397b2
commit 91fdaa89f9

View File

@ -383,6 +383,15 @@ document.addEventListener('DOMContentLoaded', () => {
} }
const currentFhirServerUrl = useLocalHapi ? null : fhirServerUrlInput.value.trim().replace(/\/+$/, ''); const currentFhirServerUrl = useLocalHapi ? null : fhirServerUrlInput.value.trim().replace(/\/+$/, '');
if (!useLocalHapi && !currentFhirServerUrl) {
alert('Custom FHIR Server URL is required.');
fhirServerUrlInput.classList.add('is-invalid');
retrieveButton.disabled = false;
if (spinner) spinner.style.display = 'none';
if (icon) icon.style.display = 'inline-block';
return;
}
const authType = authTypeSelect?.value; const authType = authTypeSelect?.value;
const authHeader = (authType === 'bearer' && bearerTokenInput?.value) ? `Bearer ${bearerTokenInput.value}` const authHeader = (authType === 'bearer' && bearerTokenInput?.value) ? `Bearer ${bearerTokenInput.value}`
: (authType === 'basic' && usernameInput?.value && passwordInput?.value) ? `Basic ${btoa(`${usernameInput.value}:${passwordInput.value}`)}` : (authType === 'basic' && usernameInput?.value && passwordInput?.value) ? `Basic ${btoa(`${usernameInput.value}:${passwordInput.value}`)}`
@ -391,7 +400,7 @@ document.addEventListener('DOMContentLoaded', () => {
const validateReferences = validateReferencesCheckbox?.checked ? 'true' : 'false'; const validateReferences = validateReferencesCheckbox?.checked ? 'true' : 'false';
const fetchReferenceBundles = validateReferences === 'true' && fetchReferenceBundlesCheckbox?.checked ? 'true' : 'false'; const fetchReferenceBundles = validateReferences === 'true' && fetchReferenceBundlesCheckbox?.checked ? 'true' : 'false';
// --- Stream the logs directly from the new backend endpoint --- // --- Stream the logs directly from the server ---
const url = new URL('/api/stream-retrieve', window.location.origin); const url = new URL('/api/stream-retrieve', window.location.origin);
// Use POST for the new endpoint // Use POST for the new endpoint