| | |
| | | if !ok { |
| | | return |
| | | } |
| | | if params.CurrentDeviceID != "" { |
| | | if params.CurrentDeviceID == "" { |
| | | ctx.Fail(ecode.ParamsErr) |
| | | return |
| | | } |
| | |
| | | return |
| | | } |
| | | resp := response.DeviceListResponse{ |
| | | SystemDeviceID: conf.Conf.System.DeviceId, |
| | | CurrentDeviceID: conf.Conf.CurrentDeviceID, |
| | | DeviceIDList: list, |
| | | SystemDeviceID: conf.Conf.System.DeviceId, |
| | | CurrentDeviceID: conf.Conf.CurrentDeviceID, |
| | | DeviceIDList: list, |
| | | SystemDeviceStatus: response.SystemDeviceStatusNormal, |
| | | ClusterStatus: conf.Conf.SerfClusterStatus, |
| | | ClusterNodeQuantity: conf.Conf.ClusterNodeQuantity, |
| | | SystemDeviceRunSince: conf.Conf.SystemDeviceRunSince, |
| | | } |
| | | ctx.OkWithDetailed(resp) |
| | | } |