mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
add 'no matching files' analyze result
This commit is contained in:
@@ -22,6 +22,18 @@ func analyzeTextAnalyze(analyzer *troubleshootv1beta1.TextAnalyze, getCollectedF
|
||||
checkName = analyzer.CollectorName
|
||||
}
|
||||
|
||||
if len(collected) == 0 {
|
||||
return []*AnalyzeResult{
|
||||
{
|
||||
Title: checkName,
|
||||
IconKey: "kubernetes_text_analyze",
|
||||
IconURI: "https://troubleshoot.sh/images/analyzer-icons/text-analyze.svg",
|
||||
IsFail: false,
|
||||
Message: "No matching files",
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
results := []*AnalyzeResult{}
|
||||
|
||||
if analyzer.RegexPattern != "" {
|
||||
|
||||
Reference in New Issue
Block a user