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

feat: add cron picker to AlertReportModal #12032

Merged
merged 6 commits into from
Dec 15, 2020

Conversation

nytai
Copy link
Member

@nytai nytai commented Dec 14, 2020

SUMMARY

  • adds react-js-cron library with translation strings to src/common/components
  • adds a cron picker based on react-js-cron to the AlertReportModal
  • adds a storybook entry for react-js-cron example usage with a free-form input.
  • fixes flex-wrap style at lower screen widths
  • adds crontab_humanized api field to reports api (uses cron-descriptor python lib)

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:
Screen Shot 2020-12-13 at 10 19 38 PM
Screen Shot 2020-12-13 at 10 20 03 PM

Humanized "Schedule" column
Screen Shot 2020-12-14 at 3 17 43 PM

TEST PLAN

  • manual testing
    • AlertReportModal contains a cron picker
    • changes to cron picker are reflected in the text input.
    • changes to text input, followed by a blur or entry key, are reflected in cron-picker
  • storybook component testing.
  • unit tests for AlertReportCronScheduler component

ADDITIONAL INFORMATION

  • Changes UI

@codecov-io
Copy link

codecov-io commented Dec 14, 2020

Codecov Report

Merging #12032 (b96957b) into master (fda3a2f) will decrease coverage by 4.81%.
The diff coverage is 14.70%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12032      +/-   ##
==========================================
- Coverage   57.99%   53.17%   -4.82%     
==========================================
  Files         907      438     -469     
  Lines       44719    15715   -29004     
  Branches     4056     4060       +4     
==========================================
- Hits        25934     8357   -17577     
+ Misses      18785     7358   -11427     
Flag Coverage Δ
cypress 53.17% <14.70%> (+6.32%) ⬆️
python ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/common/components/index.tsx 100.00% <ø> (ø)
...perset-frontend/src/views/CRUD/alert/AlertList.tsx 1.47% <0.00%> (-0.05%) ⬇️
...CRUD/alert/components/AlertReportCronScheduler.tsx 5.55% <5.55%> (ø)
...frontend/src/views/CRUD/alert/AlertReportModal.tsx 4.17% <20.00%> (+0.02%) ⬆️
...rset-frontend/src/common/components/CronPicker.tsx 33.33% <33.33%> (ø)
superset-frontend/src/common/components/Select.tsx 60.00% <100.00%> (ø)
...ntend/src/dashboard/components/PropertiesModal.jsx 59.45% <0.00%> (-1.81%) ⬇️
...rsions/a9c47e2c1547_add_impersonate_user_to_dbs.py
superset/examples/helpers.py
.../c2acd2cf3df2_alter_type_of_dbs_encrypted_extra.py
... and 543 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fda3a2f...b96957b. Read the comment docs.

@nytai nytai marked this pull request as ready for review December 14, 2020 17:47
@nytai nytai requested a review from lilykuang December 14, 2020 19:14
@nytai nytai force-pushed the tai/cron-picker branch 2 times, most recently from 28974f9 to b619e66 Compare December 15, 2020 00:05
Copy link
Member

@lilykuang lilykuang left a comment

Choose a reason for hiding this comment

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

I pulled this branch and tried this out. LGTM

@nytai nytai merged commit 6fcda5d into apache:master Dec 15, 2020
@nytai nytai deleted the tai/cron-picker branch December 15, 2020 06:29
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants