Skip to content

Commit d3956a4

Browse files
committed
Fix for VMware vSphere selection in Backup Job
Fix for VMware vSphere selection in Backup Job
1 parent 31c2b06 commit d3956a4

File tree

3 files changed

+48
-10
lines changed

3 files changed

+48
-10
lines changed

app/(app)/vbr/jobs/create/_components/virtual-machine-selector.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,19 @@ export function VirtualMachineSelector({ platform, selectedVMs, onSelectionChang
4040

4141
const items = await veeamApi.getInventory({ nameFilter: query })
4242

43+
// Build platform aliases so 'vmware' matches items with platform='vSphere', etc.
44+
const platformAliases: Record<string, string[]> = {
45+
vmware: ['vsphere', 'vmware', 'vcenter'],
46+
hyperv: ['hyperv', 'hyper-v', 'scvmm'],
47+
}
48+
const normalizedPlatform = platform?.toLowerCase()
49+
const allowedPlatforms = normalizedPlatform
50+
? (platformAliases[normalizedPlatform] ?? [normalizedPlatform])
51+
: null
52+
4353
setInventory(items.filter(i =>
4454
['VirtualMachine', 'VirtualApp', 'ResourcePool', 'HostSystem', 'ClusterComputeResource', 'Datacenter', 'Folder'].includes(i.type) &&
45-
(!platform || !i.platform || i.platform.toLowerCase() === platform.toLowerCase())
55+
(!allowedPlatforms || !i.platform || allowedPlatforms.some(p => i.platform.toLowerCase().includes(p)))
4656
))
4757

4858
} catch (err) {

package-lock.json

Lines changed: 33 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "open-backup-ui",
3-
"version": "0.2.1",
3+
"version": "0.3.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev --turbopack",
77
"build": "next build --turbopack",
8-
"start": "next start",
8+
"start": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 next start",
99
"lint": "eslint"
1010
},
1111
"dependencies": {
@@ -53,10 +53,11 @@
5353
"@types/react": "^19",
5454
"@types/react-dom": "^19",
5555
"@types/react-simple-maps": "^3.0.6",
56+
"cross-env": "^10.1.0",
5657
"eslint": "^9",
5758
"eslint-config-next": "15.5.7",
5859
"tailwindcss": "^4",
5960
"tw-animate-css": "^1.4.0",
6061
"typescript": "^5"
6162
}
62-
}
63+
}

0 commit comments

Comments
 (0)