Skip to content

Commit a3f5a4a

Browse files
mihaibudiuKarakatiza666
authored andcommitted
[webconsole] Refine definition of 'paused' connector
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
1 parent a26e6c0 commit a3f5a4a

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

js-packages/web-console/src/lib/components/pipelines/editor/performance/MetricsTables.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502
{/snippet}
503503

504504
{#snippet tableMultiConnectorCell(data: AggregatedInputEndpointMetrics, isExpanded: boolean)}
505-
{@const runningCount = data.connectors.filter((c) => c.paused === false).length}
505+
{@const runningCount = data.connectors.filter((c) => c.paused === false && c.metrics.end_of_input === false).length}
506506
{@const anyErrors = data.connectors.some(inputHasErrors)}
507507
{@const anyFatalError = data.connectors.some((c) => c.fatal_error != null)}
508508
{@const anyBarrier = data.connectors.some((c) => c.barrier === true)}

js-packages/web-console/src/lib/components/pipelines/editor/performance/MetricsTables.svelte.spec.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,26 @@ describe('MetricsTables.svelte', () => {
421421
await renderComponent(buildMetrics(status))
422422
await expect.element(page.getByText('3 connectors')).toBeInTheDocument()
423423
})
424+
425+
it('combined row shows paused icon (not running) when one connector is end-of-input and the other is paused', async () => {
426+
const status = makeStatus(
427+
[],
428+
[
429+
makeInputStatus('t1', {
430+
endpoint_name: 'c1',
431+
paused: false,
432+
metrics: makeInputMetrics({ end_of_input: true })
433+
}),
434+
makeInputStatus('t1', {
435+
endpoint_name: 'c2',
436+
paused: true
437+
})
438+
]
439+
)
440+
await renderComponent(buildMetrics(status))
441+
await expect.element(page.getByTestId('box-icon-paused')).toBeInTheDocument()
442+
await expect.element(page.getByTestId('box-icon-running')).not.toBeInTheDocument()
443+
})
424444
})
425445

426446
describe('F. Error count buttons & callbacks', () => {

0 commit comments

Comments
 (0)