Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dan product notifications#1534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chillenberger merged 27 commits intomasterfromdan-product-notifications
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
27 commits
Select commitHold shift + click to select a range
a2a4ce2
checkpoint product notifications
chillenbergerJun 7, 2024
a555f4e
Merge branch 'master' into dan-product-notifications
chillenbergerJun 11, 2024
c9fefe0
checkpoint
chillenbergerJun 12, 2024
c432f03
Merge branch 'master' into dan-product-notifications
chillenbergerJun 12, 2024
495de99
backend working, front end design working
chillenbergerJun 12, 2024
c5b9932
add top level notices to layout
chillenbergerJun 12, 2024
4f5fdb2
add ability to show/hide modal with events and use this feature
chillenbergerJun 12, 2024
11c455b
all for many high level notifications
chillenbergerJun 14, 2024
aa26bc3
clean up code, prevent modal collision
chillenbergerJun 14, 2024
d6c598c
fmt
chillenbergerJun 14, 2024
ff02bb7
Merge branch 'master' into dan-product-notifications
chillenbergerJun 14, 2024
270032a
add product marketing banner to layout
chillenbergerJun 14, 2024
2a67b62
adn new line
chillenbergerJun 14, 2024
0e11743
404 rather than 500 on misisng pool, add comment
chillenbergerJun 14, 2024
ce2a0ee
fmt
chillenbergerJun 14, 2024
a4b3e74
make session backwards compatible
chillenbergerJun 14, 2024
e1f64d6
add tests
chillenbergerJun 16, 2024
61cb28c
clean
chillenbergerJun 16, 2024
3bfee36
Session cookie deserializaiton
levkkJun 17, 2024
23fb688
safely unwrap context notification
chillenbergerJun 17, 2024
7bc6f65
Merge remote-tracking branch 'origin/levkk-cookie-test' into dan-noti…
chillenbergerJun 17, 2024
c641b70
clean up tests
chillenbergerJun 17, 2024
9611e77
Merge branch 'dan-patch' into dan-product-notifications
chillenbergerJun 17, 2024
8db0e2f
Merge branch 'dan-notificatioins-backwards-compatible' into dan-produ…
chillenbergerJun 17, 2024
ae54142
Merge branch 'master' into dan-product-notifications
chillenbergerJun 17, 2024
5f612ff
add test if notification is none
chillenbergerJun 17, 2024
62aa76a
fmt
chillenbergerJun 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 2 additions & 105 deletionspgml-dashboard/Cargo.lock
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

13 changes: 7 additions & 6 deletionspgml-dashboard/src/api/deployment/deployment_models.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,7 @@ use rocket::route::Route;
use sailfish::TemplateOnce;

use crate::{
guards::Cluster,
guards::ConnectedCluster,
responses::{Error, ResponseOk},
};
Expand All@@ -17,8 +18,8 @@ use std::collections::HashMap;

// Returns models page
#[get("/models")]
pub async fn deployment_models(cluster: ConnectedCluster<'_>) -> Result<ResponseOk, Error> {
let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster.inner.context);
pub async fn deployment_models(cluster:&Cluster, _connected:ConnectedCluster<'_>) -> Result<ResponseOk, Error> {
let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster);
layout.breadcrumbs(vec![NavLink::new("Models", &urls::deployment_models()).active()]);

let tabs = vec![tabs::Tab {
Expand All@@ -28,16 +29,16 @@ pub async fn deployment_models(cluster: ConnectedCluster<'_>) -> Result<Response

let nav_tabs = tabs::Tabs::new(tabs, Some("Models"), Some("Models"))?;

Ok(ResponseOk(layout.render(templates::Dashboard { tabs:nav_tabs })))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

// Returns models page
#[get("/models/<model_id>")]
pub async fn model(cluster:ConnectedCluster<'_>, model_id: i64) -> Result<ResponseOk, Error> {
pub async fn model(cluster:&Cluster, model_id: i64, _connected: ConnectedCluster<'_>) -> Result<ResponseOk, Error> {
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?;

let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster.inner.context);
let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster);
layout.breadcrumbs(vec![
NavLink::new("Models", &urls::deployment_models()),
NavLink::new(&project.name, &urls::deployment_project_by_id(project.id)),
Expand All@@ -51,7 +52,7 @@ pub async fn model(cluster: ConnectedCluster<'_>, model_id: i64) -> Result<Respo

let nav_tabs = tabs::Tabs::new(tabs, Some("Models"), Some("Models"))?;

Ok(ResponseOk(layout.render(templates::Dashboard { tabs:nav_tabs })))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

#[get("/models_turboframe")]
Expand Down
16 changes: 10 additions & 6 deletionspgml-dashboard/src/api/deployment/notebooks.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,8 +20,8 @@ use crate::utils::urls;

// Returns notebook page
#[get("/notebooks")]
pub async fn notebooks(cluster: ConnectedCluster<'_>) -> Result<ResponseOk, Error> {
let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster.inner.context);
pub async fn notebooks(cluster:&Cluster, _connected:ConnectedCluster<'_>) -> Result<ResponseOk, Error> {
let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster);
layout.breadcrumbs(vec![NavLink::new("Notebooks", &urls::deployment_notebooks()).active()]);

let tabs = vec![tabs::Tab {
Expand All@@ -31,15 +31,19 @@ pub async fn notebooks(cluster: ConnectedCluster<'_>) -> Result<ResponseOk, Erro

let nav_tabs = tabs::Tabs::new(tabs, Some("Notebooks"), Some("Notebooks"))?;

Ok(ResponseOk(layout.render(templates::Dashboard { tabs:nav_tabs })))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

// Returns the specified notebook page.
#[get("/notebooks/<notebook_id>")]
pub async fn notebook(cluster: ConnectedCluster<'_>, notebook_id: i64) -> Result<ResponseOk, Error> {
pub async fn notebook(
cluster: &Cluster,
notebook_id: i64,
_connected: ConnectedCluster<'_>,
) -> Result<ResponseOk, Error> {
let notebook = models::Notebook::get_by_id(cluster.pool(), notebook_id).await?;

let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster.inner.context);
let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster);
layout.breadcrumbs(vec![
NavLink::new("Notebooks", &urls::deployment_notebooks()),
NavLink::new(notebook.name.as_str(), &urls::deployment_notebook_by_id(notebook_id)).active(),
Expand All@@ -52,7 +56,7 @@ pub async fn notebook(cluster: ConnectedCluster<'_>, notebook_id: i64) -> Result

let nav_tabs = tabs::Tabs::new(tabs, Some("Notebooks"), Some("Notebooks"))?;

Ok(ResponseOk(layout.render(templates::Dashboard { tabs:nav_tabs })))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

// Returns all the notebooks for a deployment in a turbo frame.
Expand Down
17 changes: 11 additions & 6 deletionspgml-dashboard/src/api/deployment/projects.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,7 @@ use rocket::route::Route;
use sailfish::TemplateOnce;

usecrate::{
guards::Cluster,
guards::ConnectedCluster,
responses::{Error,ResponseOk},
};
Expand All@@ -15,8 +16,8 @@ use crate::utils::urls;

// Returns the deployments projects page.
#[get("/projects")]
pubasyncfnprojects(cluster:ConnectedCluster<'_>) ->Result<ResponseOk,Error>{
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster.inner.context);
pubasyncfnprojects(cluster:&Cluster,_connected:ConnectedCluster<'_>) ->Result<ResponseOk,Error>{
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster);
layout.breadcrumbs(vec![NavLink::new("Projects",&urls::deployment_projects()).active()]);

let tabs =vec![tabs::Tab{
Expand All@@ -26,15 +27,19 @@ pub async fn projects(cluster: ConnectedCluster<'_>) -> Result<ResponseOk, Error

let nav_tabs = tabs::Tabs::new(tabs,Some("Notebooks"),Some("Projects"))?;

Ok(ResponseOk(layout.render(templates::Dashboard{tabs:nav_tabs})))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

// Return the specified project page.
#[get("/projects/<project_id>")]
pubasyncfnproject(cluster:ConnectedCluster<'_>,project_id:i64) ->Result<ResponseOk,Error>{
pubasyncfnproject(
cluster:&Cluster,
project_id:i64,
_connected:ConnectedCluster<'_>,
) ->Result<ResponseOk,Error>{
let project = models::Project::get_by_id(cluster.pool(), project_id).await?;

letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster.inner.context);
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster);
layout.breadcrumbs(vec![
NavLink::new("Projects",&urls::deployment_projects()),
NavLink::new(project.name.as_str(),&urls::deployment_project_by_id(project_id)).active(),
Expand All@@ -47,7 +52,7 @@ pub async fn project(cluster: ConnectedCluster<'_>, project_id: i64) -> Result<R

let nav_tabs = tabs::Tabs::new(tabs,Some("Projects"),Some("Projects"))?;

Ok(ResponseOk(layout.render(templates::Dashboard{tabs:nav_tabs})))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

// Returns all the deployments for the project in a turbo frame.
Expand Down
17 changes: 11 additions & 6 deletionspgml-dashboard/src/api/deployment/snapshots.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,7 @@ use rocket::route::Route;
use sailfish::TemplateOnce;

usecrate::{
guards::Cluster,
guards::ConnectedCluster,
responses::{Error,ResponseOk},
};
Expand All@@ -16,8 +17,8 @@ use std::collections::HashMap;

// Returns snapshots page
#[get("/snapshots")]
pubasyncfnsnapshots(cluster:ConnectedCluster<'_>) ->Result<ResponseOk,Error>{
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster.inner.context);
pubasyncfnsnapshots(cluster:&Cluster,_connected:ConnectedCluster<'_>) ->Result<ResponseOk,Error>{
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster);
layout.breadcrumbs(vec![NavLink::new("Snapshots",&urls::deployment_snapshots()).active()]);

let tabs =vec![tabs::Tab{
Expand All@@ -27,15 +28,19 @@ pub async fn snapshots(cluster: ConnectedCluster<'_>) -> Result<ResponseOk, Erro

let nav_tabs = tabs::Tabs::new(tabs,Some("Snapshots"),Some("Snapshots"))?;

Ok(ResponseOk(layout.render(templates::Dashboard{tabs:nav_tabs})))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

// Returns the specific snapshot page
#[get("/snapshots/<snapshot_id>")]
pubasyncfnsnapshot(cluster:ConnectedCluster<'_>,snapshot_id:i64) ->Result<ResponseOk,Error>{
pubasyncfnsnapshot(
cluster:&Cluster,
snapshot_id:i64,
_connected:ConnectedCluster<'_>,
) ->Result<ResponseOk,Error>{
let snapshot = models::Snapshot::get_by_id(cluster.pool(), snapshot_id).await?;

letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster.inner.context);
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster);
layout.breadcrumbs(vec![
NavLink::new("Snapshots",&urls::deployment_snapshots()),
NavLink::new(&snapshot.relation_name,&urls::deployment_snapshot_by_id(snapshot.id)).active(),
Expand All@@ -48,7 +53,7 @@ pub async fn snapshot(cluster: ConnectedCluster<'_>, snapshot_id: i64) -> Result

let nav_tabs = tabs::Tabs::new(tabs,Some("Snapshots"),Some("Snapshots"))?;

Ok(ResponseOk(layout.render(templates::Dashboard{tabs:nav_tabs})))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

// Returns all snapshots for the deployment in a turboframe.
Expand Down
7 changes: 4 additions & 3 deletionspgml-dashboard/src/api/deployment/uploader.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,7 @@ use rocket::route::Route;
use sailfish::TemplateOnce;

use crate::{
guards::Cluster,
guards::ConnectedCluster,
responses::{BadRequest, Error, ResponseOk},
};
Expand All@@ -18,8 +19,8 @@ use crate::utils::urls;

// Returns the uploader page.
#[get("/uploader")]
pub async fn uploader(cluster: ConnectedCluster<'_>) -> Result<ResponseOk, Error> {
let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster.inner.context);
pub async fn uploader(cluster:&Cluster, _connected:ConnectedCluster<'_>) -> Result<ResponseOk, Error> {
let mut layout = crate::templates::WebAppBase::new("Dashboard", &cluster);
layout.breadcrumbs(vec![NavLink::new("Upload Data", &urls::deployment_uploader()).active()]);

let tabs = vec![tabs::Tab {
Expand All@@ -29,7 +30,7 @@ pub async fn uploader(cluster: ConnectedCluster<'_>) -> Result<ResponseOk, Error

let nav_tabs = tabs::Tabs::new(tabs, Some("Upload Data"), Some("Upload Data"))?;

Ok(ResponseOk(layout.render(templates::Dashboard { tabs:nav_tabs })))
Ok(ResponseOk(layout.render(templates::Dashboard::new(nav_tabs))))
}

// Returns uploader module in a turboframe.
Expand Down
2 changes: 1 addition & 1 deletionpgml-dashboard/src/components/layouts/head/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -134,7 +134,7 @@ mod default_head_template_test {

#[test]
fnset_head(){
letmuthead =Head::new()
let head =Head::new()
.title("test title")
.description("test description")
.image("image/test_image.jpg");
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp