-
Notifications
You must be signed in to change notification settings - Fork 15.3k
feat(dashboards): Add open graph metadata for dashboards #33550
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
base: master
Are you sure you want to change the base?
Conversation
…rt-for-dashboards Add Slack unfurl metadata for dashboards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Status |
---|---|---|
Inconsistent Meta Tag Formatting ▹ view | 🧠 Not in standard |
Files scanned
File Path | Reviewed |
---|---|
superset/templates/superset/spa.html | ✅ |
superset/embedded/view.py | ✅ |
superset/views/core.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
@@ -18,6 +18,15 @@ | |||
#} | |||
{% extends "superset/basic.html" %} | |||
|
|||
{% block head_meta %} | |||
{% if title %}<meta property="og:title" content="{{ title }}" />{% endif %} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, actual good use of server-side html generation! Wondering a few things ->
|
@mistercrunch You're right, Slack’s crawler is not logged in, so it receives this redirect and never reaches the dashboard page. Upon further research, unfurling works with some analytics tools because those like Mixpanel have developed Slack integrations that provide an access token. Appears a similar Preset/Superset Slack integration would need to handle auth before this scope of work is relevant 🤷♂️ . Alternative approaches:
wdyt? (I likely don't have the bandwidth atm to work on these alternative paths, but this unfurling support would be a welcomed addition as we roll out Superset/Preset to our 1000 person org next month) :) |
I want to highlight some of the security concerns and mitigation mechanisms.
Given that:
About the Slack app:
|
Agree here. In this case, I think this PR is properly scoped. |
Code LGTM, but I'm not sure about @mistercrunch's concern as to whether or not this poses a form of security risk with revealing dashboard titles and such. I'll cc @dpgaspar for good measure. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #33550 +/- ##
===========================================
+ Coverage 60.48% 83.04% +22.55%
===========================================
Files 1931 553 -1378
Lines 76236 39999 -36237
Branches 8568 0 -8568
===========================================
- Hits 46114 33217 -12897
+ Misses 28017 6782 -21235
+ Partials 2105 0 -2105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
From my understanding I think it's safe where that page should only render if the user has access to the dashboard. What would be a security concern is if we returned metadata to an unauthenticated user to enable [unauthenticated] Slack (and everything else). About touching |
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
og:title
tags (or paste into slack to render)ADDITIONAL INFORMATION