Commit b7db7e91 authored by Georgios Ouzounis's avatar Georgios Ouzounis
Browse files

Avoid parsing kafka topics twice

parent 5d4cad6a
......@@ -305,7 +305,11 @@ export default Ember.Controller.extend({
kafkaInputTopicsObserver: Ember.observer('kafkaInputTopics', function() {
if(this.get('kafkaInputTopics').get('length') === 0){
// The observer will fire again after this change. Return so that parseKafkaTopics
// is only called once from the upcoming observer firing
this.set('kafkaInputTopics', ["input"]);
return;
}
this.parseKafkaTopics();
......@@ -313,7 +317,11 @@ export default Ember.Controller.extend({
kafkaOutputTopicsObserver: Ember.observer('kafkaOutputTopics', function() {
if(this.get('kafkaOutputTopics').get('length') === 0){
// The observer will fire again after this change. Return so that parseKafkaTopics
// is only called once from the upcoming observer firing
this.set('kafkaOutputTopics', ["batch-output", "stream-output"]);
return;
}
this.parseKafkaTopics();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment