(vm: VmListItem)
| 667 | const imageFeatures = (vm: VmListItem) => imageVersionFeatures(vm.image_version); |
| 668 | |
| 669 | const vmStatus = (vm: VmListItem) => { |
| 670 | const features = imageFeatures(vm); |
| 671 | if (!features.progress) { |
| 672 | return vm.status; |
| 673 | } |
| 674 | if (vm.status !== 'running') { |
| 675 | return vm.status; |
| 676 | } |
| 677 | if (vm.shutdown_progress) { |
| 678 | return 'shutting down'; |
| 679 | } |
| 680 | if (vm.boot_progress === 'running') { |
| 681 | return 'running'; |
| 682 | } |
| 683 | if (vm.boot_progress !== 'done') { |
| 684 | return 'booting'; |
| 685 | } |
| 686 | return 'running'; |
| 687 | }; |
| 688 | |
| 689 | const kmsEnabled = (vm: any) => getKeyProvider(vm) === 'kms'; |
| 690 |
nothing calls this directly
no test coverage detected