Skip to content

Commit ff2a9ac

Browse files
authored
compact lisjt
1 parent 2281279 commit ff2a9ac

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

dashboard.html

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
.main-layout {
2727
display: grid;
28-
grid-template-columns: 280px 420px 1fr;
28+
grid-template-columns: 280px 600px 1fr;
2929
height: 100vh;
3030
gap: 0;
3131
background: radial-gradient(circle at top right, #1e293b, #0f172a);
@@ -132,7 +132,7 @@ <h2 id="list-title" class="text-2xl font-bold text-white tracking-tight">Endpoin
132132
</button>
133133
</header>
134134

135-
<div id="endpoints-container" class="flex-grow px-6 pb-8 custom-scrollbar overflow-y-auto space-y-2">
135+
<div id="endpoints-container" class="flex-grow px-6 pb-8 custom-scrollbar overflow-y-auto space-y-1 max-h-full">
136136
</div>
137137
</main>
138138

@@ -353,33 +353,45 @@ <h3 class="text-xl font-bold text-white">Data Lifecycle</h3>
353353
function renderEndpointsList() {
354354
if(!globalData) return;
355355
const list = document.getElementById('endpoints-container');
356-
let filtered = (currentFilter.type === 'ALL') ? globalData.endpoints :
356+
let filtered = (currentFilter.type === 'ALL') ? globalData.endpoints :
357357
(currentFilter.type === 'APP') ? globalData.endpoints.filter(e => e.name.startsWith(currentFilter.value + '_')) :
358358
globalData.endpoints.filter(e => e.owners && e.owners.includes(currentFilter.value));
359-
359+
360360
list.innerHTML = filtered.map(ep => {
361361
let statusClass = 'bg-red-500';
362-
if(ep.last_activity && (new Date() - new Date(ep.last_activity)) < 3600000) statusClass = 'bg-emerald-500 glow-green';
362+
let statusText = 'Offline';
363+
if(ep.last_activity && (new Date() - new Date(ep.last_activity)) < 3600000) {
364+
statusClass = 'bg-emerald-500 glow-green';
365+
statusText = 'Recent';
366+
}
367+
363368
const active = currentEp === ep.name ? 'item-active bg-white/5 scale-[1.02]' : 'hover:bg-white/5';
364-
365-
const retentionText = (!ep.ttl || ep.ttl == 0) ? 'Never' : `${ep.ttl}d`;
366-
const retentionIcon = (!ep.ttl || ep.ttl == 0) ? '' : '<i class="fas fa-hourglass-half mr-1 opacity-50"></i>';
367-
368-
return `<div class="p-3 rounded-xl glass-panel cursor-pointer transition-all duration-300 group ${active}" onclick="selectEp('${ep.name}')">
369-
<div class="flex justify-between items-start mb-2">
370-
<div class="font-mono text-sm text-slate-200 font-bold tracking-tighter truncate w-64">${ep.name}</div>
371-
<div class="w-2 h-2 rounded-full ${statusClass} mt-1"></div>
372-
</div>
373-
<div class="flex justify-between items-center">
374-
<div class="flex items-center gap-2">
375-
<span class="text-[9px] font-black uppercase text-slate-500 tracking-widest">${ep.count} OBJ</span>
376-
<span class="text-[9px] font-bold text-slate-600 flex items-center">${retentionIcon}${retentionText}</span>
369+
370+
const retentionText = (!ep.ttl || ep.ttl == 0) ? '∞' : `${ep.ttl}d`;
371+
const lockText = ep.locked ? 'Locked' : 'Open';
372+
const lockColor = ep.locked ? 'text-red-400' : 'text-emerald-400';
373+
374+
return `<div class="px-4 py-3 rounded-xl glass-panel cursor-pointer transition-all duration-300 group ${active}" onclick="selectEp('${ep.name}')">
375+
<div class="flex items-center justify-between gap-4">
376+
<div class="flex items-center gap-3 min-w-0 flex-1">
377+
<div class="w-2 h-2 rounded-full ${statusClass} flex-shrink-0" title="${statusText}"></div>
378+
<div class="font-mono text-sm text-slate-200 font-bold tracking-tighter truncate min-w-0 flex-1">${ep.name}</div>
377379
</div>
378-
<div class="flex items-center">
379-
<i class="fas fa-lock text-[10px] ${ep.locked ? 'text-red-500' : 'text-emerald-500 opacity-30'}"></i>
380+
<div class="flex items-center gap-6 text-[11px] font-bold flex-shrink-0">
381+
<div class="text-slate-300">
382+
<i class="fas fa-database mr-1 opacity-70"></i>${ep.count}
383+
</div>
384+
<div class="text-slate-400">
385+
<i class="fas fa-clock mr-1 opacity-70"></i>${retentionText}
386+
</div>
387+
<div class="${lockColor}">
388+
<i class="fas fa-${ep.locked ? 'lock' : 'unlock'} mr-1 opacity-70"></i>${lockText}
389+
</div>
390+
<div class="text-slate-500">
391+
<i class="fas fa-chart-bar mr-1 opacity-70"></i>${ep.size_pct.toFixed(1)}%
392+
</div>
380393
</div>
381394
</div>
382-
<div class="size-bar mt-2"><div class="size-fill shadow-lg glow-primary" style="width: ${ep.size_pct}%"></div></div>
383395
</div>`;
384396
}).join('');
385397
}

0 commit comments

Comments
 (0)