diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index 392f324..bbc36d6 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -539,6 +539,64 @@ function App(): JSX.Element {
);
};
+ const ProjectResourceMonitor = ({ serverStats, phpStats, serverType }: { serverStats?: ServiceInfo; phpStats?: ServiceInfo; serverType: string }) => {
+ const hasServerStat = serverStats?.cpu !== undefined || serverStats?.memory !== undefined;
+ const hasPhpStat = phpStats?.cpu !== undefined || phpStats?.memory !== undefined;
+
+ if (!hasServerStat && !hasPhpStat) return null;
+
+ const renderMiniStats = (stats?: ServiceInfo, label: string = 'Service') => {
+ if (!stats) return null;
+ const cpu = stats.cpu || 0;
+ const memory = stats.memory || 0;
+ const ramMB = Math.round(memory / (1024 * 1024));
+ const ramPercent = Math.min((ramMB / 1024) * 100, 100);
+
+ return (
+
+
+ {label.toUpperCase()}
+
+ {cpu}%
+ {formatMemory(memory)}
+
+
+
+
+
+
+
+ );
+ };
+
+ return (
+
+ {renderMiniStats(serverStats, serverType)}
+ {renderMiniStats(phpStats, 'PHP')}
+
+ );
+ };
+
const handleAddProject = async () => {
if (!window.api) return
if (newProject.id) {
@@ -1543,7 +1601,7 @@ function App(): JSX.Element {
)}
- handleRemoveProject(project.id)} sx={{ color: 'rgba(255,255,255,0.4)', '&:hover': { color: '#ff4444' } }}>
+ handleRemoveProject(project.id)} sx={{ color: 'rgba(255,255,255,0.4)', '&:hover': { color: '#ff4444' } }}>
@@ -1566,6 +1624,12 @@ function App(): JSX.Element {
/>
+
+