public async Task <IActionResult> GetServiceById(Guid organizationId, Guid projectId, Guid serviceId)
        {
            var organization = await _organizationQueryService.GetOrganizationById(organizationId);

            if (organization == null)
            {
                return(this.NotFound());
            }

            var project = await _projectQueryService.GetProjectById(organizationId, projectId);

            if (project == null)
            {
                return(this.NotFound());
            }

            var service = await _projectServiceQueryService.GetProjectServiceById(organizationId, projectId, serviceId);

            if (service == null)
            {
                return(this.NotFound());
            }

            var activities = await _projectServiceActivityQueryService.GetProjectServiceActivities(organizationId, projectId, serviceId);

            var events = await _projectServiceEventQueryService.GetProjectServiceEvents(organizationId, projectId, serviceId, BaseEventType.None);

            var builds = await _projectServiceEventQueryService.GetProjectServiceEvents(organizationId, projectId, serviceId, BaseEventType.Build);

            var releases = await _projectServiceEventQueryService.GetProjectServiceEvents(organizationId, projectId, serviceId, BaseEventType.Release);

            var environments = await _projectServiceEnvironmentQueryService.GetProjectServiceEnvironments(organizationId, projectId, serviceId);

            var pipeline = await _projectServiceQueryService.GetProjectServicePipelineById(organizationId, projectId, serviceId);

            var features = await _projectServiceQueryService.GetProjectServiceFeaturesById(organizationId, projectId, serviceId);

            var serviceProvider = await _projectServiceQueryService.GetProjectServiceExternalById(organizationId, projectId, serviceId);

            var model = new
            {
                organization    = organization,
                project         = project,
                service         = service,
                activities      = activities,
                events          = events,
                builds          = builds,
                releases        = releases,
                environments    = environments,
                pipeline        = pipeline,
                features        = features,
                serviceProvider = serviceProvider
            };

            return(this.Ok(model));
        }
예제 #2
0
        public async Task <IActionResult> GetProjectServiceFeaturesById(Guid organizationId, Guid projectId, Guid serviceId)
        {
            var projectServiceFeatures = await _projectServiceQueryService.GetProjectServiceFeaturesById(organizationId, projectId, serviceId);

            if (_domainManagerService.HasNotFounds())
            {
                return(this.NotFound(_domainManagerService.GetNotFounds()));
            }

            if (projectServiceFeatures == null)
            {
                return(this.NotFound());
            }

            return(this.Ok(projectServiceFeatures));
        }