Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty up Slack formatting. #15898

Merged
merged 6 commits into from
Apr 16, 2024
Merged

Conversation

xorrkaz
Copy link
Contributor

@xorrkaz xorrkaz commented Mar 18, 2024

  • Normalize spaces by turning every instance of two or more spaces into one space.
  • Allow for custom URL links even when strip_tags() is in effect by transforming "standard" markdown syntax into Slack link markdown after strip_tags() is run.

DO NOT DELETE THE UNDERLYING TEXT

Please note

Please read this information carefully. You can run ./lnms dev:check to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.
  • If my Pull Request makes discovery/polling/yaml changes, I have added/updated test data.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

* Normalize spaces by turning every instance of two or more spaces into
  one space.
* Allow for custom URL links even when strip_tags() is in effect by
  transformaing "standard" markdown syntax into Slack link markdown
  after strip_tags() is run.
@xorrkaz
Copy link
Contributor Author

xorrkaz commented Mar 18, 2024

Here is a before and after screenshot of the formatting:

Before:

Screenshot 2024-03-17 at 20 17 03

After:

Screenshot 2024-03-17 at 20 17 58

@murrant
Copy link
Member

murrant commented Mar 19, 2024

Perhaps a documentation update to mention the urls in markdown syntax would be good?

While here, flesh out the Slack docs to match the configuration options
one currently sees in the transport.
@xorrkaz
Copy link
Contributor Author

xorrkaz commented Mar 19, 2024

Document?! Don't we have people for that :-D . Good call. I added this bit about the links and fleshed out some other elements I thought were lacking.

Copy link
Contributor

@PipoCanaja PipoCanaja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but not tested as I don't use slack).

@murrant murrant merged commit d7737b9 into librenms:master Apr 16, 2024
9 checks passed
@librenms-bot
Copy link

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/24-4-0-changelog/24157/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants