vthinkxie commented on a change in pull request #10988: Add commas to large 
numeric accumulators
URL: https://github.com/apache/flink/pull/10988#discussion_r384511776
 
 

 ##########
 File path: 
flink-runtime-web/web-dashboard/src/app/pages/job/overview/accumulators/job-overview-drawer-accumulators.component.html
 ##########
 @@ -37,7 +37,10 @@
         <tr *ngFor="let accumulator of listOfAccumulator; 
trackBy:trackAccumulatorBy;">
           <td>{{ accumulator.name }}</td>
           <td>{{ accumulator.type }}</td>
-          <td>{{ accumulator.value }}</td>
+          <td *ngIf="isFinite(accumulator.value); else nonNumeric">{{ 
accumulator.value | number:'1.0-0' }}</td>
+          <ng-template #nonNumeric>
+            <td>{{ accumulator.value }}</td>
 
 Review comment:
   there is no need to duplicate the `td` here, try this way
   ```html
   <td>
     <ng-container *ngIf="isFinite(accumulator.value); else nonNumeric">{{ 
accumulator.value | number:'1.0-0' }}</ng-container>
     <ng-template #nonNumeric>{{ accumulator.value }}</ng-template>
   </td>
   ```
   and a easier way is 
   ```html
   <td>
     {{ (accumulator.value | number:'1.0-0' ) || '-'}}
   </td>
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to