+func displaySingleAlert(t table.Writer, gettableAlert *models.GettableAlert) {
+ t.AppendRow([]interface{}{"------------------------------------"})
+ for key, item := range gettableAlert.Annotations {
+ t.AppendRow([]interface{}{key, item})
+ }
+ if gettableAlert.EndsAt != nil {
+ t.AppendRow([]interface{}{"EndsAt", *gettableAlert.EndsAt})
+ }
+ if gettableAlert.Fingerprint != nil {
+ t.AppendRow([]interface{}{"Fingerprint", *gettableAlert.Fingerprint})
+ }
+ for key, item := range gettableAlert.Receivers {
+ if gettableAlert.Receivers != nil {
+ t.AppendRow([]interface{}{key, *item.Name})
+ }
+ }
+ if gettableAlert.StartsAt != nil {
+ t.AppendRow([]interface{}{"StartsAt", *gettableAlert.StartsAt})
+ }
+ if gettableAlert.Status != nil {
+ t.AppendRow([]interface{}{"InhibitedBy", gettableAlert.Status.InhibitedBy})
+ t.AppendRow([]interface{}{"SilencedBy", gettableAlert.Status.SilencedBy})
+ t.AppendRow([]interface{}{"State", *gettableAlert.Status.State})
+ }
+ if gettableAlert.UpdatedAt != nil {
+ t.AppendRow([]interface{}{"UpdatedAt", *gettableAlert.UpdatedAt})
+ }
+ t.AppendRow([]interface{}{"GeneratorURL", gettableAlert.Alert.GeneratorURL})
+ for key, item := range gettableAlert.Alert.Labels {
+ t.AppendRow([]interface{}{key, item})
+ }
+}
+