- app/rest.py: FastAPI app wrapping search/diagnose/sources with CORS - web/: Vue 3 + Vite + UnoCSS + Pinia frontend at port 8535 - LogSearchView: sidebar filters (source, severity, limit) + FTS search - DiagnoseView: layered symptom investigation matching MCP diagnose tool - SourcesView: corpus table with entry count, error count, time range - LogEntryRow: severity badge, pattern chips, repeat count, timestamp - StatusDot: live API health indicator in nav - scripts/start_dev.sh: launch FastAPI (:8534) + Vite dev server (:8535) - .gitignore: add web/node_modules/ and web/dist/ - Caddy: /turnstone* route added to menagerie.circuitforge.tech block (API → :8534 with /turnstone strip, SPA fallback → :8535)
24 lines
811 B
Vue
24 lines
811 B
Vue
<template>
|
|
<span
|
|
class="px-1.5 py-0.5 rounded text-xs font-semibold uppercase tracking-wider"
|
|
:class="colorClass"
|
|
>{{ severity }}</span>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
|
|
const props = defineProps<{ severity: string | null }>()
|
|
|
|
const colorClass = computed(() => {
|
|
switch ((props.severity ?? '').toUpperCase()) {
|
|
case 'DEBUG': return 'bg-gray-800 text-sev-debug'
|
|
case 'INFO': return 'bg-blue-900/40 text-sev-info'
|
|
case 'WARN': return 'bg-yellow-900/40 text-sev-warn'
|
|
case 'WARNING': return 'bg-yellow-900/40 text-sev-warn'
|
|
case 'ERROR': return 'bg-red-900/40 text-sev-error'
|
|
case 'CRITICAL': return 'bg-red-900/60 text-sev-critical font-bold'
|
|
default: return 'bg-surface-raised text-text-dim'
|
|
}
|
|
})
|
|
</script>
|