fix(ui): log header counter reflects visible (filtered) count
When a text search is active, show 'X of Y entries' rather than the loaded total, so the number matches what's on screen.
This commit is contained in:
@@ -901,7 +901,11 @@ export default function AgentHealth() {
|
|||||||
<div className={logStyles.logHeader}>
|
<div className={logStyles.logHeader}>
|
||||||
<SectionHeader>Application Log</SectionHeader>
|
<SectionHeader>Application Log</SectionHeader>
|
||||||
<div className={logStyles.headerActions}>
|
<div className={logStyles.headerActions}>
|
||||||
<span className={styles.sectionMeta}>{logStream.items.length} entries</span>
|
<span className={styles.sectionMeta}>
|
||||||
|
{filteredLogs.length === logStream.items.length
|
||||||
|
? `${filteredLogs.length} entries`
|
||||||
|
: `${filteredLogs.length} of ${logStream.items.length} entries`}
|
||||||
|
</span>
|
||||||
<Button variant="ghost" size="sm" onClick={() => setLogSortAsc((v) => !v)} title={logSortAsc ? 'Oldest first' : 'Newest first'}>
|
<Button variant="ghost" size="sm" onClick={() => setLogSortAsc((v) => !v)} title={logSortAsc ? 'Oldest first' : 'Newest first'}>
|
||||||
{logSortAsc ? '\u2191' : '\u2193'}
|
{logSortAsc ? '\u2191' : '\u2193'}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -407,7 +407,11 @@ export default function AgentInstance() {
|
|||||||
<div className={logStyles.logHeader}>
|
<div className={logStyles.logHeader}>
|
||||||
<SectionHeader>Application Log</SectionHeader>
|
<SectionHeader>Application Log</SectionHeader>
|
||||||
<div className={logStyles.headerActions}>
|
<div className={logStyles.headerActions}>
|
||||||
<span className={styles.chartMeta}>{logStream.items.length} entries</span>
|
<span className={styles.chartMeta}>
|
||||||
|
{filteredLogs.length === logStream.items.length
|
||||||
|
? `${filteredLogs.length} entries`
|
||||||
|
: `${filteredLogs.length} of ${logStream.items.length} entries`}
|
||||||
|
</span>
|
||||||
<button className={logStyles.sortBtn} onClick={() => setLogSortAsc((v) => !v)} title={logSortAsc ? 'Oldest first' : 'Newest first'}>
|
<button className={logStyles.sortBtn} onClick={() => setLogSortAsc((v) => !v)} title={logSortAsc ? 'Oldest first' : 'Newest first'}>
|
||||||
{logSortAsc ? '\u2191' : '\u2193'}
|
{logSortAsc ? '\u2191' : '\u2193'}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user