fix bug in CPU type selector

This commit is contained in:
2025-09-13 21:42:18 +00:00
parent 87c42495ad
commit 7732da0642
2 changed files with 12 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ import (
type InstanceConfig struct { type InstanceConfig struct {
Type fabric.InstanceType `json:"type"` Type fabric.InstanceType `json:"type"`
Name string `json:"name"` Name string `json:"name"`
Proctype string `json:"cpu"` CPU string `json:"cpu"`
Cores uint64 `json:"cores"` Cores uint64 `json:"cores"`
Memory uint64 `json:"memory"` Memory uint64 `json:"memory"`
Swap uint64 `json:"swap"` Swap uint64 `json:"swap"`
@@ -67,7 +67,7 @@ func HandleGETConfig(c *gin.Context) {
} }
} }
for i, cpu := range config.ProctypeSelect.Options { for i, cpu := range config.ProctypeSelect.Options {
if cpu.Value == config.Proctype { if cpu.Value == config.CPU {
config.ProctypeSelect.Options[i].Selected = true config.ProctypeSelect.Options[i].Selected = true
} }
} }