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

Error Alert for service-vendor hosted services must have additional info #1051

Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions src/components/content/order/create/OrderSubmit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function OrderSubmit(state: OrderSubmitProps): React.JSX.Element {
key={uniqueRequestId.current}
uuid={submitDeploymentRequest.data?.serviceId ?? ''}
isSubmitFailed={submitDeploymentRequest.error}
serviceHostType={state.serviceHostingType}
deployedServiceDetails={getServiceDetailsByIdQuery.data}
isPollingError={getServiceDetailsByIdQuery.isError}
serviceProviderContactDetails={state.contactServiceDetails}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export function MigrationProcessingStatus({
<div>
{currentServiceHostingType === serviceHostingType.SELF.toString()
? (response as DeployedServiceDetails).resultMessage
: 'Migrate status polling failed. Please visit MyServices page to check the status of the request.'}
: 'Migrate status polling failed. Please visit MyServices page to check ' +
'the status of the request and contact service vendor for error details.'}
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
DeployedServiceDetails,
Response,
serviceDeploymentState,
serviceHostingType,
ServiceProviderContactDetails,
} from '../../../../xpanse-api/generated';
import { convertStringArrayToUnorderedList } from '../../../utils/generateUnorderedList';
Expand All @@ -20,12 +21,14 @@ import { ProcessingStatus } from './ProcessingStatus';
function OrderSubmitStatusAlert({
uuid,
isSubmitFailed,
serviceHostType,
deployedServiceDetails,
serviceProviderContactDetails,
isPollingError,
}: {
uuid: string | undefined;
isSubmitFailed: Error | null;
serviceHostType: serviceHostingType;
deployedServiceDetails: DeployedServiceDetails | undefined;
serviceProviderContactDetails: ServiceProviderContactDetails | undefined;
isPollingError: boolean;
Expand Down Expand Up @@ -63,14 +66,18 @@ function OrderSubmitStatusAlert({
return getOrderSubmissionFailedDisplay([isSubmitFailed.message]);
}
} else if (uuid && isPollingError) {
return 'Deployment status polling failed. Please visit MyServices page to check the status of the request.';
if (serviceHostType === serviceHostingType.SERVICE_VENDOR) {
return 'Deployment status polling failed. Please visit MyServices page to check the status of the request and contact service vendor for error details.';
} else {
return 'Deployment status polling failed. Please visit MyServices page to check the status of the request';
}
} else if (uuid) {
return 'Request accepted';
} else if (uuid === undefined) {
return 'Request submission in-progress';
}
return '';
}, [deployedServiceDetails, uuid, isPollingError, isSubmitFailed]);
}, [deployedServiceDetails, uuid, isPollingError, isSubmitFailed, serviceHostType]);

const alertType = useMemo(() => {
if (isPollingError || isSubmitFailed) {
Expand Down
15 changes: 11 additions & 4 deletions src/components/content/order/orderStatus/ProcessingStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import React from 'react';
import submitResultStyles from '../../../../styles/submit-result.module.css';
import { DeployedServiceDetails, serviceDeploymentState } from '../../../../xpanse-api/generated';
import { DeployedServiceDetails, serviceDeploymentState, serviceHostingType } from '../../../../xpanse-api/generated';
import { convertMapToDetailsList } from '../../../utils/convertMapToDetailsList';
import { OperationType } from '../types/OperationType';

Expand All @@ -16,6 +16,7 @@ export const ProcessingStatus = ({
response: DeployedServiceDetails;
operationType: OperationType;
}): React.JSX.Element => {
const errorMsg: string = 'Please contact service vendor for error details.';
const endPointMap = new Map<string, string>();
if (operationType === (OperationType.Deploy as OperationType)) {
if (response.serviceDeploymentState === serviceDeploymentState.DEPLOYMENT_SUCCESSFUL) {
Expand All @@ -40,7 +41,9 @@ export const ProcessingStatus = ({
return (
<div>
<span>{'Deployment Failed.'}</span>
<div>{response.resultMessage}</div>
<div>
{response.serviceHostingType === serviceHostingType.SELF ? response.resultMessage : errorMsg}
</div>
</div>
);
}
Expand Down Expand Up @@ -69,7 +72,9 @@ export const ProcessingStatus = ({
return (
<div>
<span>{'Modification Failed.'}</span>
<div>{response.resultMessage}</div>
<div>
{response.serviceHostingType === serviceHostingType.SELF ? response.resultMessage : errorMsg}
</div>
</div>
);
}
Expand All @@ -86,7 +91,9 @@ export const ProcessingStatus = ({
return (
<div>
<span>{'Destroyed Failed.'}</span>
<div>{response.resultMessage}</div>
<div>
{response.serviceHostingType === serviceHostingType.SELF ? response.resultMessage : errorMsg}
</div>
</div>
);
}
Expand Down
Loading