|
25 | 25 |
|
26 | 26 | .main-layout { |
27 | 27 | display: grid; |
28 | | - grid-template-columns: 280px 420px 1fr; |
| 28 | + grid-template-columns: 280px 600px 1fr; |
29 | 29 | height: 100vh; |
30 | 30 | gap: 0; |
31 | 31 | 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 |
132 | 132 | </button> |
133 | 133 | </header> |
134 | 134 |
|
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"> |
136 | 136 | </div> |
137 | 137 | </main> |
138 | 138 |
|
@@ -353,33 +353,45 @@ <h3 class="text-xl font-bold text-white">Data Lifecycle</h3> |
353 | 353 | function renderEndpointsList() { |
354 | 354 | if(!globalData) return; |
355 | 355 | const list = document.getElementById('endpoints-container'); |
356 | | - let filtered = (currentFilter.type === 'ALL') ? globalData.endpoints : |
| 356 | + let filtered = (currentFilter.type === 'ALL') ? globalData.endpoints : |
357 | 357 | (currentFilter.type === 'APP') ? globalData.endpoints.filter(e => e.name.startsWith(currentFilter.value + '_')) : |
358 | 358 | globalData.endpoints.filter(e => e.owners && e.owners.includes(currentFilter.value)); |
359 | | - |
| 359 | + |
360 | 360 | list.innerHTML = filtered.map(ep => { |
361 | 361 | 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 | + |
363 | 368 | 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> |
377 | 379 | </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> |
380 | 393 | </div> |
381 | 394 | </div> |
382 | | - <div class="size-bar mt-2"><div class="size-fill shadow-lg glow-primary" style="width: ${ep.size_pct}%"></div></div> |
383 | 395 | </div>`; |
384 | 396 | }).join(''); |
385 | 397 | } |
|
0 commit comments