mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-12 09:10:13 +00:00
cli: fix some command output formatting
- remove brackets around silence ID when adding new silence - fix simple formatting of show config Signed-off-by: Paul Gier <pgier@redhat.com>
This commit is contained in:
parent
2d483fac88
commit
6561774f9e
@ -72,7 +72,7 @@ func (formatter *SimpleFormatter) FormatAlerts(alerts []*models.GettableAlert) e
|
||||
}
|
||||
|
||||
func (formatter *SimpleFormatter) FormatConfig(status *models.AlertmanagerStatus) error {
|
||||
fmt.Fprintln(formatter.writer, *status)
|
||||
fmt.Fprintln(formatter.writer, *status.Config.Original)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -169,6 +169,6 @@ func (c *silenceAddCmd) add(ctx context.Context, _ *kingpin.ParseContext) error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println(*postOk.Payload)
|
||||
_, err = fmt.Println(postOk.Payload.SilenceID)
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user