mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 10:40:50 +08:00
fix(logs): optimize layout for full height
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.pageTitle {
|
||||
@@ -46,6 +50,16 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $spacing-lg;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.logCard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
@@ -146,7 +160,8 @@
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-md;
|
||||
max-height: 620px;
|
||||
flex: 1;
|
||||
min-height: 200px;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ export function LogsPage() {
|
||||
const isSearching = trimmedSearchQuery.length > 0;
|
||||
const baseLines = isSearching ? logState.buffer : visibleLines;
|
||||
|
||||
const { filteredLines } = useMemo(() => {
|
||||
const { filteredLines, removedCount } = useMemo(() => {
|
||||
let working = baseLines;
|
||||
let removed = 0;
|
||||
|
||||
@@ -649,7 +649,7 @@ export function LogsPage() {
|
||||
|
||||
<div className={styles.content}>
|
||||
{activeTab === 'logs' && (
|
||||
<Card>
|
||||
<Card className={styles.logCard}>
|
||||
{error && <div className="error-box">{error}</div>}
|
||||
|
||||
<div className={styles.filters}>
|
||||
@@ -750,6 +750,11 @@ export function LogsPage() {
|
||||
<span>
|
||||
{t('logs.loaded_lines', { count: parsedVisibleLines.length })}
|
||||
</span>
|
||||
{removedCount > 0 && (
|
||||
<span className={styles.loadMoreCount}>
|
||||
{t('logs.filtered_lines', { count: removedCount })}
|
||||
</span>
|
||||
)}
|
||||
<span className={styles.loadMoreCount}>
|
||||
{t('logs.hidden_lines', { count: logState.visibleFrom })}
|
||||
</span>
|
||||
@@ -800,6 +805,15 @@ export function LogsPage() {
|
||||
</span>
|
||||
)}
|
||||
|
||||
{line.requestId && (
|
||||
<span
|
||||
className={[styles.badge, styles.requestIdBadge].join(' ')}
|
||||
title={line.requestId}
|
||||
>
|
||||
{line.requestId}
|
||||
</span>
|
||||
)}
|
||||
|
||||
{typeof line.statusCode === 'number' && (
|
||||
<span
|
||||
className={[
|
||||
@@ -827,15 +841,6 @@ export function LogsPage() {
|
||||
</span>
|
||||
)}
|
||||
|
||||
{line.requestId && (
|
||||
<span
|
||||
className={[styles.badge, styles.requestIdBadge].join(' ')}
|
||||
title={line.requestId}
|
||||
>
|
||||
{line.requestId}
|
||||
</span>
|
||||
)}
|
||||
|
||||
{line.path && (
|
||||
<span className={styles.path} title={line.path}>
|
||||
{line.path}
|
||||
|
||||
Reference in New Issue
Block a user