mirror of
https://github.com/wekan/wekan.git
synced 2026-11-26 20:45:07 -05:00
The page listed only PAST high-CPU periods (the event rows written by the CPU monitor), so it could not answer "what is the CPU doing right now?" at all - the one question an admin opens that page to ask. A live line now sits between the page title and the search box: the current system CPU percentage, the core count, the 1/5/15 minute load average and the coarse "what WeKan is doing" label, refreshed every 5 seconds and outlined in red while the monitor considers the CPU sustainedly high. The figure comes from getCurrentCpu() in the CPU monitor, which reads the same sample the monitor writes its event rows from, so the header and the rows below it can never disagree. It reads module state only - no sampling of its own - so polling it is cheap. When the background monitor is disabled (WEKAN_CPU_MONITOR=false) it would otherwise always read 0%, so in that case the percentage is measured between calls using a SEPARATE baseline, which cannot disturb the monitor's own delta, and `monitored: false` is reported alongside. Thanks to xet7 !
135 lines
3.7 KiB
CSS
135 lines
3.7 KiB
CSS
/* Search + pagination controls for the admin report tabs (files, rules,
|
|
boards, cards). Styled to match the admin People panel (peopleBody.css). */
|
|
|
|
/* One controls row per report: the search field on the left, the pagination
|
|
controls pushed to the right (margin-inline-start:auto mirrors automatically in
|
|
RTL). No separate Search button — typing + Enter searches. The controls use the
|
|
theme accent (Member Settings → Change color sets --theme-accent on :root),
|
|
falling back to WeKan blue when no custom theme is chosen. */
|
|
.admin-report-controls {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.admin-report-controls input {
|
|
flex: 0 1 320px;
|
|
max-width: 320px;
|
|
padding: 0 8px;
|
|
height: 34px;
|
|
}
|
|
|
|
.admin-report-pagination {
|
|
margin-inline-start: auto; /* push pagination to the end of the controls row */
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.admin-report-pagination button {
|
|
min-width: 32px;
|
|
height: 30px;
|
|
border: 1px solid var(--theme-accent, #01628c);
|
|
background: transparent;
|
|
color: var(--theme-accent, #01628c);
|
|
border-radius: 0.4vw;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.admin-report-pagination button:hover:not(.disabled) {
|
|
background: var(--theme-accent, #01628c);
|
|
color: #fff;
|
|
}
|
|
|
|
.admin-report-pagination button.active {
|
|
background: var(--theme-accent, #01628c);
|
|
border-color: var(--theme-accent, #01628c);
|
|
color: #fff;
|
|
}
|
|
|
|
.admin-report-pagination button.disabled {
|
|
opacity: 0.5;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.admin-report-page-info {
|
|
min-width: 72px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Admin Panel → Problems → CPU usage: the live figure between the page title and
|
|
the search box. The table underneath is a history of past high-CPU periods, so
|
|
this line is the only place the page says what the CPU is doing right now. */
|
|
.admin-cpu-current {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
padding: 8px 10px;
|
|
border: 1px solid var(--theme-accent, #01628c);
|
|
border-radius: 0.4vw;
|
|
}
|
|
|
|
.admin-cpu-label {
|
|
font-weight: 700;
|
|
}
|
|
|
|
.admin-cpu-percent {
|
|
font-size: 1.4em;
|
|
font-weight: 700;
|
|
color: var(--theme-accent, #01628c);
|
|
}
|
|
|
|
/* Sustained high CPU: warn without inventing a second colour system. */
|
|
.admin-cpu-current.admin-cpu-high {
|
|
border-color: #b04632;
|
|
}
|
|
|
|
.admin-cpu-current.admin-cpu-high .admin-cpu-percent {
|
|
color: #b04632;
|
|
}
|
|
|
|
/* Problems page: menu separator between the event streams (Summary/Security/
|
|
Speed/Tests) and the moved report items, and the read-only event table. */
|
|
.admin-reports-content .side-menu .admin-reports-separator hr {
|
|
margin: 6px 0;
|
|
border: 0;
|
|
border-top: 1px solid rgba(0,0,0,0.15);
|
|
}
|
|
.admin-event-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.admin-event-controls input {
|
|
flex: 0 1 320px;
|
|
max-width: 320px;
|
|
height: 34px;
|
|
padding: 0 8px;
|
|
}
|
|
.admin-event-controls .admin-event-pagination {
|
|
margin-inline-start: auto;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.admin-event-controls .admin-event-pagination a {
|
|
cursor: pointer;
|
|
color: var(--theme-accent, #01628c);
|
|
font-weight: bold;
|
|
padding: 0 6px;
|
|
}
|
|
.admin-event-controls .admin-event-pagination a.disabled { opacity: 0.4; pointer-events: none; }
|
|
table.admin-event-table { width: 100%; border-collapse: collapse; }
|
|
table.admin-event-table th, table.admin-event-table td {
|
|
text-align: start; padding: 4px 8px; border-bottom: 1px solid rgba(0,0,0,0.08); vertical-align: top;
|
|
}
|
|
table.admin-event-table .admin-event-at { white-space: nowrap; }
|
|
table.admin-event-table .admin-event-sev[data-sev="high"],
|
|
table.admin-event-table .admin-event-sev[data-sev="critical"] { color: #c0392b; font-weight: bold; }
|
|
table.admin-event-table .admin-event-detail { word-break: break-word; }
|