remove not deployed from inference pipeline card (#141091)

This commit is contained in:
Rodney Norris 2022-09-20 11:43:04 -05:00 committed by GitHub
parent 063f50dc7e
commit 19097ddae9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 16 deletions

View file

@ -38,10 +38,4 @@ describe('InfererencePipelineCard', () => {
const health = wrapper.find(EuiHealth);
expect(health.prop('children')).toEqual('Deployed');
});
it('renders an undeployed item', () => {
const wrapper = shallow(<InferencePipelineCard {...mockValues} isDeployed={false} />);
const health = wrapper.find(EuiHealth);
expect(health.prop('children')).toEqual('Not deployed');
});
});

View file

@ -49,11 +49,6 @@ export const InferencePipelineCard: React.FC<InferencePipeline> = ({
defaultMessage: 'Deployed',
});
const notDeployedText = i18n.translate(
'xpack.enterpriseSearch.inferencePipelineCard.isNotDeployed',
{ defaultMessage: 'Not deployed' }
);
const actionButton = (
<EuiButtonEmpty
iconSide="right"
@ -135,11 +130,11 @@ export const InferencePipelineCard: React.FC<InferencePipeline> = ({
</EuiFlexItem>
<EuiFlexItem>
<EuiFlexGroup gutterSize="m" justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiHealth color={isDeployed ? 'success' : 'accent'}>
{isDeployed ? deployedText : notDeployedText}
</EuiHealth>
</EuiFlexItem>
{isDeployed && (
<EuiFlexItem grow={false}>
<EuiHealth color="success">{deployedText}</EuiHealth>
</EuiFlexItem>
)}
<EuiFlexItem grow={false}>
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem>