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

Function clonePortMappings

vmm/ui/src/composables/useVmManager.ts:341–347  ·  view source on GitHub ↗
(ports: VmmTypes.IPortMapping[] = [])

Source from the content-addressed store, hash-verified

339 }
340
341 const clonePortMappings = (ports: VmmTypes.IPortMapping[] = []): PortFormEntry[] =>
342 ports.map((port) => ({
343 protocol: port.protocol || 'tcp',
344 host_address: port.host_address || '127.0.0.1',
345 host_port: typeof port.host_port === 'number' ? port.host_port : null,
346 vm_port: typeof port.vm_port === 'number' ? port.vm_port : null,
347 }));
348
349 const normalizePorts = (ports: PortFormEntry[] = []): VmmTypes.IPortMapping[] =>
350 ports

Callers 1

showUpdateDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected