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

Use Modal confirm when deleting stream and show DWH warning. #20224

Merged
merged 6 commits into from
Aug 26, 2024

Conversation

ousmaneo
Copy link
Contributor

Before this PR, deleting a stream was used to show the confirm base and windows.confirm with this change, we are using ConfirmModal 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@ousmaneo ousmaneo marked this pull request as ready for review August 22, 2024 14:33
Copy link
Contributor

@gally47 gally47 left a 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) => {
Copy link
Contributor

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) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for this hook

@ousmaneo ousmaneo requested a review from gally47 August 26, 2024 12:30
Copy link
Contributor

@gally47 gally47 left a comment

Choose a reason for hiding this comment

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

LGTM

@gally47 gally47 merged commit 60a9bac into master Aug 26, 2024
7 checks passed
@gally47 gally47 deleted the stream-delete-modal-dwh branch August 26, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants