cleanup frontend notifications
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m39s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m39s
This commit is contained in:
@@ -132,7 +132,6 @@ type Props = {
|
||||
export default function FirewallTables({ tables, error, refreshRules: refresh }: Props): ReactElement {
|
||||
// local UI state, non-persistent
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
const [results, setResults] = useState<CmdResult[]>([]);
|
||||
const [isOpenTableCreatorModal, setIsOpenTableCreatorModal] = useState(false);
|
||||
const [isOpenChainCreatorModal, setIsOpenChainCreatorModal] = useState(false);
|
||||
|
||||
@@ -148,8 +147,6 @@ export default function FirewallTables({ tables, error, refreshRules: refresh }:
|
||||
acc.push({ cmd, err: err?.message ?? String(err) });
|
||||
}
|
||||
}
|
||||
// prepend new results to history
|
||||
setResults((prev) => [...acc, ...prev]);
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
@@ -466,38 +463,6 @@ export default function FirewallTables({ tables, error, refreshRules: refresh }:
|
||||
);
|
||||
})}
|
||||
</Card>
|
||||
|
||||
{/* Results panel */}
|
||||
{results.length > 0 && (
|
||||
<Card title="Command Results" style={{ marginTop: 20 }}>
|
||||
{results.map((r, i) => (
|
||||
<div key={i} style={{ marginBottom: 12 }}>
|
||||
<Text strong>{r.cmd}</Text>
|
||||
{r.err ? (
|
||||
<Paragraph style={{ color: 'var(--ant-error-color)', marginTop: 6 }}>{r.err}</Paragraph>
|
||||
) : r.out ? (
|
||||
<>
|
||||
<Paragraph>
|
||||
<Text type="secondary">rc:</Text> {r.out.rc}
|
||||
</Paragraph>
|
||||
{r.out.stdout ? (
|
||||
<>
|
||||
<Text type="secondary">stdout:</Text>
|
||||
<pre style={{ whiteSpace: 'pre-wrap', background: '#fff', padding: 8 }}>{r.out.stdout}</pre>
|
||||
</>
|
||||
) : null}
|
||||
{r.out.stderr ? (
|
||||
<>
|
||||
<Text type="secondary">stderr:</Text>
|
||||
<pre style={{ whiteSpace: 'pre-wrap', background: '#fff', padding: 8 }}>{r.out.stderr}</pre>
|
||||
</>
|
||||
) : null}
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
))}
|
||||
</Card>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user