More admin
This commit is contained in:
parent
11d7432b07
commit
f07e5e3bd5
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -35,8 +35,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "actix-admin"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08337d51b14642974696776104f9155632da0133f8eb9ea7a81d55aa4fe638d4"
|
||||
source = "git+https://github.com/Eraden/actix-admin.git#72b10d8994a2b7a19e5f0fd3cad187c11ed3cc21"
|
||||
dependencies = [
|
||||
"actix-admin-macros",
|
||||
"actix-files",
|
||||
@ -54,14 +53,14 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"tera",
|
||||
"tracing",
|
||||
"urlencoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "actix-admin-macros"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f420d748c93c40781a563e60f01df7ad27ba1574604cbd771f95afa995f9138"
|
||||
source = "git+https://github.com/Eraden/actix-admin.git#72b10d8994a2b7a19e5f0fd3cad187c11ed3cc21"
|
||||
dependencies = [
|
||||
"bae",
|
||||
"proc-macro2",
|
||||
@ -2171,7 +2170,6 @@ dependencies = [
|
||||
"regex",
|
||||
"sea-orm",
|
||||
"serde",
|
||||
"tera",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
|
@ -4,11 +4,12 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
actix-admin = "0.5.0"
|
||||
# actix-admin = "0.5.0"
|
||||
actix-admin = { git = "https://github.com/Eraden/actix-admin.git", features = ['enable-tracing'] }
|
||||
actix-web = "4.3.1"
|
||||
actix-web-grants = "3.0.2"
|
||||
askama = "0.12.0"
|
||||
chrono = "0.4.26"
|
||||
tera = "1.19.0"
|
||||
tera = "1.17.1"
|
||||
uuid = { version = "1.4.1", features = ["v4"] }
|
||||
oswilno-contract = { path = "../oswilno-contract" }
|
||||
|
@ -20,6 +20,11 @@ fn create_actix_admin_builder() -> ActixAdminBuilder {
|
||||
};
|
||||
|
||||
let mut admin_builder = ActixAdminBuilder::new(configuration);
|
||||
{
|
||||
use oswilno_contract::prelude::Accounts;
|
||||
let view = ActixAdminViewModel::from(Accounts);
|
||||
admin_builder.add_entity::<Accounts>(&view);
|
||||
}
|
||||
{
|
||||
use oswilno_contract::prelude::ParkingSpaces;
|
||||
let view = ActixAdminViewModel::from(ParkingSpaces);
|
||||
@ -30,6 +35,9 @@ fn create_actix_admin_builder() -> ActixAdminBuilder {
|
||||
let view = ActixAdminViewModel::from(ParkingSpaceRents);
|
||||
admin_builder.add_entity_to_category::<ParkingSpaceRents>(&view, "Parking spaces");
|
||||
}
|
||||
for scope in admin_builder.scopes.keys() {
|
||||
eprintln!("Scope {scope:?}");
|
||||
}
|
||||
|
||||
admin_builder
|
||||
}
|
||||
|
@ -5,12 +5,12 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
actix = "0.13.0"
|
||||
actix-admin = "0.5.0"
|
||||
# actix-admin = "0.5.0"
|
||||
actix-admin = { git = "https://github.com/Eraden/actix-admin.git" }
|
||||
actix-rt = { version = "2.8.0", features = [] }
|
||||
chrono = "0.4.26"
|
||||
regex = "1.9.1"
|
||||
sea-orm = { version = "0.11", features = ["postgres-array", "runtime-actix-rustls", "sqlx-postgres", "macros", "sqlx"] }
|
||||
serde = { version = "1.0.175", features = ["derive"] }
|
||||
tera = "1.19.0"
|
||||
uuid = { version = "1.4.1", features = ["v4"] }
|
||||
oswilno-actix-admin = { path = "../oswilno-actix-admin" }
|
||||
|
@ -1,8 +0,0 @@
|
||||
[package]
|
||||
name = "oswilno-actix-admin"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
@ -1,14 +0,0 @@
|
||||
pub fn add(left: usize, right: usize) -> usize {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user