Ejemplo n.º 1
0
        public async Task <ActionResult <IList <TunnelInformationDto> > > ListTunnels()
        {
            var containers = await _dockerManager.GetAllContainers();

            var tunnels = containers
                          .Select(TunnelInformationMapper.MapContainerResponse)
                          .ToList();

            return(Ok(tunnels));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> GetTunnelInfo(string id)
        {
            var all = await _dockerManager.GetAllContainers();

            var c = all.FirstOrDefault(e => e.ID == id);

            if (c == null)
            {
                return(BadRequest("Container not found"));
            }

            return(Ok(TunnelInformationMapper.MapContainerResponse(c)));
        }