diff --git a/README.md b/README.md index 430ecc4..165f8af 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A small rust project that visualizes the contents of iptables in a web interface. -An example to embedd a [SPA](https://en.wikipedia.org/wiki/Single-page_application) into a rust binary with minimal runtime dependencies. +An example to embedd a [SPA](https://en.wikipedia.org/wiki/Single-page_application) into a rust binary with minimal runtime dependencies. It uses [svelte](https://svelte.dev), [vite](https://vitejs.dev), [tailwindcss](https://tailwindcss.com) on the web frontend. And rust, [warp] on the backend. Credits to the Rust+Vite+Svelte project https://github.com/fdeantoni/rust-vite-svelte and the iptables_exporter project https://github.com/kbknapp/iptables_exporter where this project took inspiration and code from. diff --git a/web/src/Tables.svelte b/web/src/Tables.svelte index 2098f0d..2acdda0 100644 --- a/web/src/Tables.svelte +++ b/web/src/Tables.svelte @@ -22,6 +22,7 @@ async function getIptables() { iptables = await response.json(); console.log(iptables); tables = iptables.tables; + if (tables.length == 0) throw new Error("No tables found. Run as root or with sudo."); cur_table = tables[0] myerror = null;