stu01509 commented on code in PR #148:
URL: https://github.com/apache/yunikorn-web/pull/148#discussion_r1406161488


##########
src/app/components/nodes-view/nodes-view.component.ts:
##########
@@ -188,6 +188,20 @@ export class NodesViewComponent implements OnInit {
     return this.allocDataSource.data && this.allocDataSource.data.length === 0;
   }
 
+  formatColumn(){
+    if(this.nodeDataSource.data.length==0){
+      return
+    }
+    this.nodeColumnIds.forEach((colId)=>{
+      let emptyCell=this.nodeDataSource.data.filter((node)=>{
+        return (node as any)[colId]=="" || (node as any)[colId]=="n/a"
+      })
+      if (emptyCell.length==this.nodeDataSource.data.length){
+        this.nodeColumnIds = this.nodeColumnIds.filter(el => el!==colId)
+      }
+    })

Review Comment:
   Because I saw that `node ` is defined in `NodeInfo`, so it is necessary to 
add the definition in `node-info.model.ts`, that we can prevent to use the 
`any`.
   
   
![image](https://github.com/apache/yunikorn-web/assets/22230889/668fb7e2-5508-4928-a88f-0f58ca8d4eca)
   



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