public ActionResult UpdateClient(ClientUpdateApiModel client)
        {
            try
            {
                ClientSessions.Update(client.ServerId, client.ServerName);

                ViewUpdater.Update();

                return(Ok());
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex.ToString()));

                throw;
            }
        }
        public ActionResult RemoveClient([FromBody] string serverId)
        {
            try
            {
                ClientSessions.Remove(serverId);

                ViewUpdater.Update();

                return(Ok());
            }

            catch (Exception ex)
            {
                return(StatusCode(500, ex.ToString()));

                throw;
            }
        }
        public ActionResult RemoveClients([FromBody] GridModel <ClientUpdateApiModel, string> vm)
        {
            try
            {
                foreach (var item in vm.Deleted)
                {
                    ClientSessions.Remove(item.ServerId);
                }


                ViewUpdater.Update();

                return(Ok());
            }

            catch (Exception ex)
            {
                return(StatusCode(500, ex.ToString()));

                throw;
            }
        }
        public async Task <ActionResult <string> > Push(LogViewModel data)
        {
            try
            {
                var item = populteListItem(data);
                ClientSessions.Add(item);

                ViewUpdater.Update();

                using (var client = new HttpClient())
                {
                    var response = await client.PostAsJsonAsync("http://clients.ranpod.com/api/data/push", data);

                    return(StatusCode((int)response.StatusCode, $"Server response :{await response.Content.ReadAsStringAsync()}"));
                }
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex.ToString()));

                throw;
            }
        }