fix: admin/logs: don't show "api" button for "disconnections" and "IPs"
Massimo Melina committed
Jun 23, 2026 at 14:54 UTC
e8784747b719958bd4260a1411dfb01a95178f1a
2 files changed
+2
-2
admin/src/LogsPage.ts
+1
-2
@@ -122,7 +122,6 @@ export function LogFile({ file, footerSide, hidden, limit, filter, ...rest }: Lo
122
const [showApi, showApiButton] = useToggleButton("Show APIs", "Hide APIs", v => ({
123
icon: SmartToy,
124
sx: { rotate: v ? 0 : '180deg' },
125
- disabled: file === 'console',
125
}), true)
126
const [totalSize, setTotalSize] = useState(NaN)
127
const [limited, setLimited] = useState(true)
@@ -215,7 +214,7 @@ export function LogFile({ file, footerSide, hidden, limit, filter, ...rest }: Lo
214
...rest,
215
footerSide: width => h(Box, {}, // 4 icons don't fit the tab row on mobile
216
pauseButton,
218
- showApiButton,
217
+ file.endsWith('log') && showApiButton,
218
!connecting && skipped > 0 && h(Btn, {
219
icon: ClearAll,
220
variant: 'outlined',
e2e/serial.spec.ts
+1
@@ -236,6 +236,7 @@ test('admin2', async ({ page, browserName }) => {
236
await logTabs.nth(2).click()
237
await logTabs.nth(3).click()
238
await logTabs.nth(4).click()
239
+ await logTabs.nth(0).click()
240
const pauseBtn = page.getByLabel('Pause').getByRole('button')
241
await expect(pauseBtn).toHaveAttribute('aria-pressed', 'true')
242
await pauseBtn.click()