Skip to content

Commit

Permalink
fixup! feat: handle gracefully when an invalid devfile is found in a …
Browse files Browse the repository at this point in the history
…git repository
  • Loading branch information
olexii4 committed Oct 24, 2022
1 parent dca5d1a commit 1bb4ed1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type State = {
isExpanded: boolean;
};

class ExpandableWarningItems extends React.Component<Props, State> {
class ExpandableWarning extends React.Component<Props, State> {
private readonly checkOverflow: () => void;
private copiedTimer: number | undefined;

Expand Down Expand Up @@ -152,4 +152,4 @@ class ExpandableWarningItems extends React.Component<Props, State> {
}
}

export default ExpandableWarningItems;
export default ExpandableWarning;
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { AbstractLoaderStep, LoaderStepProps, LoaderStepState } from '../../../.
import { AlertItem } from '../../../../../../services/helpers/types';
import { selectDefaultDevfile } from '../../../../../../store/DevfileRegistries/selectors';
import { getProjectName } from '../../../../../../services/helpers/getProjectName';
import ExpandableWarningItems from '../../../../../../components/ExpandableWarning';
import ExpandableWarning from '../../../../../../components/ExpandableWarning';

export class CreateWorkspaceError extends Error {
constructor(message: string) {
Expand Down Expand Up @@ -272,7 +272,7 @@ class StepApplyDevfile extends AbstractLoaderStep<Props, State> {
title: 'Warning',
variant: AlertVariant.warning,
children: (
<ExpandableWarningItems
<ExpandableWarning
textBefore="The new Workspace couldn't be created from the Devfile in the git repository:"
errorMessage={helpers.errors.getMessage(error)}
textAfter="If you continue it will be ignored and a regular workspace will be created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import buildFactoryParams from '../../../buildFactoryParams';
import { AbstractLoaderStep, LoaderStepProps, LoaderStepState } from '../../../../AbstractStep';
import { AlertItem } from '../../../../../../services/helpers/types';
import OAuthService, { isOAuthResponse } from '../../../../../../services/oauth';
import ExpandableWarningItems from '../../../../../../components/ExpandableWarning';
import ExpandableWarning from '../../../../../../components/ExpandableWarning';

export class ApplyingDevfileError extends Error {
constructor(message) {
Expand Down Expand Up @@ -299,7 +299,7 @@ class StepFetchDevfile extends AbstractLoaderStep<Props, State> {
title: 'Warning',
variant: AlertVariant.warning,
children: (
<ExpandableWarningItems
<ExpandableWarning
textBefore="The Devfile in the git repository is invalid:"
errorMessage={helpers.errors.getMessage(error)}
textAfter="If you continue it will be ignored and a regular workspace will be created.
Expand Down

0 comments on commit 1bb4ed1

Please sign in to comment.