Changes
Build and Push Docker Images / build (push) Successful in 13s

This commit is contained in:
2026-05-04 21:46:37 +03:00
parent 20b4127fda
commit 661bf461f9
+22 -1
View File
@@ -246,6 +246,27 @@
$('#menuToggle').attr('aria-expanded', 'false');
});
function checkApiLive() {
var $statusEl = $('#api-status');
return $.ajax({
url: '/api/health/live',
method: 'GET',
dataType: 'json',
timeout: 5000
}).done(function (data) {
var status = (data && data.status) ? data.status : 'unknown';
if ($statusEl.length) {
$statusEl.text('API: ' + status).removeClass('text-danger').addClass('text-success');
} else {
console.log('API live status:', status);
}
}).fail(function (jqXHR, textStatus, errorThrown) {
if ($statusEl.length) {
$statusEl.text('API: offline').removeClass('text-success').addClass('text-danger');
}
console.error('API health check failed:', textStatus, errorThrown);
});
}
function getRecaptchaWebKey() {
return $.get('/api/contact').done(function (res) {
reCaptchaSiteKey = res;
@@ -494,6 +515,6 @@
});
}
$(window).on('load', function () {
$.when(getRecaptchaWebKey(), getGoogleTagManagerId()).always(initConsent);
$.when(checkApiLive(), getRecaptchaWebKey(), getGoogleTagManagerId()).always(initConsent);
});
})(jQuery);