Fix 'kafka-topic' JSON key to be 'topic'

pull/3386/head
Jared Scheib 2018-05-10 13:48:07 -07:00
parent 6edceb0b32
commit 08681c2795
3 changed files with 5 additions and 5 deletions

View File

@ -138,9 +138,9 @@ type Talk struct{}
// Kafka sends alerts to any Kafka brokers specified in the handler config
type Kafka struct {
Cluster string `json:"cluster"`
KafkaTopic string `json:"kafka-topic"`
Template string `json:"template"`
Cluster string `json:"cluster"`
Topic string `json:"topic"`
Template string `json:"template"`
}
// MarshalJSON converts AlertNodes to JSON

View File

@ -40,7 +40,7 @@ const KafkaHandler: SFC<Props> = ({selectedHandler, handleModifyHandler}) => (
<HandlerInput
selectedHandler={selectedHandler}
handleModifyHandler={handleModifyHandler}
fieldName="kafka-topic"
fieldName="topic"
fieldDisplay="Topic"
placeholder=""
/>

View File

@ -173,7 +173,7 @@ export const HANDLERS_TO_RULE = {
'service',
],
hipChat: ['room'],
kafka: ['cluster', 'kafka-topic', 'template'],
kafka: ['cluster', 'topic', 'template'],
opsGenie: ['teams', 'recipients'],
opsGenie2: ['teams', 'recipients'],
pagerDuty: [],