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

ISW - Copy and UI improvements #21348

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Link directly to input diagnosis page
  • Loading branch information
grotlue committed Jan 14, 2025
commit 387ae727593376d25ebe4d5308be9c4b93e6465a
Original file line number Diff line number Diff line change
@@ -18,7 +18,9 @@ import * as React from 'react';
import { useEffect, useState, useMemo } from 'react';
import styled, { css } from 'styled-components';
import type { UseMutationResult } from '@tanstack/react-query';
import { useNavigate } from 'react-router-dom';

import Routes from 'routing/Routes';
import useSetupInputMutations from 'components/inputs/InputSetupWizard/hooks/useSetupInputMutations';
import { InputStatesStore } from 'stores/inputs/InputStatesStore';
import { Button, Row, Col } from 'components/bootstrap';
@@ -55,7 +57,8 @@ const ButtonCol = styled(Col)(({ theme }) => css`
export type ProcessingSteps = 'createStream' | 'startStream' | 'createPipeline' | 'setupRouting' | 'deleteStream' | 'deletePipeline' | 'deleteRouting' | 'result';

const StartInputStep = () => {
const { goToPreviousStep, goToNextStep, orderedSteps, activeStep, wizardData, stepsConfig } = useInputSetupWizard();
const navigateTo = useNavigate();
const { goToPreviousStep, orderedSteps, activeStep, wizardData, stepsConfig } = useInputSetupWizard();
const { stepsData } = useInputSetupWizardSteps();
const hasPreviousStep = checkHasPreviousStep(orderedSteps, activeStep);
const hasNextStep = checkHasNextStep(orderedSteps, activeStep);
@@ -240,8 +243,12 @@ const StartInputStep = () => {
rollback();
};

const onNextStep = () => {
goToNextStep();
const goToInputDiagnosis = () => {
const { input } = wizardData;

if (!input) return;

navigateTo(Routes.SYSTEM.INPUT_DIAGNOSIS(input.id));
};

const handleBackClick = () => {
@@ -317,7 +324,7 @@ const StartInputStep = () => {

if (hasNextStep) {
return (
<Button disabled={isNextStepDisabled || startInputStatus === 'RUNNING'} onClick={onNextStep} bsStyle="primary">Input Diagnosis</Button>
<Button disabled={isNextStepDisabled || startInputStatus === 'RUNNING'} onClick={goToInputDiagnosis} bsStyle="primary">Input Diagnosis</Button>
);
}

Loading