(chart *collectorapi.Chart, j *Job)
| 747 | } |
| 748 | |
| 749 | func getChartType(chart *collectorapi.Chart, j *Job) string { |
| 750 | if chart.CachedType() != "" { |
| 751 | return chart.CachedType() |
| 752 | } |
| 753 | if !chart.IDSep { |
| 754 | chart.SetCachedType(j.FullName()) |
| 755 | } else if i := strings.IndexByte(chart.ID, '.'); i != -1 { |
| 756 | chart.SetCachedType(j.FullName() + "_" + chart.ID[:i]) |
| 757 | } else { |
| 758 | chart.SetCachedType(j.FullName()) |
| 759 | } |
| 760 | if chart.OverModule != "" { |
| 761 | cachedType := chart.CachedType() |
| 762 | if v, ok := strings.CutPrefix(cachedType, j.ModuleName()); ok { |
| 763 | chart.SetCachedType(chart.OverModule + v) |
| 764 | } |
| 765 | } |
| 766 | return chart.CachedType() |
| 767 | } |
| 768 | |
| 769 | func getChartID(chart *collectorapi.Chart) string { |
| 770 | if chart.CachedID() != "" { |
no test coverage detected
searching dependent graphs…