// ConvertESToHPAResp .... convert elasticsearch to new HPA logs response
ConvertESToHPAResp .... convert elasticsearch to new HPA logs response
// ConvertESToHPAResp .... convert elasticsearch to new HPA logs response
func ConvertESToHPAResp(jobID string, logs []models.HPALog, statusCode int32, reason string) models.HPALogResponse {
	resp := models.HPALogResponse{
		JobID: jobID, StatusCode: statusCode}
	if reason != "" {
		resp.Reason = reason
	}
	hlogs := make([]models.HPALog, 0)
	for _, log := range logs {
		hlogs = append(hlogs, models.HPALog{Timestamp: log.Timestamp, Log: log.Log})
	}
	resp.HPALog = hlogs
	return resp
}
func ConvertESToHPAResp ( jobID string , logs [ ] models . HPALog , statusCode int32 , reason string ) models . HPALogResponse { resp := models . HPALogResponse { JobID : jobID , StatusCode : statusCode } if reason != " " { resp . Reason = reason } hlogs := make ( [ ] models . HPALog , 0 ) for _ , log := range logs { hlogs = append ( hlogs , models . HPALog { Timestamp : log . Timestamp , Log : log . Log } ) } resp . HPALog = hlogs return resp }
ConvertESToHPAResp .... convert elasticsearch to new HPA logs response
ConvertESToHPAResp .... convert elasticsearch to new HPA logs response