Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,18 @@ export const SupervisorStatisticsTable = React.memo(function SupervisorStatistic

const formatNumber = isRate ? formatRate : formatInteger;
const formatData = isRate ? formatByteRate : formatBytes;
const bytes = c.processedBytes ? ` (${formatData(c.processedBytes)})` : '';
return (
return c.processedBytes ? (
<div>
<div>{`Processed: ${formatNumber(c.processed)}${bytes}`}</div>
<div>{`Input: ${formatData(c.processedBytes)}`}</div>
{Boolean(c.processed) && <div>{`Processed: ${formatNumber(c.processed)}`}</div>}
{Boolean(c.processedWithError) && (
<div>Processed with error: {formatNumber(c.processedWithError)}</div>
<div>{`Processed with error: ${formatNumber(c.processedWithError)}`}</div>
)}
{Boolean(c.thrownAway) && <div>Thrown away: {formatNumber(c.thrownAway)}</div>}
{Boolean(c.unparseable) && <div>Unparseable: {formatNumber(c.unparseable)}</div>}
{Boolean(c.thrownAway) && <div>{`Thrown away: ${formatNumber(c.thrownAway)}`}</div>}
{Boolean(c.unparseable) && <div>{`Unparseable: ${formatNumber(c.unparseable)}`}</div>}
</div>
) : (
<div>No activity</div>
);
}

Expand Down
34 changes: 25 additions & 9 deletions web-console/src/views/supervisors-view/supervisors-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -875,40 +875,56 @@ export class SupervisorsView extends React.PureComponent<

const c = getTotalSupervisorStats(value, statsKey, activeTaskIds);
const seconds = getRowStatsKeySeconds(statsKey);
const issues =
(c.processedWithError || 0) + (c.thrownAway || 0) + (c.unparseable || 0);
const totalLabel = `Total (past ${statsKey}): `;
const bytes = c.processedBytes ? ` (${formatByteRate(c.processedBytes)})` : '';
return (
return issues ? (
<div>
<div
data-tooltip={`${totalLabel}${formatInteger(
c.processed * seconds,
)} (${formatBytes(c.processedBytes * seconds)})`}
>{`Processed: ${formatRate(c.processed)}${bytes}`}</div>
data-tooltip={`${totalLabel}${formatBytes(c.processedBytes * seconds)}`}
>{`Input: ${formatByteRate(c.processedBytes)}`}</div>
{Boolean(c.processed) && (
<div
data-tooltip={`${totalLabel}${formatInteger(c.processed * seconds)} events`}
>{`Processed: ${formatRate(c.processed)}`}</div>
)}
{Boolean(c.processedWithError) && (
<div
className="warning-line"
data-tooltip={`${totalLabel}${formatInteger(c.processedWithError * seconds)}`}
data-tooltip={`${totalLabel}${formatInteger(
c.processedWithError * seconds,
)} events`}
>
Processed with error: {formatRate(c.processedWithError)}
</div>
)}
{Boolean(c.thrownAway) && (
<div
className="warning-line"
data-tooltip={`${totalLabel}${formatInteger(c.thrownAway * seconds)}`}
data-tooltip={`${totalLabel}${formatInteger(c.thrownAway * seconds)} events`}
>
Thrown away: {formatRate(c.thrownAway)}
</div>
)}
{Boolean(c.unparseable) && (
<div
className="warning-line"
data-tooltip={`${totalLabel}${formatInteger(c.unparseable * seconds)}`}
data-tooltip={`${totalLabel}${formatInteger(c.unparseable * seconds)} events`}
>
Unparseable: {formatRate(c.unparseable)}
</div>
)}
</div>
) : c.processedBytes ? (
<div
data-tooltip={`${totalLabel}${formatInteger(
c.processed * seconds,
)} events, ${formatBytes(c.processedBytes * seconds)}`}
>{`Processed: ${formatRate(c.processed)} (${formatByteRate(
c.processedBytes,
)})`}</div>
) : (
<div>No activity</div>
);
},
show: visibleColumns.shown('Stats'),
Expand Down