diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 893668a..75372a2 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -44,6 +44,10 @@
const importError = ref("");
const adminUsers = ref([]);
const adminUsersTotal = ref(0);
+const diagnostics = reactive({
+ health: "unknown",
+ ready: "unknown"
+});
const form = reactive({
title: "",
@@ -351,6 +355,13 @@
adminUsersTotal.value = payload.total;
}
+async function loadDiagnostics() {
+ const [health, ready] = await Promise.allSettled([api.health(), api.ready()]);
+ diagnostics.health =
+ health.status === "fulfilled" ? health.value.status || "ok" : "error";
+ diagnostics.ready = ready.status === "fulfilled" ? ready.value.status || "ok" : "error";
+}
+
onMounted(async () => {
try {
me.value = await api.me();
@@ -364,6 +375,9 @@
if (tab === "admin" && me.value?.role === "admin" && !adminUsers.value.length) {
loadAdminUsers();
}
+ if (tab === "admin" && me.value?.role === "admin") {
+ loadDiagnostics();
+ }
});
@@ -688,6 +702,21 @@
{{ adminUsersTotal }} records