feat: 配置sn和许可时间
This commit is contained in:
@@ -786,7 +786,9 @@ func GetStateFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
response.Data = data
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
} else if neType == "omc" {
|
||||
}
|
||||
|
||||
if neType == "omc" {
|
||||
emsState := GetEMSState("127.0.0.1")
|
||||
services.ResponseWithJson(w, http.StatusOK, emsState)
|
||||
return
|
||||
@@ -1029,10 +1031,6 @@ func GetEMSState(ip string) *SysState {
|
||||
}
|
||||
}
|
||||
|
||||
version := "16.1.1"
|
||||
if global.Version != "" {
|
||||
version = global.Version
|
||||
}
|
||||
hostName, _ := os.Hostname()
|
||||
dbInfo, _ := dborm.XormGetMySQLVersion()
|
||||
emsState := &SysState{
|
||||
@@ -1041,10 +1039,10 @@ func GetEMSState(ip string) *SysState {
|
||||
DbInfo: dbInfo,
|
||||
IpAddr: ipAddrs,
|
||||
Port: config.GetYamlConfig().Rest[0].Port,
|
||||
Version: version,
|
||||
Capability: 9999999,
|
||||
Version: global.Version,
|
||||
Capability: config.GetYamlConfig().OMC.Capability,
|
||||
SerialNum: config.GetYamlConfig().OMC.Sn,
|
||||
ExpiryDate: "-",
|
||||
ExpiryDate: config.GetYamlConfig().OMC.ExpiryDate,
|
||||
HardwareInfo: HardwareInfo{CPUs: getCpuNumber(), Memory: getTotalMemory()},
|
||||
CpuUsage: *cpuUsage,
|
||||
MemUsage: *memUsage,
|
||||
|
||||
Reference in New Issue
Block a user