- Notifications
You must be signed in to change notification settings - Fork328
Dan google tag manager#1654
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
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
5 changes: 3 additions & 2 deletionspgml-dashboard/src/api/deployment/deployment_models.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletionspgml-dashboard/src/api/deployment/notebooks.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletionspgml-dashboard/src/api/deployment/projects.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletionspgml-dashboard/src/api/deployment/snapshots.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletionpgml-dashboard/src/api/deployment/uploader.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletionspgml-dashboard/src/components/layouts/docs/mod.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletionspgml-dashboard/src/components/layouts/docs/template.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletionspgml-dashboard/src/components/layouts/marketing/base/mod.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletionspgml-dashboard/src/components/layouts/marketing/base/template.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletionspgml-dashboard/src/components/layouts/mod.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionspgml-dashboard/src/components/layouts/product/index/index.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
div[data-controller="layouts-product-index"] {} |
103 changes: 103 additions & 0 deletionspgml-dashboard/src/components/layouts/product/index/mod.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
use pgml_components::component; | ||
use sailfish::TemplateOnce; | ||
use pgml_components::Component; | ||
pub use crate::components::{self, cms::index_link::IndexLink, NavLink, StaticNav, StaticNavLink}; | ||
use crate::{Notification, NotificationLevel}; | ||
use components::notifications::product::ProductBanner; | ||
use crate::components::layouts::Head; | ||
use crate::models::Cluster; | ||
#[derive(TemplateOnce, Default, Clone)] | ||
#[template(path = "layouts/product/index/template.html")] | ||
pub struct Index<'a> { | ||
pub content: Option<String>, | ||
pub breadcrumbs: Vec<NavLink<'a>>, | ||
pub head: Head, | ||
pub dropdown_nav: StaticNav, | ||
pub product_left_nav: StaticNav, | ||
pub body_components: Vec<Component>, | ||
pub cluster: Cluster, | ||
pub product_banners_high: Vec<ProductBanner>, | ||
pub product_banner_medium: ProductBanner, | ||
pub product_banner_marketing: ProductBanner, | ||
} | ||
impl<'a> Index<'a> { | ||
pub fn new(title: &str, context: &crate::guards::Cluster) -> Self { | ||
let head = Head::new().title(title).context(&context.context.head_items); | ||
let cluster = context.context.cluster.clone(); | ||
let all_product_high_level = context | ||
.notifications | ||
.clone() | ||
.unwrap_or_else(|| vec![]) | ||
.into_iter() | ||
.filter(|n: &Notification| n.level == NotificationLevel::ProductHigh) | ||
.enumerate() | ||
.map(|(i, n)| ProductBanner::from_notification(Some(&n)).set_show_modal_on_load(i == 0)) | ||
.collect::<Vec<ProductBanner>>(); | ||
Index { | ||
head, | ||
cluster, | ||
dropdown_nav: context.context.dropdown_nav.clone(), | ||
product_left_nav: context.context.product_left_nav.clone(), | ||
product_banners_high: all_product_high_level, | ||
product_banner_medium: ProductBanner::from_notification(Notification::next_product_of_level( | ||
context, | ||
NotificationLevel::ProductMedium, | ||
)), | ||
product_banner_marketing: ProductBanner::from_notification(Notification::next_product_of_level( | ||
context, | ||
NotificationLevel::ProductMarketing, | ||
)), | ||
body_components: context.context.body_components.clone(), | ||
..Default::default() | ||
} | ||
} | ||
pub fn breadcrumbs(&mut self, breadcrumbs: Vec<NavLink<'a>>) -> &mut Self { | ||
self.breadcrumbs = breadcrumbs.to_owned(); | ||
self | ||
} | ||
pub fn disable_upper_nav(&mut self) -> &mut Self { | ||
let links: Vec<StaticNavLink> = self | ||
.product_left_nav | ||
.links | ||
.iter() | ||
.map(|item| item.to_owned().disabled(true)) | ||
.collect(); | ||
self.product_left_nav = StaticNav { links }; | ||
self | ||
} | ||
pub fn content(&mut self, content: &str) -> &mut Self { | ||
self.content = Some(content.to_owned()); | ||
self | ||
} | ||
pub fn body_components(&mut self, components: Vec<Component>) -> &mut Self { | ||
self.body_components.extend(components); | ||
self | ||
} | ||
pub fn render<T>(&mut self, template: T) -> String | ||
where | ||
T: sailfish::TemplateOnce, | ||
{ | ||
self.content = Some(template.render_once().unwrap()); | ||
(*self).clone().into() | ||
} | ||
} | ||
impl<'a> From<Index<'a>> for String { | ||
fn from(layout: Index) -> String { | ||
layout.render_once().unwrap() | ||
} | ||
} | ||
component!(Index, 'a); |
File renamed without changes.
6 changes: 6 additions & 0 deletionspgml-dashboard/src/components/layouts/product/mod.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// This file is automatically generated. | ||
// You shouldn't modify it manually. | ||
// src/components/layouts/product/index | ||
pub mod index; | ||
pub use index::Index; |
1 change: 1 addition & 0 deletionspgml-dashboard/src/guards.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletionpgml-dashboard/src/lib.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.