This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new c6c9d1d3d97 fix processed row formatting (#17756)
c6c9d1d3d97 is described below

commit c6c9d1d3d974c618a737430a45794a9dd17dd022
Author: Vadim Ogievetsky <[email protected]>
AuthorDate: Wed Mar 5 13:11:20 2025 -0800

    fix processed row formatting (#17756)
---
 .../supervisor-statistics-table.tsx                | 14 +++++----
 .../views/supervisors-view/supervisors-view.tsx    | 34 ++++++++++++++++------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git 
a/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx
 
b/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx
index d0c9ee8756c..96d4f05333a 100644
--- 
a/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx
+++ 
b/web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx
@@ -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>
     );
   }
 
diff --git a/web-console/src/views/supervisors-view/supervisors-view.tsx 
b/web-console/src/views/supervisors-view/supervisors-view.tsx
index 75a0e9482f5..0b1bd9a19d2 100644
--- a/web-console/src/views/supervisors-view/supervisors-view.tsx
+++ b/web-console/src/views/supervisors-view/supervisors-view.tsx
@@ -875,19 +875,25 @@ 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>
@@ -895,7 +901,7 @@ export class SupervisorsView extends React.PureComponent<
                   {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>
@@ -903,12 +909,22 @@ export class SupervisorsView extends React.PureComponent<
                   {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'),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to