feat: add full Zonemaster stack with Docker and Spanish UI

- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI)
- Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend
- Dockerfile.gui: Astro static build served via nginx
- docker-compose.yml: backend (internal) + frontend (port 5353)
- nginx.conf: root redirects to /es/, /api/ proxied to backend
- zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 08:19:24 +02:00
commit 8d4eaa1489
1567 changed files with 204155 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
package Zonemaster::Backend::Metrics;
use strict;
use warnings;
use Log::Any qw($log);
eval("use Net::Statsd");
my $enable_metrics = 0;
if (!$@) {
$enable_metrics = 1;
}
my %CODE_STATUS_HASH = (
-32700 => 'RPC_PARSE_ERROR',
-32600 => 'RPC_INVALID_REQUEST',
-32601 => 'RPC_METHOD_NOT_FOUND',
-32602 => 'RPC_INVALID_PARAMS',
-32603 => 'RPC_INTERNAL_ERROR'
);
sub setup {
my ( $cls, $host, $port ) = @_;
if (!defined $host) {
$enable_metrics = 0;
} elsif ( $enable_metrics ) {
$log->info('Enabling metrics module', { host => $host, port => $port });
$Net::Statsd::HOST = $host;
$Net::Statsd::PORT = $port;
}
}
sub code_to_status {
my ($cls, $code) = @_;
if (defined $code) {
return $CODE_STATUS_HASH{$code};
} else {
return 'RPC_SUCCESS';
}
}
sub increment {
if ( $enable_metrics ) {
Net::Statsd::increment(@_);
}
}
sub gauge {
if ( $enable_metrics ) {
Net::Statsd::gauge(@_);
}
}
sub timing {
if ( $enable_metrics ) {
Net::Statsd::timing(@_);
}
}