+
+ props.onConditionChange(undefined)}
+ disabled={props.condition === undefined}
+ >
+ {i18n.translate('xpack.streams.conditionEditor.disable', {
+ defaultMessage: 'Disable routing',
+ })}
+
+
+
+ ) : !props.condition || 'operator' in props.condition ? (
+
) : (
- props.condition &&
- ('operator' in props.condition ? (
-
- ) : (
- {JSON.stringify(props.condition, null, 2)}
- ))
+ {JSON.stringify(props.condition, null, 2)}
)}
);
@@ -213,7 +227,13 @@ function FilterForm(props: {
export function ConditionDisplay(props: { condition: Condition }) {
if (!props.condition) {
- return null;
+ return (
+ <>
+ {i18n.translate('xpack.streams.streamDetailRouting.noCondition', {
+ defaultMessage: 'No condition, no documents will be routed',
+ })}
+ >
+ );
}
return (
<>
diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_routing/index.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_routing/index.tsx
index 5c9d5f0931585..2c848575eb570 100644
--- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_routing/index.tsx
+++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_routing/index.tsx
@@ -906,25 +906,16 @@ function RoutingStreamEntry({
})}
/>