From a65757ed5b1a9f79f3e2ca98814b635fa4cf2072 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Mon, 3 Jun 2024 13:14:59 -0400 Subject: [PATCH] Bonito compat fixes in examples --- .../3_makie_interactive.jl | 20 +++++++++---------- .../colorcentermodularcluster/Project.toml | 2 +- examples/congestionchain/Project.toml | 2 +- examples/simpleswitch/Project.toml | 3 +++ 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/examples/colorcentermodularcluster/3_makie_interactive.jl b/examples/colorcentermodularcluster/3_makie_interactive.jl index 20b68958..df8dd32e 100644 --- a/examples/colorcentermodularcluster/3_makie_interactive.jl +++ b/examples/colorcentermodularcluster/3_makie_interactive.jl @@ -1,12 +1,12 @@ using Base.Threads using WGLMakie WGLMakie.activate!() -using JSServe +using Bonito using Markdown include("setup.jl"); -const custom_css = JSServe.DOM.style("ul {list-style: circle !important;}") # TODO remove after fix of bug in JSServe https://github.com/SimonDanisch/JSServe.jl/issues/178 +const custom_css = Bonito.DOM.style("ul {list-style: circle !important;}") # TODO remove after fix of bug in Bonito https://github.com/SimonDanisch/Bonito.jl/issues/178 """Run a simulation until all links in the cluster state are established, then report time to completion and average link fidelity.""" @@ -118,7 +118,7 @@ landing = App() do [See and modify the code for this simulation on github.](https://github.com/QuantumSavory/QuantumSavory.jl/tree/master/examples/colorcentermodularcluster) """ - return DOM.div(JSServe.MarkdownCSS, JSServe.Styling, custom_css, content) + return DOM.div(Bonito.MarkdownCSS, Bonito.Styling, custom_css, content) end; ## @@ -188,7 +188,7 @@ ensemble = App() do [See and modify the code for this simulation on github.](https://github.com/QuantumSavory/QuantumSavory.jl/tree/master/examples/colorcentermodularcluster) """ - return DOM.div(JSServe.MarkdownCSS, JSServe.Styling, custom_css, content) + return DOM.div(Bonito.MarkdownCSS, Bonito.Styling, custom_css, content) end; ## @@ -325,7 +325,7 @@ singletraj = App() do [See and modify the code for this simulation on github.](https://github.com/QuantumSavory/QuantumSavory.jl/tree/master/examples/colorcentermodularcluster) """ - return DOM.div(JSServe.MarkdownCSS, JSServe.Styling, custom_css, content) + return DOM.div(Bonito.MarkdownCSS, Bonito.Styling, custom_css, content) end; ## @@ -389,11 +389,11 @@ isdefined(Main, :server) && close(server); port = parse(Int, get(ENV, "QS_COLORCENTERMODCLUSTER_PORT", "8888")) interface = get(ENV, "QS_COLORCENTERMODCLUSTER_IP", "127.0.0.1") proxy_url = get(ENV, "QS_COLORCENTERMODCLUSTER_PROXY", "") -server = JSServe.Server(interface, port; proxy_url); -JSServe.HTTPServer.start(server) -JSServe.route!(server, "/" => landing); -JSServe.route!(server, "/ensemble" => ensemble); -JSServe.route!(server, "/single-trajectory" => singletraj); +server = Bonito.Server(interface, port; proxy_url); +Bonito.HTTPServer.start(server) +Bonito.route!(server, "/" => landing); +Bonito.route!(server, "/ensemble" => ensemble); +Bonito.route!(server, "/single-trajectory" => singletraj); ## diff --git a/examples/colorcentermodularcluster/Project.toml b/examples/colorcentermodularcluster/Project.toml index 3de3f8a3..65bf7402 100644 --- a/examples/colorcentermodularcluster/Project.toml +++ b/examples/colorcentermodularcluster/Project.toml @@ -12,4 +12,4 @@ Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008" [compat] -JSServe = "2.2.7" +Bonito = "3.1" diff --git a/examples/congestionchain/Project.toml b/examples/congestionchain/Project.toml index 3de3f8a3..65bf7402 100644 --- a/examples/congestionchain/Project.toml +++ b/examples/congestionchain/Project.toml @@ -12,4 +12,4 @@ Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008" [compat] -JSServe = "2.2.7" +Bonito = "3.1" diff --git a/examples/simpleswitch/Project.toml b/examples/simpleswitch/Project.toml index 8183bd7b..b7154c46 100644 --- a/examples/simpleswitch/Project.toml +++ b/examples/simpleswitch/Project.toml @@ -6,3 +6,6 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" QuantumSavory = "2de2e421-972c-4cb5-a0c3-999c85908079" ResumableFunctions = "c5292f4c-5179-55e1-98c5-05642aab7184" WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008" + +[compat] +Bonito = "3.1" \ No newline at end of file