diff --git a/pgml-dashboard/src/api/deployment/deployment_models.rs b/pgml-dashboard/src/api/deployment/deployment_models.rs index 3fe66c8a7..8f88a3f91 100644 --- a/pgml-dashboard/src/api/deployment/deployment_models.rs +++ b/pgml-dashboard/src/api/deployment/deployment_models.rs @@ -18,7 +18,7 @@ use std::collections::HashMap; // Returns models page #[get("/models")] -pub async fn deployment_models(cluster: &Cluster, _connected: ConnectedCluster<'_>) -> Result { +pub async fn deployment_models(cluster: &Cluster) -> Result { let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster); layout.breadcrumbs(vec![NavLink::new("Models", &urls::deployment_models()).active()]); @@ -34,7 +34,7 @@ pub async fn deployment_models(cluster: &Cluster, _connected: ConnectedCluster<' // Returns models page #[get("/models/")] -pub async fn model(cluster: &Cluster, model_id: i64, _connected: ConnectedCluster<'_>) -> Result { +pub async fn model(cluster: &Cluster, model_id: i64) -> Result { let model = models::Model::get_by_id(cluster.pool(), model_id).await?; let project = models::Project::get_by_id(cluster.pool(), model.project_id).await?; diff --git a/pgml-dashboard/src/api/deployment/notebooks.rs b/pgml-dashboard/src/api/deployment/notebooks.rs index 25701c0ca..c376995f6 100644 --- a/pgml-dashboard/src/api/deployment/notebooks.rs +++ b/pgml-dashboard/src/api/deployment/notebooks.rs @@ -20,7 +20,7 @@ use crate::utils::urls; // Returns notebook page #[get("/notebooks")] -pub async fn notebooks(cluster: &Cluster, _connected: ConnectedCluster<'_>) -> Result { +pub async fn notebooks(cluster: &Cluster) -> Result { let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster); layout.breadcrumbs(vec![NavLink::new("Notebooks", &urls::deployment_notebooks()).active()]); @@ -36,11 +36,7 @@ pub async fn notebooks(cluster: &Cluster, _connected: ConnectedCluster<'_>) -> R // Returns the specified notebook page. #[get("/notebooks/")] -pub async fn notebook( - cluster: &Cluster, - notebook_id: i64, - _connected: ConnectedCluster<'_>, -) -> Result { +pub async fn notebook(cluster: &Cluster, notebook_id: i64) -> Result { let notebook = models::Notebook::get_by_id(cluster.pool(), notebook_id).await?; let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster); diff --git a/pgml-dashboard/src/api/deployment/projects.rs b/pgml-dashboard/src/api/deployment/projects.rs index 3a1e060e0..9204d52e4 100644 --- a/pgml-dashboard/src/api/deployment/projects.rs +++ b/pgml-dashboard/src/api/deployment/projects.rs @@ -16,7 +16,7 @@ use crate::utils::urls; // Returns the deployments projects page. #[get("/projects")] -pub async fn projects(cluster: &Cluster, _connected: ConnectedCluster<'_>) -> Result { +pub async fn projects(cluster: &Cluster) -> Result { let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster); layout.breadcrumbs(vec![NavLink::new("Projects", &urls::deployment_projects()).active()]); @@ -32,11 +32,7 @@ pub async fn projects(cluster: &Cluster, _connected: ConnectedCluster<'_>) -> Re // Return the specified project page. #[get("/projects/")] -pub async fn project( - cluster: &Cluster, - project_id: i64, - _connected: ConnectedCluster<'_>, -) -> Result { +pub async fn project(cluster: &Cluster, project_id: i64) -> Result { let project = models::Project::get_by_id(cluster.pool(), project_id).await?; let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster); diff --git a/pgml-dashboard/src/api/deployment/snapshots.rs b/pgml-dashboard/src/api/deployment/snapshots.rs index ed87d48e7..2240cef90 100644 --- a/pgml-dashboard/src/api/deployment/snapshots.rs +++ b/pgml-dashboard/src/api/deployment/snapshots.rs @@ -17,7 +17,7 @@ use std::collections::HashMap; // Returns snapshots page #[get("/snapshots")] -pub async fn snapshots(cluster: &Cluster, _connected: ConnectedCluster<'_>) -> Result { +pub async fn snapshots(cluster: &Cluster) -> Result { let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster); layout.breadcrumbs(vec![NavLink::new("Snapshots", &urls::deployment_snapshots()).active()]); @@ -33,11 +33,7 @@ pub async fn snapshots(cluster: &Cluster, _connected: ConnectedCluster<'_>) -> R // Returns the specific snapshot page #[get("/snapshots/")] -pub async fn snapshot( - cluster: &Cluster, - snapshot_id: i64, - _connected: ConnectedCluster<'_>, -) -> Result { +pub async fn snapshot(cluster: &Cluster, snapshot_id: i64) -> Result { let snapshot = models::Snapshot::get_by_id(cluster.pool(), snapshot_id).await?; let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster); diff --git a/pgml-dashboard/src/api/deployment/uploader.rs b/pgml-dashboard/src/api/deployment/uploader.rs index 41f148007..fdad1665d 100644 --- a/pgml-dashboard/src/api/deployment/uploader.rs +++ b/pgml-dashboard/src/api/deployment/uploader.rs @@ -19,7 +19,7 @@ use crate::utils::urls; // Returns the uploader page. #[get("/uploader")] -pub async fn uploader(cluster: &Cluster, _connected: ConnectedCluster<'_>) -> Result { +pub async fn uploader(cluster: &Cluster) -> Result { let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster); layout.breadcrumbs(vec![NavLink::new("Upload Data", &urls::deployment_uploader()).active()]); diff --git a/pgml-dashboard/src/guards.rs b/pgml-dashboard/src/guards.rs index 3e8d4fb94..e7b48bf60 100644 --- a/pgml-dashboard/src/guards.rs +++ b/pgml-dashboard/src/guards.rs @@ -82,7 +82,6 @@ pub struct ConnectedCluster<'a> { pub inner: &'a Cluster, } -// 404 rather than 500 if the cluster is not connected. #[rocket::async_trait] impl<'r> FromRequest<'r> for ConnectedCluster<'r> { type Error = (); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy