KI-AGENT: Asterisk-Statusprüfung robuster machen
This commit is contained in:
@@ -11,13 +11,15 @@ const websocketResult = ref(null)
|
||||
const lastUpdated = ref(null)
|
||||
|
||||
const statusColor = computed(() => {
|
||||
if (status.value?.reachable) return "success"
|
||||
if (!status.value?.enabled) return "warning"
|
||||
return status.value?.reachable ? "success" : "error"
|
||||
return "error"
|
||||
})
|
||||
|
||||
const statusIcon = computed(() => {
|
||||
if (status.value?.reachable) return "i-heroicons-signal"
|
||||
if (!status.value?.enabled) return "i-heroicons-pause-circle"
|
||||
return status.value?.reachable ? "i-heroicons-signal" : "i-heroicons-signal-slash"
|
||||
return "i-heroicons-signal-slash"
|
||||
})
|
||||
|
||||
const websocketColor = computed(() => {
|
||||
@@ -174,7 +176,7 @@ onMounted(loadTelephony)
|
||||
<span class="text-sm font-medium text-gray-700">Status</span>
|
||||
</div>
|
||||
<p class="mt-3 text-lg font-semibold text-gray-950">
|
||||
{{ status?.enabled ? (status?.reachable ? "Erreichbar" : "Nicht erreichbar") : "Deaktiviert" }}
|
||||
{{ status?.reachable ? "Erreichbar" : (status?.enabled ? "Nicht erreichbar" : "Deaktiviert") }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -206,6 +208,24 @@ onMounted(loadTelephony)
|
||||
:title="status?.message || 'Telefonie wird geladen'"
|
||||
:description="status?.statusUrl || 'Noch keine Status-URL geladen.'"
|
||||
/>
|
||||
|
||||
<div v-if="status?.attempts?.length" class="mt-4 rounded-lg border border-gray-200 bg-gray-50 p-3">
|
||||
<p class="text-xs font-medium uppercase tracking-wide text-gray-500">
|
||||
Geprüfte Status-Ziele
|
||||
</p>
|
||||
<div class="mt-2 grid gap-2">
|
||||
<div
|
||||
v-for="attempt in status.attempts"
|
||||
:key="attempt.url"
|
||||
class="flex items-center justify-between gap-3 text-sm"
|
||||
>
|
||||
<span class="break-all font-mono text-gray-700">{{ attempt.url }}</span>
|
||||
<UBadge :color="attempt.reachable ? 'success' : 'neutral'" variant="soft">
|
||||
{{ attempt.reachable ? `HTTP ${attempt.statusCode}` : "offline" }}
|
||||
</UBadge>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</UCard>
|
||||
|
||||
<UCard>
|
||||
|
||||
Reference in New Issue
Block a user