Add EventSource to api to have both Component and Host information.

This commit is contained in:
Dawn Chen
2015-01-06 13:22:58 -08:00
parent 2b91c1417c
commit e3c019128e
15 changed files with 60 additions and 29 deletions

View File

@@ -109,7 +109,7 @@ func (rs *REST) getAttrs(obj runtime.Object) (objLabels, objFields labels.Set, e
"condition": event.Condition,
"status": event.Condition, // TODO: remove me when we version fields
"reason": event.Reason,
"source": event.Source,
"source": event.Source.Component,
}, nil
}

View File

@@ -145,7 +145,7 @@ func TestRESTgetAttrs(t *testing.T) {
},
Condition: "Tested",
Reason: "ForTesting",
Source: "test",
Source: api.EventSource{Component: "test"},
}
label, field, err := rest.getAttrs(eventA)
if err != nil {