MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / vmStatus

Function vmStatus

vmm/ui/src/composables/useVmManager.ts:669–687  ·  view source on GitHub ↗
(vm: VmListItem)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

imageFeaturesFunction · 0.85

Tested by

no test coverage detected