mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +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
9
app/react/kubernetes/utils.ts
Normal file
9
app/react/kubernetes/utils.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
export function parseCpu(cpu: string) {
|
||||
let res = parseInt(cpu, 10);
|
||||
if (cpu.endsWith('m')) {
|
||||
res /= 1000;
|
||||
} else if (cpu.endsWith('n')) {
|
||||
res /= 1000000000;
|
||||
}
|
||||
return res;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue