checkName in Distribution and Runtime

This commit is contained in:
Matias Manavella
2020-08-18 13:57:53 -03:00
parent a686e47fa2
commit 97db83b270
6 changed files with 27 additions and 16 deletions

View File

@@ -26,8 +26,12 @@ func analyzeContainerRuntime(analyzer *troubleshootv1beta1.ContainerRuntime, get
foundRuntimes = append(foundRuntimes, node.Status.NodeInfo.ContainerRuntimeVersion)
}
title := analyzer.CheckName
if title == "" {
title = "Container Runtime"
}
result := &AnalyzeResult{
Title: "Container Runtime",
Title: title,
IconKey: "kubernetes_container_runtime",
IconURI: "https://troubleshoot.sh/images/analyzer-icons/container-runtime.svg?w=23&h=16",
}

View File

@@ -123,9 +123,12 @@ func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollecte
}
_ = CheckOpenShift(&foundProviders, apiResources, "")
}
title := analyzer.CheckName
if title == "" {
title = "Kubernetes Distribution"
}
result := &AnalyzeResult{
Title: "Kubernetes Distribution",
Title: title,
IconKey: "kubernetes_distribution",
IconURI: "https://troubleshoot.sh/images/analyzer-icons/distribution.svg?w=20&h=14",
}

View File

@@ -22,9 +22,13 @@ func analyzeImagePullSecret(analyzer *troubleshootv1beta1.ImagePullSecret, getCh
passOutcome = outcome
}
}
title := analyzer.CheckName
if title == "" {
title = "Image Pull Secrets"
}
result := AnalyzeResult{
Title: analyzer.CheckName,
Title: title,
IconKey: "kubernetes_image_pull_secret",
IconURI: "https://troubleshoot.sh/images/analyzer-icons/image-pull-secret.svg?w=16&h=14",
IsFail: true,

View File

@@ -28,13 +28,13 @@ func analyzeMysql(analyzer *troubleshootv1beta1.DatabaseAnalyze, getCollectedFil
return nil, errors.Wrap(err, "failed to unmarshal databased connection result")
}
checkName := analyzer.CheckName
if checkName == "" {
checkName = collectorName
title := analyzer.CheckName
if title == "" {
title = collectorName
}
result := &AnalyzeResult{
Title: checkName,
Title: title,
IconKey: "kubernetes_mysql_analyze",
IconURI: "https://troubleshoot.sh/images/analyzer-icons/mysql-analyze.svg",
}

View File

@@ -28,13 +28,13 @@ func analyzePostgres(analyzer *troubleshootv1beta1.DatabaseAnalyze, getCollected
return nil, errors.Wrap(err, "failed to unmarshal databased connection result")
}
checkName := analyzer.CheckName
if checkName == "" {
checkName = collectorName
title := analyzer.CheckName
if title == "" {
title = collectorName
}
result := &AnalyzeResult{
Title: checkName,
Title: title,
IconKey: "kubernetes_postgres_analyze",
IconURI: "https://troubleshoot.sh/images/analyzer-icons/postgres-analyze.svg",
}

View File

@@ -28,13 +28,13 @@ func analyzeRedis(analyzer *troubleshootv1beta1.DatabaseAnalyze, getCollectedFil
return nil, errors.Wrap(err, "failed to unmarshal database connection result")
}
checkName := analyzer.CheckName
if checkName == "" {
checkName = collectorName
title := analyzer.CheckName
if title == "" {
title = collectorName
}
result := &AnalyzeResult{
Title: checkName,
Title: title,
IconKey: "kubernetes_redis_analyze",
IconURI: "https://troubleshoot.sh/images/analyzer-icons/redis-analyze.svg",
}