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

Revert "Dan product notifications"#1533

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
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
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
13 changes: 6 additions & 7 deletionspgml-dashboard/src/api/deployment/deployment_models.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,6 @@ use rocket::route::Route;
use sailfish::TemplateOnce;

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

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

let tabs =vec![tabs::Tab{
Expand All@@ -29,16 +28,16 @@ pub async fn deployment_models(cluster: &Cluster) -> Result<ResponseOk, Error> {

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

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

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

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

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

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

#[get("/models_turboframe")]
Expand Down
12 changes: 6 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")]
pubasyncfnnotebooks(cluster:&Cluster) ->Result<ResponseOk,Error>{
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster);
pubasyncfnnotebooks(cluster:ConnectedCluster<'_>) ->Result<ResponseOk,Error>{
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster.inner.context);
layout.breadcrumbs(vec![NavLink::new("Notebooks",&urls::deployment_notebooks()).active()]);

let tabs =vec![tabs::Tab{
Expand All@@ -31,15 +31,15 @@ pub async fn notebooks(cluster: &Cluster) -> Result<ResponseOk, Error> {

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

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

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

letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster);
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster.inner.context);
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 +52,7 @@ pub async fn notebook(cluster: &Cluster, notebook_id: i64) -> Result<ResponseOk,

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

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

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

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

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

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

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

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

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

letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster);
letmut layout =crate::templates::WebAppBase::new("Dashboard",&cluster.inner.context);
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@@ -48,7 +47,7 @@ pub async fn project(cluster: &Cluster, project_id: i64) -> Result<ResponseOk, E

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

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

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

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

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

let tabs =vec![tabs::Tab{
Expand All@@ -28,15 +27,15 @@ pub async fn snapshots(cluster: &Cluster) -> Result<ResponseOk, Error> {

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

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

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

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

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

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

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

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

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

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

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

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

// Returns uploader module in a turboframe.
Expand Down
10 changes: 0 additions & 10 deletionspgml-dashboard/src/components/modal/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,6 @@ pub struct Modal {
pubheader:Option<Component>,
pubbody:Component,
pubdefault_style:bool,
static_backdrop:String,
}

component!(Modal);
Expand DownExpand Up@@ -64,15 +63,6 @@ impl Modal {
self.default_style =false;
self
}

pubfnset_static_backdrop(mutself,set_static:bool) ->Modal{
if set_static{
self.static_backdrop =r#"data-bs-backdrop="static""#.into();
}else{
self.static_backdrop =String::new();
}
self
}
}

#[cfg(test)]
Expand Down
8 changes: 1 addition & 7 deletionspgml-dashboard/src/components/modal/template.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
<div
class="modal <%- size_class %>"
id="<%= id %>"
data-controller="modal"tabindex="-1"aria-modal="true"role="dialog"data-modal-target="modal"
data-action="show->modal#show hide->modal#hide"
<%- static_backdrop %>
>
<divclass="modal <%- size_class %>"id="<%= id %>"data-controller="modal"tabindex="-1"aria-modal="true"role="dialog"data-modal-target="modal">
<divclass="modal-dialog">
<divclass="modal-content">
<% if let Some(header) = header { %>
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@
</div>

<% if notification.dismissible && notification.level != NotificationLevel::Level3 {%>
<aclass="w-0 overflow-visible d-flex align-items-center"style="right: 4vw"href="/dashboard/notifications/remove_banner?id=<%- notification.id%>&notification_type=alert">
<aclass="w-0 overflow-visible d-flex align-items-center"style="right: 4vw"href="/dashboard/notifications/remove_banner?id=<%- notification.id%>&alert=true">
<spanclass="material-symbols-outlined <% if notification.level == NotificationLevel::Level2 {%>close-light<% } else {%>close-dark<% } %>">
close
</span></a>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,6 +41,10 @@ div[data-controller="notifications-marketing-feature-banner"] {
color:#{$slate-shade-100}
}
}

.feature1,.feature2,.feature3 {
border-radius:$border-radius-xl;
}

.message-area {
max-width:75vw;
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,7 @@
<%- content %>

<% if notification.dismissible {%>
<aclass="w-0 btn btn-tertiary overflow-visible d-flex align-items-start p-2"style="height: fit-content"href="/dashboard/notifications/remove_banner?id=<%- notification.id%>&notification_type=feature">
<aclass="w-0 btn btn-tertiary overflow-visible d-flex align-items-start p-2"style="height: fit-content"href="/dashboard/notifications/remove_banner?id=<%- notification.id%>&alert=false">
<spanclass="material-symbols-outlined close">
close
</span></a>
Expand Down
3 changes: 0 additions & 3 deletionspgml-dashboard/src/components/notifications/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,3 @@

// src/components/notifications/marketing
pubmod marketing;

// src/components/notifications/product
pubmod product;
View file
Open in desktop

This file was deleted.

View file
Open in desktop

This file was deleted.

Loading

[8]ページ先頭

©2009-2025 Movatter.jp