Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion frontend/src/lib/components/dashboard/ProviderStatus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,30 @@ onDestroy(() => {
</div>
<div class="text-xs text-base-content/60">
{$t("dashboard.provider.connections")}: {provider.activeConnections}/{provider.maxConnections}
{#if provider.availableSlots > 0}
({provider.availableSlots} {$t("dashboard.provider.free_slots")})
{/if}
</div>
</div>
</div>

<div class="grid grid-cols-4 gap-4 text-sm">
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 text-sm">
<div>
<span class="text-base-content/70">{$t("dashboard.provider.current_speed")}:</span>
<span class="font-medium ml-1">{provider.speedEwma > 0 ? formatSpeed(provider.speedEwma) : "—"}</span>
</div>
<div>
<span class="text-base-content/70">{$t("dashboard.provider.avg_speed")}:</span>
<span class="font-medium ml-1">{provider.activeConnections > 0 ? formatSpeed(provider.avgSpeed) : "—"}</span>
</div>
<div>
<span class="text-base-content/70">{$t("dashboard.provider.ttfb")}:</span>
<span class="font-medium ml-1">{provider.ttfb || "—"}</span>
</div>
<div>
<span class="text-base-content/70">{$t("dashboard.provider.downloaded")}:</span>
<span class="font-medium ml-1">{provider.bytesConsumed > 0 ? formatBytes(provider.bytesConsumed) : "—"}</span>
</div>
<div>
<span class="text-base-content/70">{$t("dashboard.provider.inflight")}:</span>
<span class="font-medium ml-1">{provider.inflight || 10}</span>
Expand All @@ -144,6 +159,32 @@ onDestroy(() => {
<span class="font-medium ml-1 {provider.totalErrors > 0 ? 'text-error' : ''}">{provider.totalErrors.toLocaleString()}</span>
</div>
</div>

{#if provider.quotaBytes > 0}
<div class="mt-3 pt-3 border-t border-base-300">
<div class="flex justify-between items-center text-sm mb-1">
<span class="text-base-content/70">
{$t("dashboard.provider.quota")}:
<span class="font-medium {provider.quotaExceeded ? 'text-error' : ''}">
{formatBytes(provider.quotaUsed)} / {formatBytes(provider.quotaBytes)}
</span>
{#if provider.quotaExceeded}
<span class="badge badge-error badge-sm ml-1">{$t("dashboard.provider.quota_exceeded")}</span>
{/if}
</span>
{#if provider.quotaResetAt}
<span class="text-xs text-base-content/60">
{$t("dashboard.provider.quota_resets")}: {new Date(provider.quotaResetAt).toLocaleString()}
</span>
{/if}
</div>
<progress
class="progress w-full {provider.quotaExceeded ? 'progress-error' : 'progress-primary'}"
value={provider.quotaUsed}
max={provider.quotaBytes}
></progress>
</div>
{/if}
</div>
{/each}
</div>
Expand All @@ -154,6 +195,10 @@ onDestroy(() => {
<span class="text-base-content/70">{$t("dashboard.provider.avg_speed")}:</span>
<span class="font-medium">{poolMetrics.activeConnections > 0 ? formatSpeed(poolMetrics.avgSpeed) : "—"}</span>
</div>
<div class="flex justify-between items-center text-sm mt-1">
<span class="text-base-content/70">{$t("dashboard.provider.downloaded")}:</span>
<span class="font-medium">{poolMetrics.bytesConsumed > 0 ? formatBytes(poolMetrics.bytesConsumed) : "—"}</span>
</div>
<div class="flex justify-between items-center text-sm mt-1">
<span class="text-base-content/70">{$t("dashboard.provider.elapsed")}:</span>
<span class="font-medium">{formatElapsed(poolMetrics.elapsed)}</span>
Expand Down
25 changes: 25 additions & 0 deletions frontend/src/lib/components/settings/PostCheckSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ let deferredMaxRetries = $state(config.post_check?.deferred_max_retries || 5);
let deferredMaxBackoff = $state(config.post_check?.deferred_max_backoff || "1h");
let deferredCheckInterval = $state(config.post_check?.deferred_check_interval || "2m");
let deferredBatchSize = $state(config.post_check?.deferred_batch_size || 500);
let statBatchSize = $state(config.post_check?.stat_batch_size || 100);
let maxConcurrentChecks = $state(config.post_check?.max_concurrent_checks ?? 0);

// Ensure post_check exists with defaults
Expand All @@ -58,6 +59,7 @@ if (!config.post_check) {
deferred_max_backoff: "1h",
deferred_check_interval: "2m",
deferred_batch_size: 500,
stat_batch_size: 100,
max_concurrent_checks: 0,
};
}
Expand Down Expand Up @@ -95,6 +97,10 @@ $effect(() => {
config.post_check.deferred_batch_size = deferredBatchSize;
});

$effect(() => {
config.post_check.stat_batch_size = statBatchSize;
});

$effect(() => {
config.post_check.max_concurrent_checks = maxConcurrentChecks;
});
Expand Down Expand Up @@ -244,6 +250,25 @@ $effect(() => {
</div>
</div>

<div class="form-control">
<label class="label" for="stat-batch-size">
<span class="label-text">{$t('settings.post_check.stat_batch_size')}</span>
</label>
<input
id="stat-batch-size"
type="number"
class="input input-bordered"
bind:value={statBatchSize}
min="1"
max="1000"
/>
<div class="label">
<span class="label-text-alt">
{$t('settings.post_check.stat_batch_size_description')}
</span>
</div>
</div>

<div class="form-control">
<label class="label" for="max-concurrent-checks">
<span class="label-text">{$t('settings.post_check.max_concurrent_checks')}</span>
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/lib/locales/en/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@
"total_errors": "Total Errors",
"no_providers": "No providers configured",
"inflight": "Inflight",
"current_speed": "Current Speed",
"ttfb": "TTFB",
"downloaded": "Downloaded",
"free_slots": "free",
"quota": "Quota",
"quota_exceeded": "Exceeded",
"quota_resets": "Resets",
"status": {
"connected": "Connected",
"idle": "Idle",
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/lib/locales/en/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
"ping_rtt": "Ping RTT",
"errors": "Errors",
"connections": "Connections",
"current_speed": "Current Speed",
"ttfb": "TTFB",
"downloaded": "Downloaded",
"free_slots": "Free Slots",
"quota": "Quota",
"quota_exceeded": "Exceeded",

"nntp_servers": "NNTP Servers",
"server_host": "Server Host"
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/locales/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@
"deferred_check_interval_description": "How often the background worker checks for articles needing verification",
"deferred_batch_size": "Deferred Batch Size",
"deferred_batch_size_description": "Number of articles processed per deferred check cycle. Increase for large uploads.",
"stat_batch_size": "Stat Batch Size",
"stat_batch_size_description": "Number of segments checked per batched STAT request. Default 100.",
"max_concurrent_checks": "Max Concurrent Checks",
"max_concurrent_checks_description": "Maximum number of STAT verification checks running at once across the whole process. 0 = auto (dedicated verification pool capped at 16, or shared upload pool capped at 2).",
"info_title": "Post Check:",
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/lib/locales/es/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@
"total_errors": "Errores Totales",
"no_providers": "No hay proveedores configurados",
"inflight": "En vuelo",
"current_speed": "Velocidad Actual",
"ttfb": "TTFB",
"downloaded": "Descargado",
"free_slots": "libres",
"quota": "Cuota",
"quota_exceeded": "Excedida",
"quota_resets": "Se reinicia",
"status": {
"connected": "Conectado",
"idle": "Inactivo",
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/lib/locales/es/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
"ping_rtt": "Ping RTT",
"errors": "Errores",
"connections": "Conexiones",
"current_speed": "Velocidad Actual",
"ttfb": "TTFB",
"downloaded": "Descargado",
"free_slots": "Ranuras Libres",
"quota": "Cuota",
"quota_exceeded": "Excedida",

"nntp_servers": "Servidores NNTP",
"server_host": "Host del Servidor"
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/locales/es/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@
"deferred_check_interval_description": "Con qué frecuencia el worker verifica artículos que necesitan verificación",
"deferred_batch_size": "Tamaño de Lote Diferido",
"deferred_batch_size_description": "Número de artículos procesados por ciclo de verificación diferida. Aumentar para cargas grandes.",
"stat_batch_size": "Tamaño de Lote de STAT",
"stat_batch_size_description": "Número de segmentos verificados por solicitud STAT agrupada. Por defecto 100.",
"max_concurrent_checks": "Comprobaciones Concurrentes Máximas",
"max_concurrent_checks_description": "Número máximo de comprobaciones STAT ejecutándose a la vez en todo el proceso. 0 = automático (pool de verificación dedicado limitado a 16, o pool de carga compartido limitado a 2).",
"info_title": "Verificación Post:",
Expand Down
13 changes: 13 additions & 0 deletions frontend/src/lib/locales/fr/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,19 @@
"active_connections": "connexions actives",
"total_uploaded": "Total Téléchargé",
"no_providers": "Aucun fournisseur configuré",
"avg_speed": "Vitesse Moyenne",
"missing": "Manquants",
"errors": "Erreurs",
"elapsed": "Disponibilité",
"total_errors": "Erreurs Totales",
"inflight": "En cours",
"current_speed": "Vitesse Actuelle",
"ttfb": "TTFB",
"downloaded": "Téléchargé",
"free_slots": "libres",
"quota": "Quota",
"quota_exceeded": "Dépassé",
"quota_resets": "Réinitialisation",
"status": {
"connected": "Connecté",
"connecting": "Connexion",
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/lib/locales/fr/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
"provider_host": "Hôte/Serveur",
"status": "Statut",
"connections": "Connexions",
"current_speed": "Vitesse Actuelle",
"ttfb": "TTFB",
"downloaded": "Téléchargé",
"free_slots": "Emplacements Libres",
"quota": "Quota",
"quota_exceeded": "Dépassé",
"success_rate": "Taux de Réussite",
"avg_age": "Âge Moyen des Connexions",

Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/locales/fr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@
"deferred_check_interval_description": "Fréquence à laquelle le worker vérifie les articles nécessitant une vérification",
"deferred_batch_size": "Taille du Lot Différé",
"deferred_batch_size_description": "Nombre d'articles traités par cycle de vérification différée. Augmenter pour les grandes mises en ligne.",
"stat_batch_size": "Taille du Lot STAT",
"stat_batch_size_description": "Nombre de segments vérifiés par requête STAT groupée. 100 par défaut.",
"max_concurrent_checks": "Vérifications Simultanées Maximales",
"max_concurrent_checks_description": "Nombre maximal de vérifications STAT exécutées simultanément sur l'ensemble du processus. 0 = automatique (pool de vérification dédié plafonné à 16, ou pool d'upload partagé plafonné à 2).",
"info_title": "Vérification Post :",
Expand Down
13 changes: 13 additions & 0 deletions frontend/src/lib/locales/tr/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@
"active_connections": "aktif bağlantı",
"total_uploaded": "Toplam Yüklenen",
"no_providers": "Yapılandırılmış sağlayıcı yok",
"avg_speed": "Ortalama Hız",
"missing": "Eksik",
"errors": "Hatalar",
"elapsed": "Çalışma Süresi",
"total_errors": "Toplam Hata",
"inflight": "Eşzamanlı",
"current_speed": "Anlık Hız",
"ttfb": "TTFB",
"downloaded": "İndirilen",
"free_slots": "boş",
"quota": "Kota",
"quota_exceeded": "Aşıldı",
"quota_resets": "Sıfırlanma",
"status": {
"connected": "Bağlandı",
"connecting": "Bağlanıyor",
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/lib/locales/tr/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
"provider_host": "Ana Bilgisayar/Sunucu",
"status": "Durum",
"connections": "Bağlantılar",
"current_speed": "Anlık Hız",
"ttfb": "TTFB",
"downloaded": "İndirilen",
"free_slots": "Boş Yuvalar",
"quota": "Kota",
"quota_exceeded": "Aşıldı",
"success_rate": "Başarı Oranı",
"avg_age": "Ort Bağlantı Yaşı",
"articles_posted": "Gönderilen Makaleler",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/locales/tr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@
"deferred_check_interval_description": "Arka plan çalışanının bekleyen kontrolleri yoklama sıklığı",
"deferred_batch_size": "Ertelenmiş Toplu İşlem Boyutu",
"deferred_batch_size_description": "Her ertelenmiş kontrol döngüsünde işlenen makale sayısı. Büyük yüklemeler için artırın.",
"stat_batch_size": "STAT Toplu İşlem Boyutu",
"stat_batch_size_description": "Toplu STAT isteği başına kontrol edilen segment sayısı. Varsayılan 100.",
"max_concurrent_checks": "Maksimum Eşzamanlı Kontrol",
"max_concurrent_checks_description": "Tüm süreç genelinde aynı anda çalışan maksimum STAT doğrulama kontrolü sayısı. 0 = otomatik (16 ile sınırlı özel doğrulama havuzu veya 2 ile sınırlı paylaşılan yükleme havuzu)."
},
Expand Down
20 changes: 20 additions & 0 deletions frontend/src/lib/wailsjs/go/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,19 @@ export namespace backend {
host: string;
activeConnections: number;
maxConnections: number;
availableSlots: number;
totalErrors: number;
avgSpeed: number;
speedEwma: number;
bytesConsumed: number;
missing: number;
pingRTT: string;
ttfb: string;
inflight: number;
quotaBytes: number;
quotaUsed: number;
quotaResetAt: string;
quotaExceeded: boolean;

static createFrom(source: any = {}) {
return new NntpProviderMetrics(source);
Expand All @@ -87,18 +95,27 @@ export namespace backend {
this.host = source["host"];
this.activeConnections = source["activeConnections"];
this.maxConnections = source["maxConnections"];
this.availableSlots = source["availableSlots"];
this.totalErrors = source["totalErrors"];
this.avgSpeed = source["avgSpeed"];
this.speedEwma = source["speedEwma"];
this.bytesConsumed = source["bytesConsumed"];
this.missing = source["missing"];
this.pingRTT = source["pingRTT"];
this.ttfb = source["ttfb"];
this.inflight = source["inflight"];
this.quotaBytes = source["quotaBytes"];
this.quotaUsed = source["quotaUsed"];
this.quotaResetAt = source["quotaResetAt"];
this.quotaExceeded = source["quotaExceeded"];
}
}
export class NntpPoolMetrics {
timestamp: string;
activeConnections: number;
totalErrors: number;
avgSpeed: number;
bytesConsumed: number;
elapsed: string;
providerErrors: Record<string, number>;
providers: NntpProviderMetrics[];
Expand All @@ -113,6 +130,7 @@ export namespace backend {
this.activeConnections = source["activeConnections"];
this.totalErrors = source["totalErrors"];
this.avgSpeed = source["avgSpeed"];
this.bytesConsumed = source["bytesConsumed"];
this.elapsed = source["elapsed"];
this.providerErrors = source["providerErrors"];
this.providers = this.convertValues(source["providers"], NntpProviderMetrics);
Expand Down Expand Up @@ -650,6 +668,7 @@ export namespace config {
deferred_max_backoff: string;
deferred_check_interval: string;
deferred_batch_size: number;
stat_batch_size: number;
max_concurrent_checks: number;

static createFrom(source: any = {}) {
Expand All @@ -666,6 +685,7 @@ export namespace config {
this.deferred_max_backoff = source["deferred_max_backoff"];
this.deferred_check_interval = source["deferred_check_interval"];
this.deferred_batch_size = source["deferred_batch_size"];
this.stat_batch_size = source["stat_batch_size"];
this.max_concurrent_checks = source["max_concurrent_checks"];
}
}
Expand Down
Loading
Loading