From f218d9342d0e7517e69409bab17de42986a9378a Mon Sep 17 00:00:00 2001 From: Reimar Stier Date: Wed, 15 Jan 2025 12:00:02 +0100 Subject: [PATCH] WIP: use gitlab.com repository --- Cargo.lock | 12 ++++++------ Cargo.toml | 5 ++--- opendut-lea/src/about/overview.rs | 7 ++++--- opendut-lea/src/clusters/card.rs | 3 ++- .../src/clusters/configurator/components/controls.rs | 2 +- opendut-lea/src/components/authenticated.rs | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 918a8b59..b5b1b11c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -486,7 +486,7 @@ dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools 0.10.5", "lazy_static", "lazycell", "log", @@ -3074,6 +3074,7 @@ dependencies = [ [[package]] name = "leptos_oidc" version = "0.7.0" +source = "git+https://gitlab.com/opendut/leptos_oidc?branch=upgrade-leptos-0.7#864aa5a595b85172794cc293fcc9eca4b4e348cc" dependencies = [ "chrono", "codee", @@ -3087,7 +3088,6 @@ dependencies = [ "serde_json", "thiserror 1.0.69", "tracing", - "web-sys", ] [[package]] @@ -3170,7 +3170,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -4809,7 +4809,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b" dependencies = [ "heck 0.5.0", - "itertools 0.13.0", + "itertools 0.10.5", "log", "multimap", "once_cell", @@ -4829,7 +4829,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.10.5", "proc-macro2", "quote", "syn 2.0.90", @@ -7719,7 +7719,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0fa4c42c..46a04e66 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,9 +91,8 @@ indoc = "2.0.4" jsonwebtoken = "9.2.0" leptos = { version = "0.7.3" } # https://gitlab.com/GoodLucky777/leptos_oidc, version 0.7.0 -# leptos_oidc = { git = "https://gitlab.com/GoodLucky777/leptos_oidc", rev = "ed55987efec1004de93455591ef702bf1ffd2e43" } -# TODO: change to appropriate location -leptos_oidc = { path = "leptos_oidc" } +# TODO: change location +leptos_oidc = { git = "https://gitlab.com/opendut/leptos_oidc", branch = "upgrade-leptos-0.7" } leptos_router = { version = "0.7.3" } leptos-use = { version = "0.15.3" } mime = "0.3.17" diff --git a/opendut-lea/src/about/overview.rs b/opendut-lea/src/about/overview.rs index 2d24939c..41f48202 100644 --- a/opendut-lea/src/about/overview.rs +++ b/opendut-lea/src/about/overview.rs @@ -16,13 +16,14 @@ pub fn AboutOverview() -> impl IntoView { let globals = use_app_globals(); let metadata: LocalResource = LocalResource::new(move || { - let mut carl = globals.client; + let carl = globals.client.clone(); async move { + let mut carl = carl.clone(); carl.metadata.version().await .expect("Failed to request the version from carl.") } }); - + view! { impl IntoView { Version "-"

}> - { move || { metadata.get().map(|version| version.name)} } + { move || Suspend::new(async move { metadata.await.name })}
diff --git a/opendut-lea/src/clusters/card.rs b/opendut-lea/src/clusters/card.rs index feae90de..07850a45 100644 --- a/opendut-lea/src/clusters/card.rs +++ b/opendut-lea/src/clusters/card.rs @@ -16,8 +16,9 @@ pub fn ClustersCard() -> impl IntoView { let globals = use_app_globals(); let clusters: LocalResource = LocalResource::new(move || { - let mut carl = globals.client; + let carl = globals.client.clone(); async move { + let mut carl = carl.clone(); let configured = carl.cluster.list_cluster_configurations().await .expect("Failed to request the list of cluster configurations.") .len(); diff --git a/opendut-lea/src/clusters/configurator/components/controls.rs b/opendut-lea/src/clusters/configurator/components/controls.rs index 0e146f32..9a284a58 100644 --- a/opendut-lea/src/clusters/configurator/components/controls.rs +++ b/opendut-lea/src/clusters/configurator/components/controls.rs @@ -40,7 +40,7 @@ fn SaveClusterButton(cluster_configuration: ReadSignal let globals = use_app_globals(); let toaster = use_toaster(); - let store_action = create_action(move |_: &()| { + let store_action = Action::new(move |_| { let toaster = Arc::clone(&toaster); let configuration = ClusterConfiguration::try_from(cluster_configuration.get_untracked()); async move { diff --git a/opendut-lea/src/components/authenticated.rs b/opendut-lea/src/components/authenticated.rs index dc9770b9..9c04de84 100644 --- a/opendut-lea/src/components/authenticated.rs +++ b/opendut-lea/src/components/authenticated.rs @@ -30,7 +30,7 @@ pub fn Initialized( match config.auth_parameters { Some(ref auth_parameters) => { info!("Auth parameters: {auth_parameters:?}"); - let auth = Auth::init(auth_parameters.clone()); + let auth = Auth::init(auth_parameters.clone()).await; let client = CarlClient::create(Clone::clone(&config.carl_url), Some(auth.clone())).await .expect("Failed to create CARL client");