mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-03 12:06:04 -04:00
🐛 fix: boolean fields in kafka producer monitor (#3949)
* 🐛 fix: boolean fields in kafka producer monitor Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev> * 🐛 fix: boolean fields db patch table modify Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev> * ✏️ typo: remove `_old` COLUMNs in patch-fix-kafka-producer-booleans Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev> --------- Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
This commit is contained in:
parent
1a862e47ab
commit
9f170a68d7
5 changed files with 52 additions and 2 deletions
|
@ -143,8 +143,8 @@ class Monitor extends BeanModel {
|
|||
expectedValue: this.expectedValue,
|
||||
kafkaProducerTopic: this.kafkaProducerTopic,
|
||||
kafkaProducerBrokers: JSON.parse(this.kafkaProducerBrokers),
|
||||
kafkaProducerSsl: this.kafkaProducerSsl === "1" && true || false,
|
||||
kafkaProducerAllowAutoTopicCreation: this.kafkaProducerAllowAutoTopicCreation === "1" && true || false,
|
||||
kafkaProducerSsl: this.getKafkaProducerSsl(),
|
||||
kafkaProducerAllowAutoTopicCreation: this.getKafkaProducerAllowAutoTopicCreation(),
|
||||
kafkaProducerMessage: this.kafkaProducerMessage,
|
||||
screenshot,
|
||||
};
|
||||
|
@ -287,6 +287,22 @@ class Monitor extends BeanModel {
|
|||
return Boolean(this.gamedigGivenPortOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse to boolean
|
||||
* @returns {boolean} Kafka Producer Ssl enabled?
|
||||
*/
|
||||
getKafkaProducerSsl() {
|
||||
return Boolean(this.kafkaProducerSsl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse to boolean
|
||||
* @returns {boolean} Kafka Producer Allow Auto Topic Creation Enabled?
|
||||
*/
|
||||
getKafkaProducerAllowAutoTopicCreation() {
|
||||
return Boolean(this.kafkaProducerAllowAutoTopicCreation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start monitor
|
||||
* @param {Server} io Socket server instance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue