mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 23:29:01 +08:00
chore: address some gaps in infra (#6871)
This commit is contained in:
parent
403043e076
commit
0baf0e9453
@ -164,7 +164,8 @@ function K8sClustersList({
|
||||
} = useGetAggregateKeys(
|
||||
{
|
||||
dataSource: currentQuery.builder.queryData[0].dataSource,
|
||||
aggregateAttribute: K8sEntityToAggregateAttributeMapping[K8sCategory.NODES],
|
||||
aggregateAttribute:
|
||||
K8sEntityToAggregateAttributeMapping[K8sCategory.CLUSTERS],
|
||||
aggregateOperator: 'noop',
|
||||
searchText: '',
|
||||
tagType: '',
|
||||
|
@ -165,7 +165,8 @@ function K8sDeploymentsList({
|
||||
} = useGetAggregateKeys(
|
||||
{
|
||||
dataSource: currentQuery.builder.queryData[0].dataSource,
|
||||
aggregateAttribute: K8sEntityToAggregateAttributeMapping[K8sCategory.NODES],
|
||||
aggregateAttribute:
|
||||
K8sEntityToAggregateAttributeMapping[K8sCategory.DEPLOYMENTS],
|
||||
aggregateOperator: 'noop',
|
||||
searchText: '',
|
||||
tagType: '',
|
||||
|
@ -164,7 +164,8 @@ function K8sNamespacesList({
|
||||
} = useGetAggregateKeys(
|
||||
{
|
||||
dataSource: currentQuery.builder.queryData[0].dataSource,
|
||||
aggregateAttribute: K8sEntityToAggregateAttributeMapping[K8sCategory.NODES],
|
||||
aggregateAttribute:
|
||||
K8sEntityToAggregateAttributeMapping[K8sCategory.NAMESPACES],
|
||||
aggregateOperator: 'noop',
|
||||
searchText: '',
|
||||
tagType: '',
|
||||
|
@ -19,7 +19,8 @@ var (
|
||||
|
||||
clusterAttrsToEnrich = []string{"k8s_cluster_name"}
|
||||
|
||||
k8sClusterUIDAttrKey = "k8s_cluster_uid"
|
||||
// TODO(srikanthccv): change this to k8s_cluster_uid after showing the missing data banner
|
||||
k8sClusterUIDAttrKey = "k8s_cluster_name"
|
||||
|
||||
queryNamesForClusters = map[string][]string{
|
||||
"cpu": {"A"},
|
||||
@ -319,7 +320,7 @@ func (p *ClustersRepo) GetClusterList(ctx context.Context, req model.ClusterList
|
||||
}
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := clusterAttrs[record.ClusterUID]; ok {
|
||||
if _, ok := clusterAttrs[record.ClusterUID]; ok && record.ClusterUID != "" {
|
||||
record.Meta = clusterAttrs[record.ClusterUID]
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ func (d *DaemonSetsRepo) GetDaemonSetList(ctx context.Context, req model.DaemonS
|
||||
}
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := daemonSetAttrs[record.DaemonSetName]; ok {
|
||||
if _, ok := daemonSetAttrs[record.DaemonSetName]; ok && record.DaemonSetName != "" {
|
||||
record.Meta = daemonSetAttrs[record.DaemonSetName]
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ func (d *DeploymentsRepo) GetDeploymentList(ctx context.Context, req model.Deplo
|
||||
}
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := deploymentAttrs[record.DeploymentName]; ok {
|
||||
if _, ok := deploymentAttrs[record.DeploymentName]; ok && record.DeploymentName != "" {
|
||||
record.Meta = deploymentAttrs[record.DeploymentName]
|
||||
}
|
||||
|
||||
|
@ -475,7 +475,7 @@ func (d *JobsRepo) GetJobList(ctx context.Context, req model.JobListRequest) (mo
|
||||
}
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := jobAttrs[record.JobName]; ok {
|
||||
if _, ok := jobAttrs[record.JobName]; ok && record.JobName != "" {
|
||||
record.Meta = jobAttrs[record.JobName]
|
||||
}
|
||||
|
||||
|
@ -322,7 +322,7 @@ func (p *NamespacesRepo) GetNamespaceList(ctx context.Context, req model.Namespa
|
||||
}
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := namespaceAttrs[record.NamespaceName]; ok {
|
||||
if _, ok := namespaceAttrs[record.NamespaceName]; ok && record.NamespaceName != "" {
|
||||
record.Meta = namespaceAttrs[record.NamespaceName]
|
||||
}
|
||||
|
||||
|
@ -335,7 +335,7 @@ func (p *NodesRepo) GetNodeList(ctx context.Context, req model.NodeListRequest)
|
||||
}
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := nodeAttrs[record.NodeUID]; ok {
|
||||
if _, ok := nodeAttrs[record.NodeUID]; ok && record.NodeUID != "" {
|
||||
record.Meta = nodeAttrs[record.NodeUID]
|
||||
}
|
||||
|
||||
|
@ -385,7 +385,7 @@ func (p *PodsRepo) GetPodList(ctx context.Context, req model.PodListRequest) (mo
|
||||
}
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := podAttrs[record.PodUID]; ok {
|
||||
if _, ok := podAttrs[record.PodUID]; ok && record.PodUID != "" {
|
||||
record.Meta = podAttrs[record.PodUID]
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ func (p *PvcsRepo) GetPvcList(ctx context.Context, req model.VolumeListRequest)
|
||||
record.VolumeUsage = record.VolumeCapacity - record.VolumeAvailable
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := volumeAttrs[record.PersistentVolumeClaimName]; ok {
|
||||
if _, ok := volumeAttrs[record.PersistentVolumeClaimName]; ok && record.PersistentVolumeClaimName != "" {
|
||||
record.Meta = volumeAttrs[record.PersistentVolumeClaimName]
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ func (d *StatefulSetsRepo) GetStatefulSetList(ctx context.Context, req model.Sta
|
||||
}
|
||||
|
||||
record.Meta = map[string]string{}
|
||||
if _, ok := statefulSetAttrs[record.StatefulSetName]; ok {
|
||||
if _, ok := statefulSetAttrs[record.StatefulSetName]; ok && record.StatefulSetName != "" {
|
||||
record.Meta = statefulSetAttrs[record.StatefulSetName]
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user