diff --git a/packages/hawtio/src/plugins/camel/camel-preferences-service.ts b/packages/hawtio/src/plugins/camel/camel-preferences-service.ts index 87191a52..fdd11920 100644 --- a/packages/hawtio/src/plugins/camel/camel-preferences-service.ts +++ b/packages/hawtio/src/plugins/camel/camel-preferences-service.ts @@ -1,7 +1,7 @@ export type CamelOptions = { // Route diagram ignoreIdForLabel: boolean - showInflightCounter: boolean // TODO: Not used yet + showInflightCounter: boolean maximumLabelWidth: number // Trace / debug diff --git a/packages/hawtio/src/plugins/camel/route-diagram/RouteDiagram.tsx b/packages/hawtio/src/plugins/camel/route-diagram/RouteDiagram.tsx index 5eb1d0c1..e89244b6 100644 --- a/packages/hawtio/src/plugins/camel/route-diagram/RouteDiagram.tsx +++ b/packages/hawtio/src/plugins/camel/route-diagram/RouteDiagram.tsx @@ -13,6 +13,7 @@ import ReactFlow, { useNodesState, } from 'reactflow' import 'reactflow/dist/style.css' +import { camelPreferencesService } from '../camel-preferences-service' import { CamelContext } from '../context' import { routesService } from '../routes-service' import './RouteDiagram.css' @@ -119,6 +120,8 @@ const CamelNode: React.FunctionComponent> = ({ const [showFull] = useState(false) const [annotation, setAnnotation] = useState(undefined) + const { showInflightCounter } = camelPreferencesService.loadOptions() + useEffect(() => { if (!annotations || annotations.length === 0) { setAnnotation(undefined) @@ -159,7 +162,7 @@ const CamelNode: React.FunctionComponent> = ({
{annotation?.element}
{data.imageUrl}
-
{data.stats?.exchangesInflight}
+
{showInflightCounter && data.stats?.exchangesInflight}
{data.stats?.exchangesCompleted}
{truncate(data.label)}