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

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

View File

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

View File

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