예제 #1
0
        public ActionResult ServerNameBinding([DataSourceRequest] DataSourceRequest request, ServiceName service)
        {
            var client = PortalClients.HeartBeatServerClient;

            var serverInfo = new List<ServerName>();

            var serverResponse = client.GetServers(new GetServersRequest()
            {
                ServiceName = service.Name
            });

            foreach (var item in serverResponse.ServerInfoList)
            {
                serverInfo.Add(new ServerName {Name = item.ServerName, LastHb = item.LastHb});
            }

            return Json(serverInfo.ToDataSourceResult(request));
        }
예제 #2
0
        public ActionResult MethodNameBinding([DataSourceRequest] DataSourceRequest request, ServiceName service)
        {
            var client = PortalClients.HeartBeatServerClient;

            var names = new List<MethodName>();

            var methodResponse = client.GetAllMethods(new GetAllMethodsRequest()
            {
                ServerName = service.ServerName,
                ServiceName = service.Name

            });

            foreach (var item in methodResponse.MethodNameList)
            {
                names.Add(new MethodName {Name = item});
            }

            return Json(names.ToDataSourceResult(request));
        }