mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-14 19:42:06 +01:00
806 lines
25 KiB
HTML
806 lines
25 KiB
HTML
{% extends "baseTemplate/index.html" %}
|
|
{% load i18n %}
|
|
{% block title %}{% trans "Top Processes - CyberPanel" %}{% endblock %}
|
|
{% block content %}
|
|
|
|
{% load static %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
|
|
|
<style>
|
|
.modern-container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.page-header {
|
|
text-align: center;
|
|
margin-bottom: 3rem;
|
|
padding: 3rem 0;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border-radius: 20px;
|
|
animation: fadeInDown 0.5s ease-out;
|
|
position: relative;
|
|
overflow: hidden;
|
|
color: white;
|
|
}
|
|
|
|
.page-header::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: -50%;
|
|
right: -50%;
|
|
width: 200%;
|
|
height: 200%;
|
|
background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
|
|
animation: rotate 30s linear infinite;
|
|
}
|
|
|
|
.header-content {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 2.5rem;
|
|
font-weight: 700;
|
|
margin-bottom: 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.process-icon {
|
|
width: 60px;
|
|
height: 60px;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.page-subtitle {
|
|
font-size: 1.125rem;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.auto-refresh-indicator {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 20px;
|
|
font-size: 0.875rem;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.refresh-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #4ade80;
|
|
border-radius: 50%;
|
|
animation: pulse 1.5s infinite;
|
|
}
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
gap: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.stat-card {
|
|
background: white;
|
|
border-radius: 16px;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 40px rgba(0,0,0,0.08);
|
|
border: 1px solid #e8e9ff;
|
|
padding: 1.5rem;
|
|
transition: all 0.3s ease;
|
|
animation: fadeInUp 0.5s ease-out;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.stat-card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 20px 60px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.stat-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 4px;
|
|
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
|
|
}
|
|
|
|
.stat-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.stat-title {
|
|
font-size: 0.875rem;
|
|
color: #64748b;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.stat-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
background: #f3e8ff;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #667eea;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.stat-content {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 1rem;
|
|
}
|
|
|
|
.stat-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.75rem;
|
|
color: #94a3b8;
|
|
}
|
|
|
|
.processes-panel {
|
|
background: white;
|
|
border-radius: 16px;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 40px rgba(0,0,0,0.08);
|
|
border: 1px solid #e8e9ff;
|
|
overflow: hidden;
|
|
animation: fadeInUp 0.5s ease-out 0.2s;
|
|
animation-fill-mode: both;
|
|
}
|
|
|
|
.panel-header {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
padding: 1.5rem 2rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.panel-title {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.search-box {
|
|
position: relative;
|
|
width: 300px;
|
|
}
|
|
|
|
.search-input {
|
|
width: 100%;
|
|
padding: 0.5rem 1rem 0.5rem 2.5rem;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
color: white;
|
|
placeholder-color: rgba(255, 255, 255, 0.7);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.search-input::placeholder {
|
|
color: rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.search-input:focus {
|
|
outline: none;
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.search-icon {
|
|
position: absolute;
|
|
left: 0.75rem;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.table-container {
|
|
overflow-x: auto;
|
|
max-height: 600px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.modern-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.modern-table thead {
|
|
position: sticky;
|
|
top: 0;
|
|
background: #f8f9ff;
|
|
z-index: 10;
|
|
}
|
|
|
|
.modern-table th {
|
|
padding: 1rem;
|
|
text-align: left;
|
|
font-weight: 600;
|
|
color: #475569;
|
|
font-size: 0.875rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
border-bottom: 1px solid #e8e9ff;
|
|
}
|
|
|
|
.modern-table td {
|
|
padding: 1rem;
|
|
font-size: 0.875rem;
|
|
color: #1e293b;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
}
|
|
|
|
.modern-table tbody tr {
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.modern-table tbody tr:hover {
|
|
background: #f8f9ff;
|
|
}
|
|
|
|
.process-user {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 28px;
|
|
height: 28px;
|
|
background: #e8e9ff;
|
|
border-radius: 6px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
color: #667eea;
|
|
}
|
|
|
|
.process-state {
|
|
display: inline-flex;
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 6px;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.state-running {
|
|
background: #d1fae5;
|
|
color: #065f46;
|
|
}
|
|
|
|
.state-sleeping {
|
|
background: #dbeafe;
|
|
color: #1e40af;
|
|
}
|
|
|
|
.state-stopped {
|
|
background: #fef3c7;
|
|
color: #92400e;
|
|
}
|
|
|
|
.state-zombie {
|
|
background: #fee2e2;
|
|
color: #991b1b;
|
|
}
|
|
|
|
.cpu-usage {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.usage-bar {
|
|
width: 60px;
|
|
height: 6px;
|
|
background: #e5e7eb;
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
.usage-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
.command-text {
|
|
font-family: 'Monaco', 'Consolas', monospace;
|
|
font-size: 0.75rem;
|
|
background: #f3f4f6;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 4px;
|
|
max-width: 300px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.kill-button {
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 6px;
|
|
background: #dc2626;
|
|
color: white;
|
|
border: none;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.kill-button:hover {
|
|
background: #b91c1c;
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
|
|
}
|
|
|
|
.loading-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 100;
|
|
}
|
|
|
|
.loading-spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid #f3f3f3;
|
|
border-top: 3px solid #667eea;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
.metric-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 0.25rem 0.5rem;
|
|
background: #f3f4f6;
|
|
border-radius: 4px;
|
|
font-size: 0.75rem;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.metric-high {
|
|
background: #fee2e2;
|
|
color: #991b1b;
|
|
}
|
|
|
|
.metric-medium {
|
|
background: #fef3c7;
|
|
color: #92400e;
|
|
}
|
|
|
|
.metric-low {
|
|
background: #d1fae5;
|
|
color: #065f46;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
}
|
|
|
|
@keyframes rotate {
|
|
from { transform: rotate(0deg); }
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
@keyframes fadeInDown {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.page-title {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.search-box {
|
|
width: 100%;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.panel-header {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.table-container {
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.command-text {
|
|
max-width: 150px;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<div class="modern-container" ng-controller="topProcesses">
|
|
<div class="page-header">
|
|
<div class="header-content">
|
|
<h1 class="page-title">
|
|
<div class="process-icon">
|
|
<i class="fas fa-microchip" style="font-size: 1.75rem;"></i>
|
|
</div>
|
|
{% trans "System Processes Monitor" %}
|
|
</h1>
|
|
<p class="page-subtitle">
|
|
{% trans "Real-time monitoring of system processes, CPU usage, memory consumption, and resource allocation" %}
|
|
</p>
|
|
<div class="auto-refresh-indicator">
|
|
<span class="refresh-dot"></span>
|
|
{% trans "Auto-refresh every 3 seconds" %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Loading Overlay -->
|
|
<div class="loading-overlay" ng-show="!cyberPanelLoading">
|
|
<div class="loading-spinner"></div>
|
|
</div>
|
|
|
|
<!-- CPU & System Stats -->
|
|
<div class="stats-grid">
|
|
<!-- CPU Info -->
|
|
<div class="stat-card">
|
|
<div class="stat-header">
|
|
<h3 class="stat-title">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-microchip"></i>
|
|
</div>
|
|
{% trans "CPU Information" %}
|
|
</h3>
|
|
</div>
|
|
<div class="stat-content">
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ cores || '-' $}</span>
|
|
<span class="stat-label">{% trans "Cores" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ cpuMHZ || '-' $} MHz</span>
|
|
<span class="stat-label">{% trans "Frequency" %}</span>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e8e9ff;">
|
|
<div style="font-size: 0.75rem; color: #64748b;">
|
|
<strong>{% trans "Model:" %}</strong> {$ modelName || '-' $}<br>
|
|
<strong>{% trans "Cache:" %}</strong> {$ cacheSize || '-' $}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Process Stats -->
|
|
<div class="stat-card">
|
|
<div class="stat-header">
|
|
<h3 class="stat-title">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-tasks"></i>
|
|
</div>
|
|
{% trans "Process Statistics" %}
|
|
</h3>
|
|
</div>
|
|
<div class="stat-content">
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ totalProcesses || '0' $}</span>
|
|
<span class="stat-label">{% trans "Total" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value" style="color: #10b981;">{$ runningProcesses || '0' $}</span>
|
|
<span class="stat-label">{% trans "Running" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value" style="color: #3b82f6;">{$ sleepingProcesses || '0' $}</span>
|
|
<span class="stat-label">{% trans "Sleeping" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value" style="color: #ef4444;">
|
|
<span ng-if="zombieProcesses > 0">{$ zombieProcesses $}</span>
|
|
<span ng-if="!zombieProcesses || zombieProcesses == 0">0</span>
|
|
</span>
|
|
<span class="stat-label">{% trans "Zombie" %}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- CPU Load -->
|
|
<div class="stat-card">
|
|
<div class="stat-header">
|
|
<h3 class="stat-title">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-chart-line"></i>
|
|
</div>
|
|
{% trans "CPU Load Average" %}
|
|
</h3>
|
|
</div>
|
|
<div class="stat-content">
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ cpuOne || '-' $}</span>
|
|
<span class="stat-label">{% trans "1 Min" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ cpuFive || '-' $}</span>
|
|
<span class="stat-label">{% trans "5 Min" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ cpuFifteen || '-' $}</span>
|
|
<span class="stat-label">{% trans "15 Min" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ cpuNow || '-' $}%</span>
|
|
<span class="stat-label">{% trans "Current" %}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Memory Stats -->
|
|
<div class="stat-card">
|
|
<div class="stat-header">
|
|
<h3 class="stat-title">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-memory"></i>
|
|
</div>
|
|
{% trans "Memory Usage" %}
|
|
</h3>
|
|
</div>
|
|
<div class="stat-content">
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ totalMemory || '-' $}</span>
|
|
<span class="stat-label">{% trans "Total" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value" style="color: #10b981;">{$ freeMemory || '-' $}</span>
|
|
<span class="stat-label">{% trans "Free" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value" style="color: #ef4444;">{$ usedMemory || '-' $}</span>
|
|
<span class="stat-label">{% trans "Used" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ buffCache || '-' $}</span>
|
|
<span class="stat-label">{% trans "Buff/Cache" %}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Swap Stats -->
|
|
<div class="stat-card">
|
|
<div class="stat-header">
|
|
<h3 class="stat-title">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-hdd"></i>
|
|
</div>
|
|
{% trans "Swap Memory" %}
|
|
</h3>
|
|
</div>
|
|
<div class="stat-content">
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ swapTotalMemory || '-' $}</span>
|
|
<span class="stat-label">{% trans "Total" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value" style="color: #10b981;">{$ swapFreeMemory || '-' $}</span>
|
|
<span class="stat-label">{% trans "Free" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value" style="color: #ef4444;">{$ swapUsedMemory || '-' $}</span>
|
|
<span class="stat-label">{% trans "Used" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ swapBuffCache || '-' $}</span>
|
|
<span class="stat-label">{% trans "Available" %}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- CPU Time Stats -->
|
|
<div class="stat-card">
|
|
<div class="stat-header">
|
|
<h3 class="stat-title">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-clock"></i>
|
|
</div>
|
|
{% trans "CPU Time Distribution" %}
|
|
</h3>
|
|
</div>
|
|
<div class="stat-content">
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ ioWait || '-' $}%</span>
|
|
<span class="stat-label">{% trans "I/O Wait" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ idleTime || '-' $}%</span>
|
|
<span class="stat-label">{% trans "Idle Time" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ hwInterrupts || '-' $}%</span>
|
|
<span class="stat-label">{% trans "HW Interrupts" %}</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-value">{$ Softirqs || '-' $}%</span>
|
|
<span class="stat-label">{% trans "Soft IRQs" %}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Process List -->
|
|
<div class="processes-panel">
|
|
<div class="panel-header">
|
|
<h2 class="panel-title">
|
|
<i class="fas fa-list"></i>
|
|
{% trans "Running Processes" %}
|
|
</h2>
|
|
<div class="search-box">
|
|
<i class="fas fa-search search-icon"></i>
|
|
<input type="text" class="search-input" placeholder="{% trans 'Search processes...' %}" ng-model="search">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-container">
|
|
<table class="modern-table">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "PID" %}</th>
|
|
<th>{% trans "User" %}</th>
|
|
<th>{% trans "State" %}</th>
|
|
<th>{% trans "CPU %" %}</th>
|
|
<th>{% trans "Memory %" %}</th>
|
|
<th>{% trans "VIRT" %}</th>
|
|
<th>{% trans "RES" %}</th>
|
|
<th>{% trans "Time" %}</th>
|
|
<th>{% trans "Command" %}</th>
|
|
<th>{% trans "Actions" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="process in processes | filter:search">
|
|
<td>
|
|
<span style="font-weight: 600; color: #667eea;">{$ process.PID $}</span>
|
|
</td>
|
|
<td>
|
|
<div class="process-user">
|
|
<div class="user-avatar">{$ process.User.charAt(0).toUpperCase() $}</div>
|
|
<span>{$ process.User $}</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="process-state"
|
|
ng-class="{'state-running': process.S == 'R',
|
|
'state-sleeping': process.S == 'S',
|
|
'state-stopped': process.S == 'T',
|
|
'state-zombie': process.S == 'Z'}">
|
|
<span ng-if="process.S == 'R'">Running</span>
|
|
<span ng-if="process.S == 'S'">Sleeping</span>
|
|
<span ng-if="process.S == 'T'">Stopped</span>
|
|
<span ng-if="process.S == 'Z'">Zombie</span>
|
|
<span ng-if="process.S != 'R' && process.S != 'S' && process.S != 'T' && process.S != 'Z'">{$ process.S $}</span>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<div class="cpu-usage">
|
|
<div class="usage-bar">
|
|
<div class="usage-fill" ng-style="{'width': process.CPU + '%'}"></div>
|
|
</div>
|
|
<span class="metric-badge"
|
|
ng-class="{'metric-high': process.CPU > 80,
|
|
'metric-medium': process.CPU > 50 && process.CPU <= 80,
|
|
'metric-low': process.CPU <= 50}">
|
|
{$ process.CPU $}%
|
|
</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="metric-badge"
|
|
ng-class="{'metric-high': process.MEM > 20,
|
|
'metric-medium': process.MEM > 10 && process.MEM <= 20,
|
|
'metric-low': process.MEM <= 10}">
|
|
{$ process.MEM $}%
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span style="font-family: monospace; font-size: 0.875rem;">{$ process.VIRT $}</span>
|
|
</td>
|
|
<td>
|
|
<span style="font-family: monospace; font-size: 0.875rem;">{$ process.RES $}</span>
|
|
</td>
|
|
<td>
|
|
<span style="font-family: monospace; font-size: 0.875rem;">{$ process.Time $}</span>
|
|
</td>
|
|
<td>
|
|
<div class="command-text" title="{$ process.Command $}">
|
|
{$ process.Command $}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<button ng-click="killProcess(process.PID)" class="kill-button">
|
|
<i class="fas fa-times"></i>
|
|
{% trans "Kill" %}
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block footer_scripts %}
|
|
<script src="{% static 'serverStatus/serverStatus.js' %}"></script>
|
|
{% endblock %} |