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

Add routing step to Input Setup Wizard #21048

Merged
merged 20 commits into from
Nov 28, 2024
Merged

Conversation

grotlue
Copy link
Contributor

@grotlue grotlue commented Nov 25, 2024

Description

closes #20568
/jpd Graylog2/graylog-plugin-enterprise#9273
/nocl

This PR:

  • Adds the new "Setup Routing" step which allows the selection of existing streams and shows a warning for connected pipelines
  • Cleans up/moves unused components
  • Removes some logic in the determineFirstStep method which is not needed this cycle, however, kept the method itself as logic will be added with more steps
  • Added a stepHelper with helper functions for working with steps and data
  • Some more small cleanup, mainly due to requirement changes
  • Adds tests for the stepHelper, and feature tests for the wizard and the routing step

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

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.

@grotlue grotlue linked an issue Nov 25, 2024 that may be closed by this pull request
Copy link
Contributor

@ousmaneo ousmaneo left a comment

Choose a reason for hiding this comment

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

I tested the wizard feature, and it overall looks good. I have a suggestion inline.
image


const SetupRoutingStep = () => {
const { goToPreviousStep, goToNextStep, orderedSteps, activeStep, stepsData, setStepsData } = useInputSetupWizard();
const { data: streams, isLoading: isStreamsLoading } = useQuery<Array<Stream>>(['streamsMap'], StreamsActions.listStreams);
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a hook (useStreams) that provides streams, and we also have a global Streams context provider that provide the streams list. we could use it here.

const { data: streams, isLoading: isStreamsLoading } = useQuery<Array<Stream>>(['streamsMap'], StreamsActions.listStreams);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, will use the hook instead.

Copy link
Contributor

@ousmaneo ousmaneo left a comment

Choose a reason for hiding this comment

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

LGTM

@grotlue grotlue merged commit aeac80e into master Nov 28, 2024
7 checks passed
@grotlue grotlue deleted the feat/20568/setup-routing-step branch November 28, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ISW - Wizard Step: Setup Routing
2 participants