Skip to content

Commit

Permalink
fix: frontend comment failing lines
Browse files Browse the repository at this point in the history
  • Loading branch information
blumamir committed Feb 5, 2025
1 parent 77f91e3 commit e784ae9
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions frontend/services/describe/source_describe/source_describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ func ConvertSourceAnalyzeToGQL(analyze *source.SourceAnalyze) *model.SourceAnaly
InstrumentedText: describe_utils.ConvertEntityPropertyToGQL(&analyze.SourceObjectsAnalysis.InstrumentedText),
},
RuntimeInfo: convertRuntimeInfoToGQL(analyze.RuntimeInfo),
InstrumentationConfig: &model.InstrumentationConfigAnalyze{
Created: describe_utils.ConvertEntityPropertyToGQL(&analyze.InstrumentationConfig.Created),
CreateTime: describe_utils.ConvertEntityPropertyToGQL(analyze.InstrumentationConfig.CreateTime),
Containers: convertRuntimeInfoContainersToGQL(analyze.InstrumentationConfig.Containers),
},
InstrumentationDevice: &model.InstrumentationDeviceAnalyze{
StatusText: describe_utils.ConvertEntityPropertyToGQL(&analyze.InstrumentationDevice.StatusText),
Containers: convertWorkloadManifestContainersToGQL(analyze.InstrumentationDevice.Containers),
},
// InstrumentationConfig: &model.InstrumentationConfigAnalyze{
// Created: describe_utils.ConvertEntityPropertyToGQL(&analyze.InstrumentationConfig.Created),
// CreateTime: describe_utils.ConvertEntityPropertyToGQL(analyze.InstrumentationConfig.CreateTime),
// Containers: convertRuntimeInfoContainersToGQL(analyze.InstrumentationConfig.Containers),
// },
// InstrumentationDevice: &model.InstrumentationDeviceAnalyze{
// StatusText: describe_utils.ConvertEntityPropertyToGQL(&analyze.InstrumentationDevice.StatusText),
// Containers: convertWorkloadManifestContainersToGQL(analyze.InstrumentationDevice.Containers),
// },
TotalPods: analyze.TotalPods,
PodsPhasesCount: analyze.PodsPhasesCount,
Pods: convertPodsToGQL(analyze.Pods),
Expand Down Expand Up @@ -96,17 +96,17 @@ func convertEntityPropertiesToGQL(props []properties.EntityProperty) []*model.En
return gqlProps
}

func convertWorkloadManifestContainersToGQL(containers []source.ContainerWorkloadManifestAnalyze) []*model.ContainerWorkloadManifestAnalyze {
gqlContainers := make([]*model.ContainerWorkloadManifestAnalyze, 0, len(containers))
for _, container := range containers {
gqlContainers = append(gqlContainers, &model.ContainerWorkloadManifestAnalyze{
ContainerName: describe_utils.ConvertEntityPropertyToGQL(&container.ContainerName),
Devices: describe_utils.ConvertEntityPropertyToGQL(&container.Devices),
OriginalEnv: convertEntityPropertiesToGQL(container.OriginalEnv),
})
}
return gqlContainers
}
// func convertWorkloadManifestContainersToGQL(containers []source.ContainerWorkloadManifestAnalyze) []*model.ContainerWorkloadManifestAnalyze {
// gqlContainers := make([]*model.ContainerWorkloadManifestAnalyze, 0, len(containers))
// for _, container := range containers {
// gqlContainers = append(gqlContainers, &model.ContainerWorkloadManifestAnalyze{
// ContainerName: describe_utils.ConvertEntityPropertyToGQL(&container.ContainerName),
// Devices: describe_utils.ConvertEntityPropertyToGQL(&container.Devices),
// OriginalEnv: convertEntityPropertiesToGQL(container.OriginalEnv),
// })
// }
// return gqlContainers
// }

func convertPodsToGQL(pods []source.PodAnalyze) []*model.PodAnalyze {
gqlPods := make([]*model.PodAnalyze, 0, len(pods))
Expand Down

0 comments on commit e784ae9

Please sign in to comment.