public ActionResult HAProxyAdminProxy(string group, string proxy, string server, HAProxyAdmin.Action act) { var haGroup = HAProxyGroup.GetGroup(group); var proxies = (haGroup != null ? haGroup.GetProxies() : HAProxyGroup.GetAllProxies()).Where(pr => pr.Name == proxy); return(Json(HAProxyAdmin.PerformProxyAction(proxies, server, act))); }
public async Task <ActionResult> HAProxyAdminProxy(string group, string proxy, string server, Action act) { // Entire server if (proxy.IsNullOrEmpty() && group.IsNullOrEmpty() && server.HasValue()) { return(Json(await HAProxyAdmin.PerformServerActionAsync(server, act))); } // Entire group if (proxy.IsNullOrEmpty() && server.IsNullOrEmpty() && group.HasValue()) { return(Json(await HAProxyAdmin.PerformGroupActionAsync(group, act))); } var haGroup = HAProxyGroup.GetGroup(group); var proxies = (haGroup != null ? haGroup.GetProxies() : HAProxyGroup.GetAllProxies()).Where(pr => pr.Name == proxy); return(Json(await HAProxyAdmin.PerformProxyActionAsync(proxies, server, act))); }
public ActionResult HAProxyAdminGroup(string group, HAProxyAdmin.Action act) { return(Json(HAProxyAdmin.PerformGroupAction(group, act))); }
public ActionResult HAProxyAdminServer(string server, HAProxyAdmin.Action act) { return(Json(HAProxyAdmin.PerformServerAction(server, act))); }