dmvk commented on code in PR #22639:
URL: https://github.com/apache/flink/pull/22639#discussion_r1209829262


##########
flink-runtime-web/web-dashboard/src/app/pages/task-manager/metrics/task-manager-metrics.component.html:
##########
@@ -294,3 +294,75 @@
     </div>
   </div>
 </nz-card>
+
+<ng-template #tmResourceRow let-detail="detail" let-name="name" 
let-property="prop">
+  <tr>
+    <td>{{ name }}</td>
+    <td>
+      <nz-progress
+        nzSize="small"
+        nzStrokeLinecap="square"
+        [nzPercent]="
+          +(
+            (detail?.freeResource[property] / detail?.totalResource[property]) 
* 100
+            | number: '1.0-2'
+          )
+        "
+        nzStatus="normal"
+      ></nz-progress>
+      {{ detail?.freeResource[property] | number }} / {{ 
detail?.totalResource[property] | number }}

Review Comment:
   consider adding units (especially for memory-related rows)
   ```suggestion
         {{ detail?.freeResource[property] | number }} / {{ 
detail?.totalResource[property] | number }} {{ unit }}
   ```



##########
flink-runtime-web/web-dashboard/src/app/pages/task-manager/metrics/task-manager-metrics.component.html:
##########
@@ -294,3 +294,75 @@
     </div>
   </div>
 </nz-card>
+
+<ng-template #tmResourceRow let-detail="detail" let-name="name" 
let-property="prop">
+  <tr>
+    <td>{{ name }}</td>

Review Comment:
   ```suggestion
       <td><strong>{{ name }}</strong></td>
   ```



##########
flink-runtime-web/web-dashboard/src/app/pages/task-manager/metrics/task-manager-metrics.component.html:
##########
@@ -294,3 +294,75 @@
     </div>
   </div>
 </nz-card>
+
+<ng-template #tmResourceRow let-detail="detail" let-name="name" 
let-property="prop">
+  <tr>
+    <td>{{ name }}</td>
+    <td>
+      <nz-progress
+        nzSize="small"
+        nzStrokeLinecap="square"
+        [nzPercent]="
+          +(
+            (detail?.freeResource[property] / detail?.totalResource[property]) 
* 100
+            | number: '1.0-2'
+          )
+        "
+        nzStatus="normal"
+      ></nz-progress>
+      {{ detail?.freeResource[property] | number }} / {{ 
detail?.totalResource[property] | number }}
+    </td>
+  </tr>
+</ng-template>
+
+<nz-card nzTitle="Resources" nzSize="small">
+  <nz-table
+    nzBordered
+    nzTitle="Unassigned resources"
+    [nzTemplateMode]="true"
+    [nzFrontPagination]="false"
+    [nzShowPagination]="false"
+    [nzSize]="'small'"
+    class="no-border"
+    [nzWidthConfig]="['200px', null]"
+  >
+    <tbody>

Review Comment:
   this would make it more consistent with the rest, but I'm not sure if it 
makes too much sense 🤔 
   ```suggestion
       <thead>
         <tr>
           <th>Type</th>
           <th>Count</th>
         </tr>
       </thead>
       <tbody>
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to