feat(alerts): enable tab selection for dashboard alerts/reports
SUMMARY
Implements a new feature enabling a tab to be selected as a view for an alert/report. When a dashboard is selected as the content for a report, an antd TreeSelect component is rendered to load and select tab options. When selected, the tab selection is added to the report payload as an anchor.
On execution, the feature takes advantage of existing logic for the report.extra.dashboard.anchor_tab attribute of the ReportSchedule SQLA model. When extra metadata are attached to the report schedule, a permalink is generated with the metadata included, and this permalink is then used to generate screenshots of the selected dashboard.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [x] Required feature flags: ALERT_REPORTS, ALERT_REPORT_TABS
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [x] Introduces new feature or API
- [ ] Removes existing feature or API
Codecov Report
Attention: Patch coverage is 63.04348% with 17 lines in your changes missing coverage. Please review.
Project coverage is 70.39%. Comparing base (
76d897e) to head (0001f9f). Report is 477 commits behind head on master.
| Files | Patch % | Lines |
|---|---|---|
| ...-frontend/src/features/alerts/AlertReportModal.tsx | 61.36% | 14 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #29096 +/- ##
==========================================
+ Coverage 60.48% 70.39% +9.91%
==========================================
Files 1931 1969 +38
Lines 76236 78935 +2699
Branches 8568 9014 +446
==========================================
+ Hits 46114 55570 +9456
+ Misses 28017 21150 -6867
- Partials 2105 2215 +110
| Flag | Coverage Δ | |
|---|---|---|
| hive | 49.10% <50.00%> (-0.07%) |
:arrow_down: |
| javascript | 58.10% <61.36%> (+0.39%) |
:arrow_up: |
| mysql | 76.91% <100.00%> (?) |
|
| postgres | 77.00% <100.00%> (?) |
|
| presto | 53.66% <50.00%> (-0.15%) |
:arrow_down: |
| python | 83.69% <100.00%> (+20.20%) |
:arrow_up: |
| sqlite | 76.48% <100.00%> (?) |
|
| unit | 59.89% <50.00%> (+2.26%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
/testenv up FLAG_ALERT_REPORTS = True
@yousoph Ephemeral environment spinning up at http://35.94.63.93:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_ALERT_REPORTS = True
@yousoph Ephemeral environment spinning up at http://34.221.90.242:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_ALERT_REPORTS=True
@yousoph Ephemeral environment spinning up at http://35.94.142.6:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_ALERT_REPORTS=True
@yousoph Ephemeral environment spinning up at http://34.214.205.147:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
Functionality wise - looks good! Thanks @fisjac
/testenv up FEATURE_ALERT_REPORTS=True FEATURE_ALERT_REPORT_TABS = True
@yousoph Ephemeral environment spinning up at http://54.213.240.222:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_ALERT_REPORTS=True FEATURE_ALERT_REPORT_TABS=True
@yousoph Ephemeral environment spinning up at http://54.213.76.60:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
Any reason not to merge this? Itchy trigger finger kicking in ;)
Any reason not to merge this? Itchy trigger finger kicking in ;)
there are only reasons to merge it 🤠
Ephemeral environment shutdown and build artifacts deleted.