Use stack-slug instead of org-title

This commit is contained in:
Michael Derynck 2022-09-06 13:45:34 -06:00
parent a8fd2d96e2
commit c8fc19b402
4 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@ class GrafanaAlertingSyncManager:
datasources, response_info = self.client.get_datasources()
if datasources is None:
logger.warning(
f"Failed to get datasource list for organization {self.alert_receive_channel.organization.org_title}, "
f"Failed to get datasource list for organization {self.alert_receive_channel.organization.stack_slug}, "
f"{response_info}"
)
return

View file

@ -24,7 +24,7 @@ class AlertGroupSmsRenderer(AlertGroupBaseRenderer):
incident_link = self.alert_group.web_link
return (
f"You are invited to check an incident #{self.alert_group.inside_organization_number} with title "
f'"{title}" in Grafana OnCall organization: "{self.alert_group.channel.organization.org_title}", '
f'"{title}" in Grafana OnCall organization: "{self.alert_group.channel.organization.stack_slug}", '
f"alert channel: {self.alert_group.channel.short_name}, "
f"alerts registered: {self.alert_group.alerts.count()}, "
f"{incident_link}\n"

View file

@ -436,7 +436,7 @@ def _get_organization_select(slack_team_identity, slack_user_identity, value, in
{
"text": {
"type": "plain_text",
"text": f"{org.org_title}",
"text": f"{org.stack_slug}",
"emoji": True,
},
"value": f"{org.pk}",

View file

@ -64,7 +64,7 @@ class PhoneManager:
def notify_about_changed_verified_phone_number(self, phone_number, connected=False):
text = (
f"This phone number has been {'connected to' if connected else 'disconnected from'} Grafana OnCall team "
f'"{self.user.organization.org_title}"\nYour Grafana OnCall <3'
f'"{self.user.organization.stack_slug}"\nYour Grafana OnCall <3'
)
try:
twilio_client.send_message(text, phone_number)