Manage version configurations client versions (#7220)

* Add config values for client versions. Return client versions in ping response.

* Manage client version through System Console.

* Added client versions to diagnostics

* Added translations messages en.json file.

* Hide Client Versions on System Console.
Этот коммит содержится в:
Chris Duarte
2017-08-28 09:22:54 -07:00
коммит произвёл Harrison Healey
родитель 9e95af7809
Коммит 510b1a18f5
9 изменённых файлов: 255 добавлений и 1 удалений

Просмотреть файл

@@ -45,7 +45,18 @@ func getSystemPing(c *Context, w http.ResponseWriter, r *http.Request) {
actualGoroutines := runtime.NumGoroutine()
if *utils.Cfg.ServiceSettings.GoroutineHealthThreshold <= 0 || actualGoroutines <= *utils.Cfg.ServiceSettings.GoroutineHealthThreshold {
ReturnStatusOK(w)
m := make(map[string]string)
m[model.STATUS] = model.STATUS_OK
reqs := utils.Cfg.ClientRequirements
m["AndroidLatestVersion"] = reqs.AndroidLatestVersion
m["AndroidMinVersion"] = reqs.AndroidMinVersion
m["DesktopLatestVersion"] = reqs.DesktopLatestVersion
m["DesktopMinVersion"] = reqs.DesktopMinVersion
m["IosLatestVersion"] = reqs.IosLatestVersion
m["IosMinVersion"] = reqs.IosMinVersion
w.Write([]byte(model.MapToJson(m)))
} else {
rdata := map[string]string{}
rdata["status"] = "unhealthy"