mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-11-06 22:59:44 +00:00
Special treatment for arm equipment
This commit is contained in:
parent
eb483a4c5d
commit
076b7198b2
@ -24,7 +24,6 @@ import (
|
|||||||
model2 "github.com/IceWhaleTech/CasaOS/service/model"
|
model2 "github.com/IceWhaleTech/CasaOS/service/model"
|
||||||
"github.com/IceWhaleTech/CasaOS/types"
|
"github.com/IceWhaleTech/CasaOS/types"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"golang.org/x/tools/go/analysis/passes/ifaceassert"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// @Summary check version
|
// @Summary check version
|
||||||
@ -179,19 +178,20 @@ func GetSystemHardwareInfo(c *gin.Context) {
|
|||||||
data := make(map[string]string, 1)
|
data := make(map[string]string, 1)
|
||||||
data["drive_model"] = service.MyService.System().GetDeviceTree()
|
data["drive_model"] = service.MyService.System().GetDeviceTree()
|
||||||
if runtime.GOARCH == "arm" {
|
if runtime.GOARCH == "arm" {
|
||||||
data["arch"]= "arm-7"
|
data["arch"] = "arm-7"
|
||||||
}else{
|
} else {
|
||||||
data["arch"]= runtime.GOARCH
|
data["arch"] = runtime.GOARCH
|
||||||
}
|
}
|
||||||
|
|
||||||
if cpu := service.MyService.System().GetCpuInfo(); len(cpu) > 0 {
|
if cpu := service.MyService.System().GetCpuInfo(); len(cpu) > 0 {
|
||||||
|
|
||||||
c.JSON(common_err.SUCCESS,
|
c.JSON(common_err.SUCCESS,
|
||||||
model.Result{
|
model.Result{
|
||||||
Success: common_err.SUCCESS,
|
Success: common_err.SUCCESS,
|
||||||
Message: common_err.GetMsg(common_err.SUCCESS),
|
Message: common_err.GetMsg(common_err.SUCCESS),
|
||||||
Data: data,
|
Data: data,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary system utilization
|
// @Summary system utilization
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user