aboutsummaryrefslogtreecommitdiff
path: root/templates/index.rs.html
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-08-24 13:15:31 -0400
committerCara Salter <cara@devcara.com>2022-08-24 13:15:31 -0400
commit9de84e3fbae0f2893e9c4f1425afa06899959bf7 (patch)
treef96d33d881954edc9b03df0bc821fb35eb59c577 /templates/index.rs.html
parent4b616447715b8129ae322341959e1c2bfabbd10e (diff)
downloadnccd-9de84e3fbae0f2893e9c4f1425afa06899959bf7.tar.gz
nccd-9de84e3fbae0f2893e9c4f1425afa06899959bf7.zip
flaskify
Diffstat (limited to 'templates/index.rs.html')
-rw-r--r--templates/index.rs.html71
1 files changed, 0 insertions, 71 deletions
diff --git a/templates/index.rs.html b/templates/index.rs.html
deleted file mode 100644
index e686b01..0000000
--- a/templates/index.rs.html
+++ /dev/null
@@ -1,71 +0,0 @@
-@use super::{header_html, footer_html};
-@use crate::models::{DbUser, Peer, Network};
-
-@(user: Option<DbUser>, peers: Vec<Peer>, nets: Vec<Network>)
-@:header_html()
- <h1>NCCd (Network Communications Control Daemon)</h1>
-
- @if user.is_some() {
- <h3>Welcome @user.clone().unwrap().pref_name</h3>
- <table>
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>ID</td>
- <td>@user.clone().unwrap().id</td>
- </tr>
- <tr>
- <td>Email</td>
- <td>@user.clone().unwrap().email</td>
- </tr>
- <tr>
- <td>Preferred Name</td>
- <td>@user.clone().unwrap().pref_name</td>
- </tr>
- <tr>
- <td>Last Login</td>
- <td>@(user.clone().unwrap().last_login)Z</td>
- </tr>
- </table>
-
- <hr>
-
- <h3>Configured Peers</h3>
- <table>
- <tr>
- <th>ID</th>
- <th>Address</th>
- <th>Public Key</th>
- </tr>
- @for p in peers {
- <tr>
- <td>@p.id</td>
- <td>@p.addr</td>
- <td>@p.public_key</td>
- </tr>
- }
- </table>
- <hr>
- <h3>Configured subnets (<a href="/dash/nets/new">New</a>)</h3>
- <table>
- <tr>
- <th>ID</th>
- <th>Subnet CIDR</th>
- <th>Description</th>
- </tr>
- @for n in nets {
- <tr>
- <td>@n.id</td>
- <td>@n.subnet</td>
- <td>@if n.description.is_some() { @n.description.unwrap()
- } else { None }</td>
- </tr>
- }
- </table>
- } else {
-
- <h3>Please <a href="/dash/auth/login">Log in</a></h3>
- }
-@:footer_html()