diff options
author | Chris Duarte <csduarte@users.noreply.github.com> | 2017-08-28 09:22:54 -0700 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-08-28 12:22:54 -0400 |
commit | 510b1a18f5282981a70503c0cde474e121c9e651 (patch) | |
tree | 2d72de9607f55ab21e60ba92c604fee4961be3f0 /api4 | |
parent | 9e95af7809f3f19f9b53c4a1e875672db5c4eb63 (diff) | |
download | chat-510b1a18f5282981a70503c0cde474e121c9e651.tar.gz chat-510b1a18f5282981a70503c0cde474e121c9e651.tar.bz2 chat-510b1a18f5282981a70503c0cde474e121c9e651.zip |
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.
Diffstat (limited to 'api4')
-rw-r--r-- | api4/system.go | 13 |
1 files changed, 12 insertions, 1 deletions
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" |