Support sentence case names for known processors (#74847)

This commit is contained in:
Jean-Louis Leysens 2020-08-12 17:45:12 +02:00 committed by GitHub
parent fb2b9a46af
commit 0e5ac40b00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,17 +7,19 @@
import React, { FunctionComponent, memo } from 'react';
import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
import { ProcessorInternal } from '../../types';
import { getProcessorDescriptor } from '../shared';
interface Props {
processor: ProcessorInternal;
}
export const ProcessorInformation: FunctionComponent<Props> = memo(({ processor }) => {
const label = getProcessorDescriptor(processor.type)?.label ?? processor.type;
return (
<EuiPanel>
<EuiFlexGroup justifyContent="center" alignItems="center" responsive={false} gutterSize="s">
<EuiFlexItem grow={false}>
<b>{processor.type}</b>
<b>{label}</b>
</EuiFlexItem>
{processor.options.description ? (
<EuiFlexItem grow={false}>