fix build (#2548)
This commit is contained in:
parent
325003bb69
commit
810a8adcf0
2 changed files with 4 additions and 9 deletions
|
@ -254,11 +254,6 @@ func runCollectionsInspect(cmd *cobra.Command, args []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
noMetrics, err := flags.GetBool("no-metrics")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, name := range args {
|
for _, name := range args {
|
||||||
if err = InspectItem(name, cwhub.COLLECTIONS, noMetrics); err != nil {
|
if err = InspectItem(name, cwhub.COLLECTIONS, noMetrics); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -21,18 +21,18 @@ import (
|
||||||
func ShowMetrics(hubItem *cwhub.Item) {
|
func ShowMetrics(hubItem *cwhub.Item) {
|
||||||
switch hubItem.Type {
|
switch hubItem.Type {
|
||||||
case cwhub.PARSERS:
|
case cwhub.PARSERS:
|
||||||
metrics := GetParserMetric(prometheusURL, hubItem.Name)
|
metrics := GetParserMetric(csConfig.Cscli.PrometheusUrl, hubItem.Name)
|
||||||
parserMetricsTable(color.Output, hubItem.Name, metrics)
|
parserMetricsTable(color.Output, hubItem.Name, metrics)
|
||||||
case cwhub.SCENARIOS:
|
case cwhub.SCENARIOS:
|
||||||
metrics := GetScenarioMetric(prometheusURL, hubItem.Name)
|
metrics := GetScenarioMetric(csConfig.Cscli.PrometheusUrl, hubItem.Name)
|
||||||
scenarioMetricsTable(color.Output, hubItem.Name, metrics)
|
scenarioMetricsTable(color.Output, hubItem.Name, metrics)
|
||||||
case cwhub.COLLECTIONS:
|
case cwhub.COLLECTIONS:
|
||||||
for _, item := range hubItem.Parsers {
|
for _, item := range hubItem.Parsers {
|
||||||
metrics := GetParserMetric(prometheusURL, item)
|
metrics := GetParserMetric(csConfig.Cscli.PrometheusUrl, item)
|
||||||
parserMetricsTable(color.Output, item, metrics)
|
parserMetricsTable(color.Output, item, metrics)
|
||||||
}
|
}
|
||||||
for _, item := range hubItem.Scenarios {
|
for _, item := range hubItem.Scenarios {
|
||||||
metrics := GetScenarioMetric(prometheusURL, item)
|
metrics := GetScenarioMetric(csConfig.Cscli.PrometheusUrl, item)
|
||||||
scenarioMetricsTable(color.Output, item, metrics)
|
scenarioMetricsTable(color.Output, item, metrics)
|
||||||
}
|
}
|
||||||
for _, item := range hubItem.Collections {
|
for _, item := range hubItem.Collections {
|
||||||
|
|
Loading…
Reference in a new issue