Skip to content

Commit

Permalink
Update notification email templates to include the 'variant' field
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Apr 17, 2024
1 parent c8e3636 commit 785a90a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
- hostname Your galaxy's hostname (i.e. usegalaxy.* or the value in `server_name` from the galaxy config file)
- contact_email Your galaxy's contact email
- notification_settings_url The URL to the user's notification settings to manage their subscriptions
- variant The notification variant indicates the level of importance of the notification (i.e. info, warning, urgent)
- content The message payload
- subject The message subject
- content The message content in HTML (converted from Markdown)
- subject The message subject
- content The message content in HTML (converted from Markdown)
- galaxy_url The URL to the Galaxy instance (i.e. https://usegalaxy.*)

Template begins here >>>>>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ sent:
- hostname Your galaxy's hostname (i.e. usegalaxy.* or the value in `server_name` from the galaxy config file)
- contact_email Your galaxy's contact email
- notification_settings_url The URL to the user's notification settings to manage their subscriptions
- variant The notification variant indicates the level of importance of the notification (i.e. info, warning, urgent)
- content The message payload
- subject The message subject
- content The message content in HTML (converted from Markdown)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- hostname Your galaxy's hostname (i.e. usegalaxy.* or the value in `server_name` from the galaxy config file)
- contact_email Your galaxy's contact email
- notification_settings_url The URL to the user's notification settings to manage their subscriptions
- variant The notification variant indicates the level of importance of the notification (i.e. info, warning, urgent)
- content The new_shared_item payload
- item_type The type of the shared item
- item_name The name of the shared item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ sent:
- hostname Your galaxy's hostname (i.e. usegalaxy.* or the value in `server_name` from the galaxy config file)
- contact_email Your galaxy's contact email
- notification_settings_url The URL to the user's notification settings to manage their subscriptions
- variant The notification variant indicates the level of importance of the notification (i.e. info, warning, urgent)
- content The new_shared_item payload
- item_type The type of the shared item
- item_name The name of the shared item
Expand Down
2 changes: 2 additions & 0 deletions lib/galaxy/managers/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ class NotificationContext(BaseModel):
date: str
hostname: str
contact_email: str
variant: str
notification_settings_url: str
content: AnyNotificationContent
galaxy_url: Optional[str] = None
Expand Down Expand Up @@ -713,6 +714,7 @@ def build_context(self, template_format: TemplateFormats) -> NotificationContext
hostname=hostname,
contact_email=contact_email,
notification_settings_url=notification_settings_url,
variant=notification.variant,
content=self.get_content(template_format),
galaxy_url=self.notification.galaxy_url,
)
Expand Down

0 comments on commit 785a90a

Please sign in to comment.