Add ResourceHub for real-time updates and implement web dashboard with REST API

- Created ResourceHub.cs for SignalR group management.
- Developed a modern web dashboard using Tailwind CSS for responsive design.
- Implemented real-time updates with SignalR for CPU, Memory, GPU, and Network usage.
- Added REST API endpoints for resource information and process management.
- Integrated process management features to view and terminate high-usage processes.
- Enhanced UI with loading spinners, notifications, and responsive tables.
- Included performance charts for historical CPU and Memory usage.
- Configured Swagger UI for API documentation.
- Established security features including process kill restrictions and API key authentication.
This commit is contained in:
Phoenix
2025-08-07 23:02:03 +08:00
parent aa30c9f034
commit 3d47fc1439
23 changed files with 1405 additions and 547 deletions
+93
View File
@@ -0,0 +1,93 @@
/* Custom styles for Resource Monitor Dashboard */
.loading-spinner {
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.fade-in {
animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.slide-down {
animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Custom progress bar animations */
.progress-bar {
transition: width 0.5s ease-in-out;
}
/* Responsive table */
@media (max-width: 768px) {
.mobile-table {
font-size: 0.875rem;
}
.mobile-table th,
.mobile-table td {
padding: 0.5rem 0.25rem;
}
}
/* Custom notification styles */
.notification {
position: fixed;
top: 1rem;
right: 1rem;
z-index: 1000;
max-width: 400px;
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Process table hover effects */
.process-row:hover {
background-color: #f9fafb;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
transition: all 0.2s ease;
}
/* Chart container responsive */
.chart-container {
position: relative;
height: 200px;
width: 100%;
}
@media (max-width: 640px) {
.chart-container {
height: 150px;
}
}