245 lines
7.9 KiB
HTML
245 lines
7.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Process Manager - Overlord</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
<link rel="stylesheet" href="/assets/tailwind.css" />
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
|
|
crossorigin="anonymous"
|
|
referrerpolicy="no-referrer"
|
|
/>
|
|
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico" />
|
|
<script src="https://cdn.jsdelivr.net/npm/msgpackr@1.11.8/dist/index.js"></script>
|
|
<style>
|
|
body {
|
|
font-family: "Inter", sans-serif;
|
|
}
|
|
.process-row:hover {
|
|
background-color: rgba(51, 65, 85, 0.5);
|
|
}
|
|
.process-row.selected {
|
|
background-color: rgba(59, 130, 246, 0.3);
|
|
border-color: rgba(59, 130, 246, 0.6);
|
|
}
|
|
/* Dark scrollbar styling */
|
|
#process-list::-webkit-scrollbar {
|
|
width: 12px;
|
|
}
|
|
#process-list::-webkit-scrollbar-track {
|
|
background: #1e293b;
|
|
border-radius: 0 0 0.5rem 0;
|
|
}
|
|
#process-list::-webkit-scrollbar-thumb {
|
|
background: #475569;
|
|
border-radius: 6px;
|
|
border: 2px solid #1e293b;
|
|
}
|
|
#process-list::-webkit-scrollbar-thumb:hover {
|
|
background: #64748b;
|
|
}
|
|
.tree-indent {
|
|
display: inline-block;
|
|
width: 20px;
|
|
}
|
|
.tree-icon {
|
|
display: inline-block;
|
|
width: 16px;
|
|
text-align: center;
|
|
margin-right: 4px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
.tree-icon:hover {
|
|
color: #60a5fa;
|
|
}
|
|
.process-row.collapsed > .children {
|
|
display: none;
|
|
}
|
|
|
|
/* Mobile responsive styles */
|
|
@media (max-width: 768px) {
|
|
header {
|
|
padding: 0.75rem;
|
|
}
|
|
header .flex {
|
|
flex-wrap: nowrap;
|
|
gap: 0.5rem;
|
|
}
|
|
header span,
|
|
header a {
|
|
font-size: 0.875rem;
|
|
}
|
|
#client-id-header {
|
|
display: none;
|
|
}
|
|
main {
|
|
padding: 1rem 0.5rem;
|
|
}
|
|
.process-header {
|
|
display: none !important;
|
|
}
|
|
#process-list {
|
|
max-height: calc(100vh - 300px) !important;
|
|
}
|
|
#process-list .process-row {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
padding: 0.75rem !important;
|
|
font-size: 0.875rem;
|
|
}
|
|
#process-list .process-row > div {
|
|
width: 100% !important;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
.process-row .tree-indent {
|
|
width: 10px;
|
|
}
|
|
.color-legend {
|
|
flex-wrap: wrap;
|
|
font-size: 0.65rem;
|
|
gap: 0.5rem !important;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="min-h-screen bg-slate-950 text-slate-100">
|
|
<header id="top-nav"></header>
|
|
|
|
<main class="px-5 py-6">
|
|
<div class="max-w-7xl mx-auto flex flex-col gap-5">
|
|
<!-- Status Bar -->
|
|
<div class="flex items-center justify-between gap-3 flex-wrap">
|
|
<div class="flex items-center gap-2 flex-wrap">
|
|
<span
|
|
id="status-indicator"
|
|
class="inline-flex items-center gap-2 px-3 py-2 rounded-full bg-slate-800 text-slate-300"
|
|
>
|
|
<i class="fa-solid fa-circle-notch fa-spin"></i> Connecting...
|
|
</span>
|
|
<span
|
|
id="client-id-header"
|
|
class="inline-flex items-center gap-2 px-3 py-2 rounded-full bg-slate-900/60 text-slate-200 border border-slate-800"
|
|
>
|
|
<i class="fa-solid fa-microchip"></i>
|
|
<span>Loading client...</span>
|
|
</span>
|
|
<span
|
|
id="process-count"
|
|
class="inline-flex items-center gap-2 px-3 py-2 rounded-full bg-slate-800 text-slate-400"
|
|
>
|
|
<i class="fa-solid fa-list"></i> 0 processes
|
|
</span>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<button
|
|
id="refresh-btn"
|
|
class="inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-blue-600 hover:bg-blue-700 text-white"
|
|
disabled
|
|
>
|
|
<i class="fa-solid fa-refresh"></i> Refresh
|
|
</button>
|
|
<button
|
|
id="kill-btn"
|
|
class="inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-red-600 hover:bg-red-700 text-white"
|
|
disabled
|
|
>
|
|
<i class="fa-solid fa-skull-crossbones"></i> Kill Process
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Search Bar -->
|
|
<div
|
|
class="flex items-center gap-2 px-4 py-3 bg-slate-900/70 border border-slate-800 rounded-lg"
|
|
>
|
|
<i class="fa-solid fa-magnifying-glass text-slate-500"></i>
|
|
<input
|
|
id="search-input"
|
|
type="text"
|
|
placeholder="Search by process name or PID..."
|
|
class="bg-transparent outline-none w-full text-slate-100 placeholder:text-slate-500"
|
|
/>
|
|
</div>
|
|
|
|
<!-- Color Legend -->
|
|
<div
|
|
class="color-legend flex items-center gap-4 px-4 py-2 bg-slate-900/50 border border-slate-800 rounded-lg text-xs"
|
|
>
|
|
<span class="text-slate-500 font-semibold">Process Types:</span>
|
|
<div class="flex items-center gap-1.5">
|
|
<i class="fa-solid fa-circle text-purple-400"></i>
|
|
<span class="text-slate-400">System</span>
|
|
</div>
|
|
<div class="flex items-center gap-1.5">
|
|
<i class="fa-solid fa-circle text-cyan-400"></i>
|
|
<span class="text-slate-400">Service</span>
|
|
</div>
|
|
<div class="flex items-center gap-1.5">
|
|
<i class="fa-solid fa-circle text-green-300"></i>
|
|
<span class="text-slate-400">Own</span>
|
|
</div>
|
|
<div class="flex items-center gap-1.5">
|
|
<i class="fa-solid fa-circle text-slate-200"></i>
|
|
<span class="text-slate-400">Other</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Process List -->
|
|
<div
|
|
class="bg-slate-900/70 border border-slate-800 rounded-lg overflow-hidden"
|
|
>
|
|
<div
|
|
class="process-header grid grid-cols-12 gap-3 px-4 py-3 bg-slate-800 border-b border-slate-700 text-xs font-semibold uppercase text-slate-400"
|
|
>
|
|
<div
|
|
class="col-span-1 cursor-pointer hover:text-slate-200"
|
|
id="sort-pid"
|
|
>
|
|
PID <i class="fa-solid fa-sort"></i>
|
|
</div>
|
|
<div
|
|
class="col-span-4 cursor-pointer hover:text-slate-200"
|
|
id="sort-name"
|
|
>
|
|
Name <i class="fa-solid fa-sort"></i>
|
|
</div>
|
|
<div
|
|
class="col-span-2 cursor-pointer hover:text-slate-200"
|
|
id="sort-cpu"
|
|
>
|
|
CPU % <i class="fa-solid fa-sort"></i>
|
|
</div>
|
|
<div
|
|
class="col-span-2 cursor-pointer hover:text-slate-200"
|
|
id="sort-memory"
|
|
>
|
|
Memory <i class="fa-solid fa-sort"></i>
|
|
</div>
|
|
<div class="col-span-3">User</div>
|
|
</div>
|
|
<div
|
|
id="process-list"
|
|
class="divide-y divide-slate-800 max-h-[calc(100vh-400px)] overflow-y-auto"
|
|
>
|
|
<!-- Processes will be inserted here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script type="module" src="/assets/nav.js"></script>
|
|
<script type="module" src="/assets/processes.js"></script>
|
|
</body>
|
|
</html>
|