Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can — learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company 👇

feat(monitor/frontend): DShield panel (top ports + top source IPs, dense tables)

CarterPerez-deva91f29059553
diff --git a/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/dashboard/Dashboard.tsx b/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/dashboard/Dashboard.tsx
index e45468c5..e865c673 100644
--- a/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/dashboard/Dashboard.tsx
+++ b/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/dashboard/Dashboard.tsx
@@ -2,6 +2,7 @@
// Dashboard.tsx
import { Globe } from '@/pages/globe/Globe'
+import { DShieldPanel } from '@/pages/panels/DShieldPanel'
import { useUIStore } from '@/stores/ui'
import { AlertBanner } from './AlertBanner'
import { BottomTicker } from './BottomTicker'
@@ -26,7 +27,9 @@ export function Dashboard(): React.ReactElement {
<section className={styles.center}>
<Globe />
</section>
- <aside className={styles.right} />
+ <aside className={styles.right}>
+ <DShieldPanel />
+ </aside>
</main>
<BottomTicker />
</div>
diff --git a/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/panels/DShieldPanel.module.scss b/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/panels/DShieldPanel.module.scss
new file mode 100644
index 00000000..93cbabe7
--- /dev/null
+++ b/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/panels/DShieldPanel.module.scss
@@ -0,0 +1,48 @@
+// ©AngelaMos | 2026
+// DShieldPanel.module.scss
+
+.row {
+ display: grid;
+ grid-template-columns: 1fr 1.2fr;
+ gap: 12px;
+ padding: 4px 8px;
+}
+
+.table {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+.table thead th {
+ font-size: var(--type-label);
+ letter-spacing: var(--letter-spacing-label);
+ text-transform: uppercase;
+ color: var(--fg-3);
+ text-align: left;
+ padding: var(--row-py) var(--row-px);
+ border-bottom: 1px solid var(--fg-4);
+ font-weight: 400;
+}
+
+.table tbody td {
+ padding: var(--row-py) var(--row-px);
+ font-size: var(--type-body);
+ color: var(--fg-1);
+}
+
+.table tbody tr:hover {
+ background: var(--bg-row-hover);
+}
+
+.mono {
+ font-family: var(--font-mono);
+ font-variant-numeric: tabular-nums;
+}
+
+.summary {
+ margin: 8px;
+ font-size: var(--type-body);
+ color: var(--fg-3);
+ font-family: var(--font-mono);
+ font-variant-numeric: tabular-nums;
+}
diff --git a/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/panels/DShieldPanel.tsx b/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/panels/DShieldPanel.tsx
new file mode 100644
index 00000000..708c5b44
--- /dev/null
+++ b/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/panels/DShieldPanel.tsx
@@ -0,0 +1,102 @@
+// ©AngelaMos | 2026
+// DShieldPanel.tsx
+
+import { useSnapshot } from '@/api/snapshot'
+import styles from './DShieldPanel.module.scss'
+import { Panel } from './Panel'
+
+const PORT_ROW_LIMIT = 8
+const SOURCE_ROW_LIMIT = 8
+const THOUSAND = 1_000
+const MILLION = 1_000_000
+
+interface DShieldPort {
+ port: number
+ records: number
+}
+
+interface DShieldSource {
+ ip: string
+ country?: string
+ records: number
+}
+
+interface DShieldDailySummary {
+ records: number
+ sources: number
+ targets: number
+}
+
+interface DShieldData {
+ topports?: DShieldPort[]
+ topips?: DShieldSource[]
+ dailysummary?: DShieldDailySummary[]
+}
+
+export function DShieldPanel(): React.ReactElement {
+ const { data } = useSnapshot()
+ const ds = (data?.scan_firehose as DShieldData | undefined) ?? {}
+ const summary = ds.dailysummary?.[0]
+
+ return (
+ <Panel
+ title="DSHIELD"
+ subtitle="MASS SCAN"
+ rawHref="https://isc.sans.edu/api/"
+ rawLabel="DShield API"
+ >
+ <div className={styles.row}>
+ <table className={styles.table}>
+ <thead>
+ <tr>
+ <th>Port</th>
+ <th>Hits / 24h</th>
+ </tr>
+ </thead>
+ <tbody>
+ {(ds.topports ?? []).slice(0, PORT_ROW_LIMIT).map((p) => (
+ <tr key={p.port}>
+ <td className={styles.mono}>{p.port}</td>
+ <td className={styles.mono}>{p.records.toLocaleString()}</td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+
+ <table className={styles.table}>
+ <thead>
+ <tr>
+ <th>Source IP</th>
+ <th>CC</th>
+ <th>Hits</th>
+ </tr>
+ </thead>
+ <tbody>
+ {(ds.topips ?? []).slice(0, SOURCE_ROW_LIMIT).map((s) => (
+ <tr key={s.ip}>
+ <td className={styles.mono}>{s.ip}</td>
+ <td>{s.country ?? '—'}</td>
+ <td className={styles.mono}>{s.records.toLocaleString()}</td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+
+ {summary && (
+ <p className={styles.summary}>
+ {fmtN(summary.records)} records · {fmtN(summary.sources)} sources ·{' '}
+ {fmtN(summary.targets)} targets — last 24h
+ </p>
+ )}
+ </Panel>
+ )
+}
+
+DShieldPanel.displayName = 'DShieldPanel'
+
+function fmtN(n: number): string {
+ if (n >= MILLION) return `${(n / MILLION).toFixed(1)}M`
+ if (n >= THOUSAND) return `${(n / THOUSAND).toFixed(1)}k`
+ return String(n)
+}