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: alert/report execution log list view #11937

Merged
merged 11 commits into from
Dec 10, 2020

Conversation

lilykuang
Copy link
Member

@lilykuang lilykuang commented Dec 4, 2020

SUMMARY

  • implement execution log for each alert/report
  • Back to all redirect back to alert/report list

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Alert Execution Log
Screen Shot 2020-12-08 at 2 31 39 PM
Report Execution Log
Screen Shot 2020-12-08 at 2 31 55 PM

TEST PLAN

  • unit test for execution log

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Dec 5, 2020

Codecov Report

Merging #11937 (720f78c) into master (9e07e10) will decrease coverage by 9.02%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11937      +/-   ##
==========================================
- Coverage   63.59%   54.57%   -9.03%     
==========================================
  Files         939      431     -508     
  Lines       45580    15160   -30420     
  Branches     4371     3874     -497     
==========================================
- Hits        28988     8273   -20715     
+ Misses      16416     6887    -9529     
+ Partials      176        0     -176     
Flag Coverage Δ
cypress 54.57% <14.28%> (?)
javascript ?
python ?

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

Impacted Files Coverage Δ
superset-frontend/src/views/App.tsx 100.00% <ø> (+100.00%) ⬆️
...perset-frontend/src/views/CRUD/alert/AlertList.tsx 1.75% <0.00%> (-66.57%) ⬇️
.../src/views/CRUD/alert/components/RecipientIcon.tsx 0.00% <0.00%> (ø)
...rc/views/CRUD/alert/components/AlertStatusIcon.tsx 2.94% <2.94%> (ø)
...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx 11.76% <11.76%> (ø)
superset-frontend/src/views/CRUD/alert/types.ts 100.00% <100.00%> (ø)
...uperset-frontend/src/dashboard/util/dnd-reorder.js 0.00% <0.00%> (-100.00%) ⬇️
...rset-frontend/src/dashboard/util/getEmptyLayout.js 0.00% <0.00%> (-100.00%) ⬇️
...dashboard/components/resizable/ResizableHandle.jsx 0.00% <0.00%> (-100.00%) ⬇️
.../src/dashboard/util/getFilterScopeFromNodesTree.js 0.00% <0.00%> (-93.48%) ⬇️
... and 857 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 9e07e10...720f78c. Read the comment docs.

@lilykuang lilykuang marked this pull request as ready for review December 8, 2020 22:46
@lilykuang lilykuang requested review from nytai and dpgaspar December 9, 2020 18:34
@lilykuang lilykuang force-pushed the lily/alert-execution-log branch from afa7bed to 90e3899 Compare December 9, 2020 19:20
Copy link
Member

@nytai nytai left a comment

Choose a reason for hiding this comment

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

LGTM, just 1 typo to fix though

const handleEdit = () => {}; // handleAnnotationEdit(original);
const handleDelete = () => {}; // setAlertCurrentlyDeleting(original);
const hanldeGotoExecutionLog = () =>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const hanldeGotoExecutionLog = () =>
const handleGotoExecutionLog = () =>

tooltip: t('Execution Log'),
placement: 'bottom',
icon: 'note' as IconName,
onClick: handleEdit,
onClick: hanldeGotoExecutionLog,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
onClick: hanldeGotoExecutionLog,
onClick: handleGotoExecutionLog,

addDangerToast,
);

const [alert, setAlert] = useState<AlertObject | null>(null);
Copy link
Member

@nytai nytai Dec 10, 2020

Choose a reason for hiding this comment

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

Do we still need this? Isn't alertResource the same thing?

Copy link
Member Author

Choose a reason for hiding this comment

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

dont really need this. I will remove this line of code

Comment on lines 76 to 78
if (alertId !== null && !alertLoading) {
fetchResource(alertId);
}
Copy link
Member

Choose a reason for hiding this comment

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

I haven't tested this, but it looks like this would cause an infinite fetch loop. Let's wrap it in a useEffect to be safe

Suggested change
if (alertId !== null && !alertLoading) {
fetchResource(alertId);
}
useEffect(() => {
if (alertId !== null) {
fetchResource(alertId);
}
}, [alertId])

Copy link
Member

Choose a reason for hiding this comment

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

yup, just tested this. It results in an infinite fetchResource loop

@lilykuang lilykuang force-pushed the lily/alert-execution-log branch from 350102c to 0b120b2 Compare December 10, 2020 20:26
@nytai nytai merged commit df6efb6 into apache:master Dec 10, 2020
@nytai nytai deleted the lily/alert-execution-log branch December 10, 2020 23:15
@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/XL 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants