From 78e19bdfee7c34e3d5913a3c7cda13a1ab4e739e Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 14 Aug 2020 00:03:56 +0200 Subject: [PATCH] some work --- Cargo.lock | 207 ++++++++++++++++++------------------------- Cargo.toml | 9 +- index.html | 1 + templates/index.html | 110 ++++++++++++++++++++++- 4 files changed, 203 insertions(+), 124 deletions(-) create mode 120000 index.html diff --git a/Cargo.lock b/Cargo.lock index 4b663b6..61ea221 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,9 +108,9 @@ checksum = "e742194e0f43fc932bcb801708c2b279d3ec8f527e3acda05a6a9f342c5ef764" dependencies = [ "argh_shared", "heck", - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -133,9 +133,8 @@ checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" [[package]] name = "askama" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dc2a4b6d7f812d2b13d251ae792caecebd635d6401761162d4b71d5ebe1a010" +version = "0.10.3" +source = "git+https://github.com/jbr/askama?branch=update-tide-to-0.13#4a50477022156e136b118508646265e7bc1c0bbb" dependencies = [ "askama_derive", "askama_escape", @@ -144,45 +143,55 @@ dependencies = [ [[package]] name = "askama_derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ee2fff0f22ad5d215cace1227cd036c28e81e26206763bb837b6d0e766c87d" +version = "0.10.3" +source = "git+https://github.com/jbr/askama?branch=update-tide-to-0.13#4a50477022156e136b118508646265e7bc1c0bbb" dependencies = [ "askama_shared", - "nom", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "askama_escape" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0de942230b5beedaa9e1d64df5b76fa1c97002e4c7982897be899cccf40621d" +version = "0.10.1" +source = "git+https://github.com/jbr/askama?branch=update-tide-to-0.13#4a50477022156e136b118508646265e7bc1c0bbb" [[package]] name = "askama_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6dfa6b6d254fd066a8bbed9a8f913123e3f701db89216ad4f0aff04ad87718c" +version = "0.10.4" +source = "git+https://github.com/jbr/askama?branch=update-tide-to-0.13#4a50477022156e136b118508646265e7bc1c0bbb" dependencies = [ "askama_escape", "humansize", + "nom", "num-traits", + "percent-encoding", + "proc-macro2", + "quote", "serde", - "serde_derive", + "syn", "toml", ] +[[package]] +name = "askama_tide" +version = "0.10.0" +source = "git+https://github.com/jbr/askama?branch=update-tide-to-0.13#4a50477022156e136b118508646265e7bc1c0bbb" +dependencies = [ + "askama", + "async-std", + "tide", +] + [[package]] name = "async-attributes" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efd3d156917d94862e779f356c5acae312b08fd3121e792c857d7928c8088423" dependencies = [ - "quote 1.0.7", - "syn 1.0.38", + "quote", + "syn", ] [[package]] @@ -296,9 +305,9 @@ version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -519,7 +528,7 @@ dependencies = [ "rand", "sha2", "time 0.2.16", - "version_check 0.9.2", + "version_check", ] [[package]] @@ -641,7 +650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" dependencies = [ "backtrace", - "version_check 0.9.2", + "version_check", ] [[package]] @@ -756,9 +765,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -813,7 +822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60fb4bb6bba52f78a471264d9a3b7d026cc0af47b22cd2cffbc0b787ca003e63" dependencies = [ "typenum", - "version_check 0.9.2", + "version_check", ] [[package]] @@ -1047,6 +1056,7 @@ version = "0.1.0" dependencies = [ "argh", "askama", + "askama_tide", "async-std", "chrono", "sqlx", @@ -1106,12 +1116,12 @@ dependencies = [ [[package]] name = "nom" -version = "4.2.3" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ "memchr", - "version_check 0.1.5", + "version_check", ] [[package]] @@ -1305,9 +1315,9 @@ version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1356,31 +1366,13 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - [[package]] name = "proc-macro2" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" dependencies = [ - "unicode-xid 0.2.1", -] - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", + "unicode-xid", ] [[package]] @@ -1389,7 +1381,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2", ] [[package]] @@ -1596,9 +1588,9 @@ version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1807,12 +1799,12 @@ dependencies = [ "either", "futures", "heck", - "proc-macro2 1.0.19", - "quote 1.0.7", + "proc-macro2", + "quote", "sha2", "sqlx-core", "sqlx-rt", - "syn 1.0.38", + "syn", "url", ] @@ -1839,7 +1831,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0437cfb83762844799a60e1e3b489d5ceb6a650fbacb86437badc1b6d87b246" dependencies = [ - "version_check 0.9.2", + "version_check", ] [[package]] @@ -1862,11 +1854,11 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", + "proc-macro2", + "quote", "serde", "serde_derive", - "syn 1.0.38", + "syn", ] [[package]] @@ -1876,13 +1868,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" dependencies = [ "base-x", - "proc-macro2 1.0.19", - "quote 1.0.7", + "proc-macro2", + "quote", "serde", "serde_derive", "serde_json", "sha1", - "syn 1.0.38", + "syn", ] [[package]] @@ -1907,26 +1899,15 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1" -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - [[package]] name = "syn" version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "unicode-xid 0.2.1", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] @@ -1935,10 +1916,10 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "unicode-xid 0.2.1", + "proc-macro2", + "quote", + "syn", + "unicode-xid", ] [[package]] @@ -1970,9 +1951,9 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2026,7 +2007,7 @@ dependencies = [ "standback", "stdweb", "time-macros", - "version_check 0.9.2", + "version_check", "winapi", ] @@ -2047,10 +2028,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.19", - "quote 1.0.7", + "proc-macro2", + "quote", "standback", - "syn 1.0.38", + "syn", ] [[package]] @@ -2061,9 +2042,9 @@ checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" [[package]] name = "toml" -version = "0.4.10" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ "serde", ] @@ -2098,12 +2079,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.1" @@ -2138,12 +2113,6 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.2" @@ -2183,9 +2152,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-shared", ] @@ -2207,7 +2176,7 @@ version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" dependencies = [ - "quote 1.0.7", + "quote", "wasm-bindgen-macro-support", ] @@ -2217,9 +2186,9 @@ version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2292,8 +2261,8 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", + "proc-macro2", + "quote", + "syn", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index b271941..c0c3af3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,12 +4,15 @@ version = "0.1.0" authors = ["Stefan Schwarz "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] argh = "0.1.3" -askama = "0.8" +askama = { version = "0.10", features = ["with-tide"]} +askama_tide = "0.10" async-std = { version = "1.6", features = ["attributes"] } chrono = "0.4" sqlx = { version = "0.4.0-beta.1", features = ["mysql", "chrono", "macros"] } tide = "0.13" + +[patch.crates-io] +askama_tide = { git = "https://github.com/jbr/askama", branch = "update-tide-to-0.13" } +askama = { git = "https://github.com/jbr/askama", branch = "update-tide-to-0.13" } diff --git a/index.html b/index.html new file mode 120000 index 0000000..e98b8e8 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +templates/index.html \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 839d963..81f3ef4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,9 +5,115 @@ macnickenson - + - + + + +
+

+ macnickenson +

+ +
+

Your Devices:

+
+
macaddr: "00:18:e7:34:11:1c"
+
+ + +
+
+ + +
+
+
+
macaddr: "90:78:41:bd:10:23"
+
nickname: "Neptun"
+
descr: "Neptun"
+
+
+
macaddr: "10:0b:a9:ad:9f:30"
+
nickname: "Wu"
+
descr: "x220"
+
+
+
+

Unregistred Devices:

+ +
+ +
macaddr: "f0:d5:bf:cc:a2:f9"
+
+ +
+
+ +
+
+
+ +
macaddr: "6a:f4:a2:c4:e2:2e"
+
nickname: "Mondschauer93"
+
descr: "Smartphone"
+ +
+
+
macaddr: "f8:ff:c2:20:b6:0d"
+
nickname: "idefix"
+
descr: "MacBook"
+ +
+
+
macaddr: "30:57:14:db:34:d3"
+
nickname: "idefix"
+
descr: "IPhone"
+ +
+
+
macaddr: "98:01:a7:b6:48:5b"
+
nickname: "idefix"
+
descr: "UbuntuBook"
+ +
+
+
macaddr: "f4:db:e3:3f:7e:18"
+
nickname: "raphii"
+
descr: "iPhone 11"
+ +
+
+
macaddr: "70:48:0f:98:de:23"
+
nickname: "raphii"
+
descr: "iPad Pro"
+ +
+
+
macaddr: "e0:cc:f8:6a:d1:d4"
+
nickname: "stoneos"
+
descr: "xiaomi mi10"
+ +
+
+
macaddr: "74:e5:f9:86:98:8b"
+
nickname: "ptflea"
+
descr: "computer"
+
+
+
+ footer +
+
+ + +