Initial commit: DNS Test - DNS health checking tool
Go backend (miekg/dns) + Nuxt 3 frontend (Tailwind CSS v4). 8 check categories, 52 checks total: - Overview: @ record, WWW, MX with ASN/provider lookup - Domain Registration: expiry, registrar (RDAP + whois fallback) - Parent Delegation: NS records, glue, consistency - Nameservers: 17 checks (reachability, auth, recursion, TCP/UDP, AXFR, etc.) - SOA: serial consistency, timing values - Mail (MX): 11 checks (CNAME, PTR, public IPs, consistency) - Mail Auth: SPF, DKIM, DMARC - WWW: A record, CNAME Features: - SSE streaming (results appear as each category completes) - SQLite history (modernc.org/sqlite) - Rate limiting, CORS, request logging - Dark mode, responsive design
This commit is contained in:
30
frontend/app/components/StatusBadge.vue
Normal file
30
frontend/app/components/StatusBadge.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<span :class="classes" class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold uppercase tracking-wide">
|
||||
{{ label }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { CheckStatus } from '~/types/dns'
|
||||
|
||||
const props = defineProps<{
|
||||
status: CheckStatus
|
||||
}>()
|
||||
|
||||
const classes = computed(() => {
|
||||
switch (props.status) {
|
||||
case 'pass':
|
||||
return 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400'
|
||||
case 'warn':
|
||||
return 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400'
|
||||
case 'fail':
|
||||
return 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400'
|
||||
case 'info':
|
||||
return 'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400'
|
||||
default:
|
||||
return 'bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-400'
|
||||
}
|
||||
})
|
||||
|
||||
const label = computed(() => props.status)
|
||||
</script>
|
||||
Reference in New Issue
Block a user