mirror of
https://github.com/RGJorge/ContainerFlow.git
synced 2026-08-03 07:21:42 +02:00
v0.0.28
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -15,8 +15,8 @@ const DEFAULT_CONFIG: DiscordConfig = {
|
||||
actionErrors: true,
|
||||
},
|
||||
thresholds: {
|
||||
cpuPercent: 80,
|
||||
memPercent: 90,
|
||||
cpuPercent: 50,
|
||||
memPercent: 60,
|
||||
},
|
||||
cooldownMinutes: 5,
|
||||
downReminderMinutes: 5,
|
||||
|
||||
Reference in New Issue
Block a user