Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit e0f332d

Browse files
authored
Merge pull request #7 from ZeroHost-Code/beta
Beta
2 parents b8f295f + 0537029 commit e0f332d

3 files changed

Lines changed: 2 additions & 116 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zerohost-dashboard",
3-
"version": "0.9.8",
3+
"version": "0.9.9",
44
"private": true,
55
"type": "module",
66
"scripts": {

public/css/style.css

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,19 +1137,7 @@ tbody tr:hover {
11371137
to { opacity: 1; transform: translateY(0); }
11381138
}
11391139

1140-
/* ===== RESOURCE BAR ===== */
1141-
.resource-bar {
1142-
margin-top: 8px;
1143-
height: 4px;
1144-
background: rgba(255,255,255,0.06);
1145-
border-radius: 2px;
1146-
overflow: hidden;
1147-
}
11481140

1149-
.resource-bar-fill {
1150-
height: 100%;
1151-
border-radius: 2px;
1152-
background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
11531141
transition: width 0.5s ease;
11541142
}
11551143

@@ -1788,69 +1776,7 @@ tbody tr:hover {
17881776
color: var(--accent-1);
17891777
}
17901778

1791-
/* ===== RESOURCE BARS ===== */
1792-
.resource-bars {
1793-
display: flex;
1794-
flex-direction: column;
1795-
gap: 6px;
1796-
margin-top: 8px;
1797-
}
17981779

1799-
.resource-bar-row {
1800-
display: flex;
1801-
align-items: center;
1802-
gap: 8px;
1803-
}
1804-
1805-
.resource-bar-icon {
1806-
width: 16px;
1807-
height: 16px;
1808-
flex-shrink: 0;
1809-
color: var(--text-muted);
1810-
}
1811-
1812-
.resource-bar-track {
1813-
flex: 1;
1814-
height: 6px;
1815-
background: rgba(255,255,255,0.06);
1816-
border-radius: 99px;
1817-
overflow: hidden;
1818-
position: relative;
1819-
}
1820-
1821-
.resource-bar-fill {
1822-
height: 100%;
1823-
border-radius: 99px;
1824-
background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
1825-
transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
1826-
width: 0%;
1827-
position: relative;
1828-
}
1829-
1830-
.resource-bar-fill.memory { background: linear-gradient(90deg, #ee8132, #f59e0b); }
1831-
.resource-bar-fill.cpu { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
1832-
.resource-bar-fill.disk { background: linear-gradient(90deg, #059669, #10b981); }
1833-
1834-
.resource-bar-fill.usage-low { background: linear-gradient(90deg, #059669, #10b981); }
1835-
.resource-bar-fill.usage-mid { background: linear-gradient(90deg, #f59e0b, #ee8132); }
1836-
.resource-bar-fill.usage-high { background: linear-gradient(90deg, #ef4444, #dc2626); }
1837-
1838-
.resource-bar-label {
1839-
font-size: 0.68rem;
1840-
color: var(--text-muted);
1841-
font-family: 'JetBrains Mono', monospace;
1842-
white-space: nowrap;
1843-
min-width: 75px;
1844-
text-align: right;
1845-
}
1846-
1847-
.resource-bar-value {
1848-
font-size: 0.68rem;
1849-
color: var(--text-secondary);
1850-
font-family: 'JetBrains Mono', monospace;
1851-
white-space: nowrap;
1852-
min-width: 32px;
1853-
}
18541780

18551781
/* Resource gauges for server detail */
18561782
.resource-gauges {

public/js/app.js

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ async function renderDashboard() {
484484
<div style="padding:8px 12px 0;display:flex;gap:16px;justify-content:center;flex-wrap:wrap">
485485
486486
</div>
487-
<div style="padding:4px 0 8px;text-align:center;font-size:0.7rem;color:var(--text-muted);letter-spacing:0.05em">v0.9.8 BETA</div>
487+
<div style="padding:4px 0 8px;text-align:center;font-size:0.7rem;color:var(--text-muted);letter-spacing:0.05em">v0.9.9 BETA</div>
488488
</div>
489489
<div class="sidebar-resizer" id="sidebar-resizer"></div>
490490
</aside>
@@ -641,14 +641,6 @@ async function renderOverview() {
641641
<div class="stat-card"><div class="stat-icon"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="2" width="20" height="20" rx="4"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/></svg></div><div class="stat-value" id="stat-slots"></div><div class="stat-label">Server Slots</div></div>
642642
<div class="stat-card"><div class="stat-icon"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg></div><div class="stat-value" id="stat-renew"></div><div class="stat-label">To Renew</div></div>
643643
</div>
644-
<div class="card" style="margin-bottom:20px" id="resource-summary-card">
645-
<div class="card-header">
646-
<h2 class="card-title">Resource Overview</h2>
647-
</div>
648-
<div id="resource-summary-content">
649-
<div style="text-align:center;padding:16px;color:var(--text-secondary)"><span class="spinner"></span> Loading...</div>
650-
</div>
651-
</div>
652644
<div class="card">
653645
<div class="card-header">
654646
<h2 class="card-title">Recent Servers</h2>
@@ -682,38 +674,6 @@ async function renderOverview() {
682674
$('#stat-renew').textContent = toRenew;
683675
state.servers = data.servers;
684676

685-
// Resource summary
686-
const servers = data.servers;
687-
const totalMem = servers.reduce((sum, s) => sum + (s.limits?.memory || 0), 0);
688-
const totalCpu = servers.reduce((sum, s) => sum + (s.limits?.cpu || 0), 0);
689-
const totalDisk = servers.reduce((sum, s) => sum + (s.limits?.disk || 0), 0);
690-
const maxMem = limit * 512;
691-
const maxDisk = limit * 3072;
692-
const maxCpu = limit * 50;
693-
const memPct = maxMem > 0 ? Math.min(100, Math.round((totalMem / maxMem) * 100)) : 0;
694-
const cpuPct = maxCpu > 0 ? Math.min(100, Math.round((totalCpu / maxCpu) * 100)) : 0;
695-
const diskPct = maxDisk > 0 ? Math.min(100, Math.round((totalDisk / maxDisk) * 100)) : 0;
696-
697-
$('#resource-summary-content').innerHTML = html`
698-
<div class="resource-bars">
699-
<div class="resource-bar-row">
700-
<svg class="resource-bar-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="5" width="20" height="14" rx="2"/><line x1="6" y1="9" x2="6" y2="15"/><line x1="10" y1="9" x2="10" y2="15"/><line x1="14" y1="9" x2="14" y2="15"/><line x1="18" y1="9" x2="18" y2="15"/></svg>
701-
<div class="resource-bar-track" style="height:8px"><div class="resource-bar-fill memory" style="width:${memPct}%"></div></div>
702-
<span class="resource-bar-label">${totalMem} / ${maxMem} MB</span>
703-
</div>
704-
<div class="resource-bar-row">
705-
<svg class="resource-bar-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="6" width="12" height="12" rx="2"/><path d="M12 2v4M12 18v4M2 12h4M18 12h4"/><line x1="8" y1="2" x2="8" y2="4"/><line x1="16" y1="2" x2="16" y2="4"/><line x1="8" y1="20" x2="8" y2="22"/><line x1="16" y1="20" x2="16" y2="22"/><line x1="2" y1="8" x2="4" y2="8"/><line x1="2" y1="16" x2="4" y2="16"/><line x1="20" y1="8" x2="22" y2="8"/><line x1="20" y1="16" x2="22" y2="16"/></svg>
706-
<div class="resource-bar-track" style="height:8px"><div class="resource-bar-fill cpu" style="width:${cpuPct}%"></div></div>
707-
<span class="resource-bar-label">${totalCpu} / ${maxCpu}%</span>
708-
</div>
709-
<div class="resource-bar-row">
710-
<svg class="resource-bar-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>
711-
<div class="resource-bar-track" style="height:8px"><div class="resource-bar-fill disk" style="width:${diskPct}%"></div></div>
712-
<span class="resource-bar-label">${(totalDisk / 1024).toFixed(1)} / ${(maxDisk / 1024).toFixed(1)} GB</span>
713-
</div>
714-
</div>
715-
`;
716-
717677
if (data.servers.length === 0 && !data.pteroError) {
718678
$('#recent-servers-list').innerHTML = html`
719679
<div class="empty-state">

0 commit comments

Comments
 (0)