@@ -588,7 +588,7 @@ func (p *ComponentPodsTable) parseResPercent(usedPercent float64, totQty *resour
588
588
}
589
589
tip = fmt .Sprintf ("%s/%s" , cmpcputil .ResourceToString (p .sdk , usedRes , format ),
590
590
cmpcputil .ResourceToString (p .sdk , float64 (totQty .MilliValue ()), format ))
591
- value = fmt .Sprintf ("%.2f " , usedPercent )
591
+ value = fmt .Sprintf ("%.1f " , usedPercent )
592
592
} else {
593
593
totRes = totQty .Value ()
594
594
usedRes = float64 (totRes ) * usedPercent / 100
@@ -601,7 +601,7 @@ func (p *ComponentPodsTable) parseResPercent(usedPercent float64, totQty *resour
601
601
}
602
602
tip = fmt .Sprintf ("%s/%s" , cmpcputil .ResourceToString (p .sdk , usedRes , format ),
603
603
cmpcputil .ResourceToString (p .sdk , float64 (totQty .Value ()), format ))
604
- value = fmt .Sprintf ("%.2f " , usedPercent )
604
+ value = fmt .Sprintf ("%.1f " , usedPercent )
605
605
}
606
606
return status , value , tip
607
607
}
@@ -613,6 +613,7 @@ func (p *ComponentPodsTable) SetComponentValue(ctx context.Context) {
613
613
p .Props .PageSizeOptions = []string {
614
614
"10" , "20" , "50" , "100" ,
615
615
}
616
+
616
617
p .Props .Columns = []Column {
617
618
{
618
619
DataIndex : "name" ,
@@ -633,18 +634,17 @@ func (p *ComponentPodsTable) SetComponentValue(ctx context.Context) {
633
634
DataIndex : "ready" ,
634
635
Title : cputil .I18n (ctx , "ready" ),
635
636
Sorter : true ,
636
- Align : "right" ,
637
637
},
638
638
{
639
639
DataIndex : "node" ,
640
640
Title : cputil .I18n (ctx , "node" ),
641
641
Sorter : true ,
642
+ Hidden : true ,
642
643
},
643
644
{
644
645
DataIndex : "age" ,
645
646
Title : cputil .I18n (ctx , "age" ),
646
647
Sorter : true ,
647
- Align : "right" ,
648
648
},
649
649
}
650
650
@@ -654,19 +654,16 @@ func (p *ComponentPodsTable) SetComponentValue(ctx context.Context) {
654
654
DataIndex : "cpuRequests" ,
655
655
Title : cputil .I18n (ctx , "cpuRequests" ),
656
656
Sorter : true ,
657
- Align : "right" ,
658
657
},
659
658
{
660
659
DataIndex : "cpuLimits" ,
661
660
Title : cputil .I18n (ctx , "cpuLimits" ),
662
661
Sorter : true ,
663
- Align : "right" ,
664
662
},
665
663
{
666
664
DataIndex : "cpuPercent" ,
667
665
Title : cputil .I18n (ctx , "cpuPercent" ),
668
666
Sorter : true ,
669
- Align : "right" ,
670
667
},
671
668
}... )
672
669
} else {
@@ -675,27 +672,23 @@ func (p *ComponentPodsTable) SetComponentValue(ctx context.Context) {
675
672
DataIndex : "memoryRequests" ,
676
673
Title : cputil .I18n (ctx , "memoryRequests" ),
677
674
Sorter : true ,
678
- Align : "right" ,
679
675
},
680
676
{
681
677
DataIndex : "memoryLimits" ,
682
678
Title : cputil .I18n (ctx , "memoryLimits" ),
683
679
Sorter : true ,
684
- Align : "right" ,
685
680
},
686
681
{
687
682
DataIndex : "memoryPercent" ,
688
683
Title : cputil .I18n (ctx , "memoryPercent" ),
689
684
Sorter : true ,
690
- Align : "right" ,
691
685
},
692
686
}... )
693
687
}
694
688
p .Props .Columns = append (p .Props .Columns , Column {
695
689
DataIndex : "gotoWorkload" ,
696
690
Title : cputil .I18n (ctx , "operate" ),
697
691
Sorter : false ,
698
- Fixed : "right" ,
699
692
})
700
693
p .Operations = map [string ]interface {}{
701
694
"changeSort" : Operation {
0 commit comments