This commit is contained in:
RGJorge
2026-05-08 17:41:23 +00:00
parent 1ae4b45007
commit 0ebe000a26
9 changed files with 74 additions and 17 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ export function MonitoringPage({ events, token, services }: MonitoringPageProps)
const serviceRef = useRef<HTMLDivElement>(null);
const { data: allHistory, loading: historyLoading } = useAllStatsHistory(statsRange, token);
const [containerSettings, setContainerSettings] = useState<Record<string, ContainerSettings>>({});
const [globalThresholds, setGlobalThresholds] = useState<{ cpu: number; mem: number }>({ cpu: 80, mem: 90 });
const [globalThresholds, setGlobalThresholds] = useState<{ cpu: number; mem: number }>({ cpu: 50, mem: 60 });
const [discordEnabled, setDiscordEnabled] = useState(false);
// Load thresholds
+4 -4
View File
@@ -19,8 +19,8 @@ const DEFAULT_CONFIG: DiscordConfig = {
actionErrors: true,
},
thresholds: {
cpuPercent: 80,
memPercent: 90,
cpuPercent: 50,
memPercent: 60,
},
cooldownMinutes: 5,
downReminderMinutes: 5,
@@ -261,7 +261,7 @@ export function SettingsPage({ projects, servicesCount, token }: SettingsPagePro
</div>
<input
type="range"
min={50}
min={10}
max={100}
value={config.thresholds.cpuPercent}
onChange={(e) => updateThresholds("cpuPercent", parseInt(e.target.value))}
@@ -275,7 +275,7 @@ export function SettingsPage({ projects, servicesCount, token }: SettingsPagePro
</div>
<input
type="range"
min={50}
min={10}
max={100}
value={config.thresholds.memPercent}
onChange={(e) => updateThresholds("memPercent", parseInt(e.target.value))}
+1 -1
View File
@@ -90,7 +90,7 @@ export function DetailPanel({ service, stats, logLines, token, closing, onClose,
const [csLoaded, setCsLoaded] = useState(false);
const [csSaving, setCsSaving] = useState(false);
const [csSaved, setCsSaved] = useState(false);
const [globalThresholds, setGlobalThresholds] = useState<{ cpu: number; mem: number }>({ cpu: 80, mem: 90 });
const [globalThresholds, setGlobalThresholds] = useState<{ cpu: number; mem: number }>({ cpu: 50, mem: 60 });
const [discordEnabled, setDiscordEnabled] = useState(false);
const [statsRange, setStatsRange] = useState<StatsRange>("1h");
const { data: historyData, loading: historyLoading } = useStatsHistory(service.uid, statsRange, token);
+2 -2
View File
@@ -15,8 +15,8 @@ const DEFAULT_CONFIG: DiscordConfig = {
actionErrors: true,
},
thresholds: {
cpuPercent: 80,
memPercent: 90,
cpuPercent: 50,
memPercent: 60,
},
cooldownMinutes: 5,
downReminderMinutes: 5,