func buildTrackResponse()

in pkg/plan/track_response_builder.go [54:105]


func buildTrackResponse(res *models.DeploymentResources, getCurrentPlan bool) []TrackResponse {
	var pending = make([]TrackResponse, 0)
	for _, info := range res.Elasticsearch {
		p, err := parseResourceInfo(info, util.Elasticsearch, getCurrentPlan)
		if err != nil {
			continue
		}
		pending = append(pending, p)
	}

	for _, info := range res.Kibana {
		p, err := parseResourceInfo(info, util.Kibana, getCurrentPlan)
		if err != nil {
			continue
		}
		pending = append(pending, p)
	}

	for _, info := range res.Apm {
		p, err := parseResourceInfo(info, util.Apm, getCurrentPlan)
		if err != nil {
			continue
		}
		pending = append(pending, p)
	}

	for _, info := range res.IntegrationsServer {
		p, err := parseResourceInfo(info, util.IntegrationsServer, getCurrentPlan)
		if err != nil {
			continue
		}
		pending = append(pending, p)
	}

	for _, info := range res.Appsearch {
		p, err := parseResourceInfo(info, util.Appsearch, getCurrentPlan)
		if err != nil {
			continue
		}
		pending = append(pending, p)
	}

	for _, info := range res.EnterpriseSearch {
		p, err := parseResourceInfo(info, util.EnterpriseSearch, getCurrentPlan)
		if err != nil {
			continue
		}
		pending = append(pending, p)
	}

	return pending
}