Example #1
0
        public async Task <IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "get", Route = "services/{serviceName?}")] HttpRequest req,
            string serviceName,
            ILogger log)
        {
            var includeFullDetails = req.Query.ContainsKey("expanded");

            var results = await DBClient.GetServices(includeFullDetails, serviceName);

            return(new OkObjectResult(results));
        }
Example #2
0
        public async Task <ActionResult> Index()
        {
            var serviceResults = new List <ServiceResults>();

            var services = await DBClient.GetServices();

            foreach (var service in services)
            {
                var healthCheckResults = (await DBClient.GetHealthCheckResults(service.Id)).ToList();
                var serviceResultsItem = new ServiceResults()
                {
                    HttpService        = service,
                    HealthCheckResults = healthCheckResults,
                    Status             = healthCheckResults.First().Available ? "Available" : "Unavailable"
                };
                serviceResults.Add(serviceResultsItem);
            }
            return(View(serviceResults));
        }
Example #3
0
        public async Task <ActionResult> Index()
        {
            var services = await DBClient.GetServices();

            return(View(services));
        }