mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 05:15:25 +02:00
refactor(cluster): migrate nodes datatable to react [EE-4962] (#10459)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
b346fd7f39
commit
0e47f22c0a
25 changed files with 448 additions and 219 deletions
|
@ -277,7 +277,7 @@ class KubernetesNodeController {
|
|||
async getNodesAsync() {
|
||||
try {
|
||||
this.state.dataLoading = true;
|
||||
const nodeName = this.$transition$.params().name;
|
||||
const nodeName = this.$transition$.params().nodeName;
|
||||
this.nodes = await this.KubernetesNodeService.get();
|
||||
this.node = _.find(this.nodes, { Name: nodeName });
|
||||
this.state.isDrainOperation = _.find(this.nodes, { Availability: this.availabilities.DRAIN });
|
||||
|
@ -298,7 +298,7 @@ class KubernetesNodeController {
|
|||
|
||||
async getNodeUsageAsync() {
|
||||
try {
|
||||
const nodeName = this.$transition$.params().name;
|
||||
const nodeName = this.$transition$.params().nodeName;
|
||||
const node = await getMetricsForNode(this.$state.params.endpointId, nodeName);
|
||||
this.resourceUsage = new KubernetesResourceReservation();
|
||||
this.resourceUsage.CPU = KubernetesResourceReservationHelper.parseCPU(node.usage.cpu);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{
|
||||
label:ctrl.state.transition.nodeName,
|
||||
link: 'kubernetes.cluster.node',
|
||||
linkParams:{name: ctrl.state.transition.nodeName}
|
||||
linkParams:{nodeName: ctrl.state.transition.nodeName}
|
||||
},
|
||||
ctrl.state.transition.nodeName,
|
||||
]"
|
||||
|
|
|
@ -109,7 +109,7 @@ class KubernetesNodeStatsController {
|
|||
refreshRate: '30',
|
||||
viewReady: false,
|
||||
transition: {
|
||||
nodeName: this.$transition$.params().name,
|
||||
nodeName: this.$transition$.params().nodeName,
|
||||
},
|
||||
getMetrics: true,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue