Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

integrations/freshstatus: Use global time.

Niloth P139ff7aeb6d1
diff --git a/static/images/integrations/freshstatus/001.png b/static/images/integrations/freshstatus/001.png
index 64c6c807004..ed407dfc78a 100644
Binary files a/static/images/integrations/freshstatus/001.png and b/static/images/integrations/freshstatus/001.png differ
diff --git a/zerver/webhooks/freshstatus/tests.py b/zerver/webhooks/freshstatus/tests.py
index c8edf023c02..62c73c4eb9f 100644
--- a/zerver/webhooks/freshstatus/tests.py
+++ b/zerver/webhooks/freshstatus/tests.py
@@ -17,7 +17,7 @@ class FreshstatusHookTests(WebhookTestCase):
expected_message = """
The following incident has been opened: **Degradation of Multiple Servers**
**Description:** This issue is being investigated.
-**Start Time:** 2021-04-12 16:29 UTC
+**Start Time:** <time:2021-04-12 16:29 UTC>
**Affected Services:**
* Database Server
* Web Server
@@ -35,7 +35,7 @@ The following incident has been opened: **Degradation of Multiple Servers**
expected_message = """
The following incident has been opened: **Degradation of Multiple Servers**
**Description:** This issue is being investigated.
-**Start Time:** 2021-04-12 16:29 UTC
+**Start Time:** <time:2021-04-12 16:29 UTC>
**Affected Services:**
* Database Server
* Web Server
@@ -58,7 +58,7 @@ The following incident has been opened: **Degradation of Multiple Servers**
expected_message = """
The following incident has been opened: **Degradation of Database Server**
**Description:** This issue is being investigated.
-**Start Time:** 2021-04-12 16:29 UTC
+**Start Time:** <time:2021-04-12 16:29 UTC>
**Affected Services:**
* Database Server
""".strip()
@@ -96,8 +96,8 @@ The following incident has been closed: **Degradation of Database Server**
expected_message = """
The following scheduled maintenance has been opened: **Expect some services downtime due to server maintenance**
**Description:** As part of the upgrade routine, we will be carrying out server maintenance work for this Service. This work will affect the Service to be unavailable during the maintenance window. We apologize for any inconvenience this may cause. Please do not hesitate to contact our support team at [email protected] if you have any questions regarding this server upgrading exercise.
-**Scheduled Start Time:** 2021-04-12 17:08 UTC
-**Scheduled End Time:** 2021-04-12 18:08 UTC
+**Scheduled Start Time:** <time:2021-04-12 17:08 UTC>
+**Scheduled End Time:** <time:2021-04-12 18:08 UTC>
**Affected Services:**
* Sample Service
""".strip()
@@ -113,8 +113,8 @@ The following scheduled maintenance has been opened: **Expect some services down
expected_message = """
The following scheduled maintenance has been opened: **Expect some services downtime due to server maintenance**
**Description:** As part of the upgrade routine, we will be carrying out server maintenance work for this Service. This work will affect the Service to be unavailable during the maintenance window. We apologize for any inconvenience this may cause. Please do not hesitate to contact our support team at [email protected] if you have any questions regarding this server upgrading exercise.
-**Scheduled Start Time:** 2021-04-12 17:08 UTC
-**Scheduled End Time:** 2021-04-12 18:08 UTC
+**Scheduled Start Time:** <time:2021-04-12 17:08 UTC>
+**Scheduled End Time:** <time:2021-04-12 18:08 UTC>
**Affected Services:**
* Sample Service
* Sample Service 2
@@ -133,8 +133,8 @@ The following scheduled maintenance has been opened: **Expect some services down
expected_message = """
The following scheduled maintenance has been opened: **Expect some services downtime due to server maintenance**
**Description:** As part of the upgrade routine, we will be carrying out server maintenance work for this Service. This work will affect the Service to be unavailable during the maintenance window. We apologize for any inconvenience this may cause. Please do not hesitate to contact our support team at [email protected] if you have any questions regarding this server upgrading exercise.
-**Scheduled Start Time:** 2021-04-12 17:08 UTC
-**Scheduled End Time:** 2021-04-12 18:08 UTC
+**Scheduled Start Time:** <time:2021-04-12 17:08 UTC>
+**Scheduled End Time:** <time:2021-04-12 18:08 UTC>
**Affected Services:**
* Sample Service
* Sample Service 2
diff --git a/zerver/webhooks/freshstatus/view.py b/zerver/webhooks/freshstatus/view.py
index d533ec9c4cf..dedfbc14861 100644
--- a/zerver/webhooks/freshstatus/view.py
+++ b/zerver/webhooks/freshstatus/view.py
@@ -27,7 +27,7 @@ FRESHSTATUS_TOPIC_TEMPLATE_TEST = "Freshstatus"
FRESHSTATUS_MESSAGE_TEMPLATE_INCIDENT_OPEN = """
The following incident has been opened: **{title}**
**Description:** {description}
-**Start Time:** {start_time}
+**Start Time:** <time:{start_time}>
**Affected Services:**
{affected_services}
""".strip()
@@ -45,8 +45,8 @@ The following note has been added to the incident: **{title}**
FRESHSTATUS_MESSAGE_TEMPLATE_SCHEDULED_MAINTENANCE_PLANNED = """
The following scheduled maintenance has been opened: **{title}**
**Description:** {description}
-**Scheduled Start Time:** {scheduled_start_time}
-**Scheduled End Time:** {scheduled_end_time}
+**Scheduled Start Time:** <time:{scheduled_start_time}>
+**Scheduled End Time:** <time:{scheduled_end_time}>
**Affected Services:**
{affected_services}
""".strip()