mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-30 19:36:24 +00:00
udate lynis install
This commit is contained in:
@@ -998,7 +998,7 @@ export function NotificationSettings() {
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent className="space-y-5">
|
<CardContent className="space-y-5">
|
||||||
{/* ─<EFBFBD><EFBFBD> Service Status ── */}
|
{/* ── Service Status ── */}
|
||||||
{status && (
|
{status && (
|
||||||
<div className="flex items-center gap-3 p-3 rounded-lg bg-muted/50 border border-border">
|
<div className="flex items-center gap-3 p-3 rounded-lg bg-muted/50 border border-border">
|
||||||
<div className={`h-2.5 w-2.5 rounded-full ${status.running ? "bg-green-500" : "bg-red-500"}`} />
|
<div className={`h-2.5 w-2.5 rounded-full ${status.running ? "bg-green-500" : "bg-red-500"}`} />
|
||||||
|
|||||||
@@ -3020,18 +3020,18 @@ ${(report.sections && report.sections.length > 0) ? `
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => setShowFail2banUninstallConfirm(true)}
|
onClick={() => setShowFail2banUninstallConfirm(true)}
|
||||||
disabled={uninstallingFail2ban}
|
disabled={uninstallingFail2ban}
|
||||||
className="h-7 px-2 text-xs text-muted-foreground hover:text-red-500"
|
className="h-8 px-3 text-xs border-red-500/30 text-red-500 hover:bg-red-500/10 hover:text-red-400 hover:border-red-500/50"
|
||||||
title="Uninstall Fail2Ban"
|
|
||||||
>
|
>
|
||||||
{uninstallingFail2ban ? (
|
{uninstallingFail2ban ? (
|
||||||
<div className="animate-spin h-3 w-3 border-2 border-current border-t-transparent rounded-full" />
|
<div className="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full mr-2" />
|
||||||
) : (
|
) : (
|
||||||
<Trash2 className="h-3 w-3" />
|
<Trash2 className="h-4 w-4 mr-2" />
|
||||||
)}
|
)}
|
||||||
|
Uninstall
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -3048,9 +3048,8 @@ ${(report.sections && report.sections.length > 0) ? `
|
|||||||
) : !fail2banInfo?.installed ? (
|
) : !fail2banInfo?.installed ? (
|
||||||
/* --- NOT INSTALLED --- */
|
/* --- NOT INSTALLED --- */
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex items-center justify-between p-4 bg-muted/50 rounded-lg">
|
<div className="flex items-center gap-3 p-4 bg-muted/50 rounded-lg">
|
||||||
<div className="flex items-center gap-3">
|
<div className="w-10 h-10 rounded-full bg-gray-500/10 flex items-center justify-center shrink-0">
|
||||||
<div className="w-10 h-10 rounded-full bg-gray-500/10 flex items-center justify-center">
|
|
||||||
<Bug className="h-5 w-5 text-gray-500" />
|
<Bug className="h-5 w-5 text-gray-500" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -3058,10 +3057,6 @@ ${(report.sections && report.sections.length > 0) ? `
|
|||||||
<p className="text-sm text-muted-foreground">Protect SSH, Proxmox web interface, and ProxMenux Monitor from brute force attacks</p>
|
<p className="text-sm text-muted-foreground">Protect SSH, Proxmox web interface, and ProxMenux Monitor from brute force attacks</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="px-3 py-1 rounded-full text-sm font-medium bg-gray-500/10 text-gray-500">
|
|
||||||
Not Installed
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="bg-blue-500/10 border border-blue-500/20 rounded-lg p-4">
|
<div className="bg-blue-500/10 border border-blue-500/20 rounded-lg p-4">
|
||||||
<div className="flex items-start gap-3">
|
<div className="flex items-start gap-3">
|
||||||
@@ -3492,18 +3487,18 @@ ${(report.sections && report.sections.length > 0) ? `
|
|||||||
</div>
|
</div>
|
||||||
{lynisInfo?.installed && (
|
{lynisInfo?.installed && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => setShowLynisUninstallConfirm(true)}
|
onClick={() => setShowLynisUninstallConfirm(true)}
|
||||||
disabled={uninstallingLynis}
|
disabled={uninstallingLynis}
|
||||||
className="h-7 px-2 text-xs text-muted-foreground hover:text-red-500"
|
className="h-8 px-3 text-xs border-red-500/30 text-red-500 hover:bg-red-500/10 hover:text-red-400 hover:border-red-500/50"
|
||||||
title="Uninstall Lynis"
|
|
||||||
>
|
>
|
||||||
{uninstallingLynis ? (
|
{uninstallingLynis ? (
|
||||||
<div className="animate-spin h-3 w-3 border-2 border-current border-t-transparent rounded-full" />
|
<div className="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full mr-2" />
|
||||||
) : (
|
) : (
|
||||||
<Trash2 className="h-3 w-3" />
|
<Trash2 className="h-4 w-4 mr-2" />
|
||||||
)}
|
)}
|
||||||
|
Uninstall
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -3518,9 +3513,8 @@ ${(report.sections && report.sections.length > 0) ? `
|
|||||||
</div>
|
</div>
|
||||||
) : !lynisInfo?.installed ? (
|
) : !lynisInfo?.installed ? (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex items-center justify-between p-4 bg-muted/50 rounded-lg">
|
<div className="flex items-center gap-3 p-4 bg-muted/50 rounded-lg">
|
||||||
<div className="flex items-center gap-3">
|
<div className="w-10 h-10 rounded-full bg-gray-500/10 flex items-center justify-center shrink-0">
|
||||||
<div className="w-10 h-10 rounded-full bg-gray-500/10 flex items-center justify-center">
|
|
||||||
<Search className="h-5 w-5 text-gray-500" />
|
<Search className="h-5 w-5 text-gray-500" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -3528,10 +3522,6 @@ ${(report.sections && report.sections.length > 0) ? `
|
|||||||
<p className="text-sm text-muted-foreground">Comprehensive security auditing and hardening tool</p>
|
<p className="text-sm text-muted-foreground">Comprehensive security auditing and hardening tool</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="px-3 py-1 rounded-full text-sm font-medium bg-gray-500/10 text-gray-500">
|
|
||||||
Not Installed
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="bg-blue-500/10 border border-blue-500/20 rounded-lg p-4">
|
<div className="bg-blue-500/10 border border-blue-500/20 rounded-lg p-4">
|
||||||
<div className="flex items-start gap-3">
|
<div className="flex items-start gap-3">
|
||||||
|
|||||||
@@ -1384,7 +1384,7 @@ AI_DETAIL_TOKENS = {
|
|||||||
|
|
||||||
# System prompt template - optimized hybrid version
|
# System prompt template - optimized hybrid version
|
||||||
AI_SYSTEM_PROMPT = """You are a notification FORMATTER for ProxMenux Monitor (Proxmox VE).
|
AI_SYSTEM_PROMPT = """You are a notification FORMATTER for ProxMenux Monitor (Proxmox VE).
|
||||||
Your job: translate and reformat alerts into {language}. You are NOT an analyst — do not interpret or diagnose.
|
Your job: translate and reformat alerts into {language}. You are NOT an analyst <EFBFBD><EFBFBD><EFBFBD> do not interpret or diagnose.
|
||||||
|
|
||||||
═══ WHAT TO TRANSLATE ═══
|
═══ WHAT TO TRANSLATE ═══
|
||||||
Translate: labels, descriptions, status words, units (GB→Go in French, etc.)
|
Translate: labels, descriptions, status words, units (GB→Go in French, etc.)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import time
|
|||||||
import threading
|
import threading
|
||||||
from typing import Set, List, Tuple, Optional
|
from typing import Set, List, Tuple, Optional
|
||||||
|
|
||||||
# ─── Configuration ───────────────────────────────────────────────────────────
|
# ─── Configuration ──────────────────────────────────<EFBFBD><EFBFBD>────────────────────────
|
||||||
|
|
||||||
# Grace period durations (seconds)
|
# Grace period durations (seconds)
|
||||||
STARTUP_VM_GRACE_SECONDS = 180 # 3 minutes for VM/CT start aggregation
|
STARTUP_VM_GRACE_SECONDS = 180 # 3 minutes for VM/CT start aggregation
|
||||||
|
|||||||
Reference in New Issue
Block a user