Update dashboard, memory, root +2 more (+3 ~5)
This commit is contained in:
@@ -197,15 +197,15 @@
|
||||
}
|
||||
|
||||
.status-section-subtitle {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
padding: 2px 8px;
|
||||
padding: 3px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: var(--text-xs);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -248,15 +248,15 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-secondary);
|
||||
padding: var(--space-1) 0;
|
||||
font-size: 13px;
|
||||
color: var(--text-primary);
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.status-detail-item svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
color: var(--text-muted);
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.status-detail-item.uncommitted {
|
||||
@@ -266,46 +266,71 @@
|
||||
.status-detail-item code {
|
||||
font-family: monospace;
|
||||
background: var(--bg-elevated);
|
||||
padding: 1px 4px;
|
||||
border-radius: 2px;
|
||||
font-size: 11px;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Cron items - desktop compact grid */
|
||||
.cron-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 2px var(--space-4);
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.cron-list {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* Cron items */
|
||||
.cron-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
font-size: var(--text-xs);
|
||||
padding: var(--space-1) 0;
|
||||
font-size: var(--text-sm);
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.cron-item.done {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.cron-item.done .cron-name {
|
||||
text-decoration: line-through;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.cron-item.pending {
|
||||
color: var(--text-secondary);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.cron-time {
|
||||
font-family: monospace;
|
||||
min-width: 45px;
|
||||
min-width: 50px;
|
||||
font-size: 13px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.cron-date {
|
||||
color: #9ca3af;
|
||||
font-size: 12px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.cron-icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.cron-icon.done { color: #22c55e; }
|
||||
.cron-icon.pending { color: var(--text-muted); }
|
||||
.cron-icon.pending { color: #9ca3af; }
|
||||
.cron-icon.failed { color: #ef4444; }
|
||||
|
||||
.cron-name {
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* Two-column dashboard */
|
||||
.dashboard-grid {
|
||||
display: grid;
|
||||
@@ -1480,7 +1505,7 @@
|
||||
let html = `
|
||||
<div class="status-detail-item">
|
||||
<i data-lucide="git-commit"></i>
|
||||
<span><a href="${GITEA_URL}/commit/${git.lastCommit.hash}" target="_blank" style="color:var(--accent)">${git.lastCommit.hash}</a> ${git.lastCommit.message.substring(0, 40)}${git.lastCommit.message.length > 40 ? '...' : ''} <small>(${git.lastCommit.time})</small></span>
|
||||
<span><a href="${GITEA_URL}/commit/${git.lastCommit.hash}" target="_blank" style="color:var(--accent)">${git.lastCommit.hash}</a> ${git.lastCommit.message.substring(0, 40)}${git.lastCommit.message.length > 40 ? '...' : ''} (${git.lastCommit.time})</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -1490,13 +1515,13 @@
|
||||
const more = git.uncommittedCount > 3 ? ` +${git.uncommittedCount - 3}` : '';
|
||||
html += `<div class="status-detail-item uncommitted">
|
||||
<i data-lucide="alert-circle"></i>
|
||||
<span><a href="files.html?git=1" style="color:var(--warning)"><strong>${git.uncommittedCount}</strong> necomise</a>: <small>${files}${more}</small></span>
|
||||
<span><a href="files.html?git=1" style="color:var(--warning)"><strong>${git.uncommittedCount}</strong> necomise</a>: ${files}${more}</span>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
html += `<div class="status-detail-item">
|
||||
<i data-lucide="external-link"></i>
|
||||
<a href="${GITEA_URL}" target="_blank" style="color:var(--accent);font-size:var(--text-xs)">gitea.romfast.ro/romfast/clawd</a>
|
||||
<a href="${GITEA_URL}" target="_blank" style="color:var(--accent)">gitea.romfast.ro/romfast/clawd</a>
|
||||
</div>`;
|
||||
|
||||
details.innerHTML = html;
|
||||
@@ -1577,9 +1602,9 @@
|
||||
return (a.nextRunAtMs || 0) - (b.nextRunAtMs || 0);
|
||||
});
|
||||
|
||||
// Update details
|
||||
// Update details - compact grid layout
|
||||
const details = document.getElementById('cronDetails');
|
||||
details.innerHTML = jobs.map(job => {
|
||||
const jobsHtml = jobs.map(job => {
|
||||
const done = job.ranToday;
|
||||
const failed = job.lastStatus === 'error';
|
||||
const statusClass = failed ? 'failed' : (done ? 'done' : 'pending');
|
||||
@@ -1588,17 +1613,17 @@
|
||||
// Check if job is today
|
||||
const jobDate = new Date(job.nextRunAtMs || 0);
|
||||
const isToday = jobDate.toDateString() === today;
|
||||
const dateStr = isToday ? '' : jobDate.toLocaleDateString('ro-RO', { day: 'numeric', month: 'short' });
|
||||
const dateStr = isToday ? '' : `<span class="cron-date">${jobDate.getDate()} ${jobDate.toLocaleDateString('ro-RO', { month: 'short' })}</span>`;
|
||||
|
||||
return `
|
||||
<div class="cron-item ${statusClass}">
|
||||
<i data-lucide="${icon}" class="cron-icon ${statusClass}"></i>
|
||||
<span class="cron-time">${job.time}${dateStr ? ` <span style="color:#6b7280;font-size:11px">(${dateStr})</span>` : ''}</span>
|
||||
<span class="cron-time">${job.time}${dateStr}</span>
|
||||
<span class="cron-name">${job.name}</span>
|
||||
<span class="cron-agent" style="color: var(--text-muted); font-size: 0.75rem; margin-left: auto;">${job.agentId || ''}</span>
|
||||
</div>
|
||||
`;
|
||||
}).join('');
|
||||
details.innerHTML = `<div class="cron-list">${jobsHtml}</div>`;
|
||||
|
||||
lucide.createIcons();
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user