Skip to content

Commit 7bdcbd3

Browse files
committed
fix: apply link icon margin and restore dev proxy logging
The trailing semicolon in marginLeft made React drop the style, and the dev proxy still used v2-style onProxyRes/onError, which http-proxy-middleware v3 silently ignores.
1 parent 89dd1b4 commit 7bdcbd3

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎dev/proxy-server.js‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ app.use('/api/proxy/sysdig', createProxyMiddleware({
3636
"Accept": "application/json",
3737
"X-Sysdig-Product": "SDS"
3838
},
39-
onProxyRes: (proxyRes, req, _res) => {
40-
console.log(`[Proxy] ${req.method} ${req.path} -> ${target} [${proxyRes.statusCode}]`);
39+
on: {
40+
proxyRes: (proxyRes, req, _res) => {
41+
console.log(`[Proxy] ${req.method} ${req.path} -> ${target} [${proxyRes.statusCode}]`);
42+
},
43+
error: (err, req, res) => {
44+
console.error(`[Proxy Error] ${err.message}`);
45+
res.status(500).send('Proxy Error');
46+
},
4147
},
42-
onError: (err, req, res) => {
43-
console.error(`[Proxy Error] ${err.message}`);
44-
res.status(500).send('Proxy Error');
45-
}
4648
}));
4749

4850
app.listen(PORT, () => {

‎src/lib/ui.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function getTitleWithBacklink(title: string, backlink: string) {
140140
return (
141141
<div style={{display:"flex"}}>
142142
<a href={backlink} target="_blank" rel="noopener noreferrer">{title}</a>
143-
<div style={{marginLeft:"10px;", "padding":"0 0 10px 5px"}}>
143+
<div style={{marginLeft:"10px", "padding":"0 0 10px 5px"}}>
144144
<Tooltip title="Open in Sysdig Secure">
145145
<IconButton aria-label='Open in new tab' size='small' target="_blank" href={backlink}>
146146
<OpenInNew fontSize="inherit" />

0 commit comments

Comments
 (0)