-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use Modal confirm when deleting stream and show DWH warning. #20224
Conversation
- check if dwh enabled or has data
764ed64
to
46383bf
Compare
e810a64
to
8ea8db8
Compare
8ea8db8
to
6b6031c
Compare
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.
It works as expected, code looking good, found 2 nitpicks below:
onCancel: () => void, | ||
}; | ||
|
||
const useStreamDataWarehouseHasData = (streamId: string, enabled: boolean) => { |
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.
I think it's good to extract this hook into a file in the hooks repo, it might be used elsewhere, wdyt?
); | ||
}; | ||
|
||
const useIsStreamDataWarehouseEnabled = (streamId: string, enabled: boolean) => { |
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.
Same for this hook
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.
LGTM
Before this PR, deleting a stream was used to show the confirm base and
windows.confirm
with this change, we are usingConfirmModal
Component.We are also adding the possibility to display a warning when DWH is enabled or has data on the stream.
/nocl
/jpd Graylog2/graylog-plugin-enterprise#8291
Types of changes
Checklist: