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/papertrail: Use global time.

Niloth P2403d0d37904
diff --git a/static/images/integrations/papertrail/001.png b/static/images/integrations/papertrail/001.png
index fc341c605ab..83577bc8b10 100644
Binary files a/static/images/integrations/papertrail/001.png and b/static/images/integrations/papertrail/001.png differ
diff --git a/zerver/webhooks/papertrail/tests.py b/zerver/webhooks/papertrail/tests.py
index 51e9161e55d..ed9a1cb1107 100644
--- a/zerver/webhooks/papertrail/tests.py
+++ b/zerver/webhooks/papertrail/tests.py
@@ -15,11 +15,11 @@ class PapertrailHookTests(WebhookTestCase):
expected_message = """
[Search for "Important stuff"](https://papertrailapp.com/searches/42) found **2** matches:
-May 18 20:30:02 - abc - cron OR server1:
+<time:May 18 20:30:02> - abc - cron OR server1:
``` quote
message body
```
-May 18 20:30:02 - server1 - cron OR server1:
+<time:May 18 20:30:02> - server1 - cron OR server1:
``` quote
A short event
```
@@ -37,19 +37,19 @@ A short event
expected_message = """
[Search for "Important stuff"](https://papertrailapp.com/searches/42) found **5** matches:
-May 18 20:30:02 - abc - cron OR server1:
+<time:May 18 20:30:02> - abc - cron OR server1:
``` quote
message body 1
```
-May 18 20:30:02 - abc - cron OR server1:
+<time:May 18 20:30:02> - abc - cron OR server1:
``` quote
message body 2
```
-May 18 20:30:02 - abc - cron OR server1:
+<time:May 18 20:30:02> - abc - cron OR server1:
``` quote
message body 3
```
-May 18 20:30:02 - abc - cron OR server1:
+<time:May 18 20:30:02> - abc - cron OR server1:
``` quote
message body 4
```
diff --git a/zerver/webhooks/papertrail/view.py b/zerver/webhooks/papertrail/view.py
index 5f184ba3063..efe5747df67 100644
--- a/zerver/webhooks/papertrail/view.py
+++ b/zerver/webhooks/papertrail/view.py
@@ -12,7 +12,7 @@ from zerver.models import UserProfile
MATCHES_TEMPLATE = '[Search for "{name}"]({url}) found **{number}** matches:\n'
SEARCH_TEMPLATE = """
-{timestamp} - {source} - {query}:
+<time:{timestamp}> - {source} - {query}:
``` quote
{message}
```