From 510b1a18f5282981a70503c0cde474e121c9e651 Mon Sep 17 00:00:00 2001 From: Chris Duarte Date: Mon, 28 Aug 2017 09:22:54 -0700 Subject: 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. --- api4/system.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'api4/system.go') diff --git a/api4/system.go b/api4/system.go index 0c0fc7d12..2ad408e13 100644 --- a/api4/system.go +++ b/api4/system.go @@ -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" -- cgit v1.2.3-1-g7c22