@@ -104,10 +104,10 @@ angularAPP.controller('CreateConnectorCtrl', function ($scope, $rootScope, $http
104104 $log . info ( config . value . name + ' : ' + config . value . errors [ 0 ] ) ;
105105 }
106106 //console.log("config.value -> ");
107- if ( config . definition . required == true ) {
107+ if ( ( config . definition . required == true ) || ( config . value . name . startsWith ( "topic" ) ) ) {
108108 requiredConfigKeys . push ( config . value . name ) ;
109109 }
110- // console.log("Required/compulsory config keys: " + requiredConfigKeys);
110+ console . log ( "Required/compulsory config keys: " + requiredConfigKeys ) ;
111111 validConnectorConfigKeys . push ( config . value . name ) ;
112112 } ) ;
113113 //console.log("validConnectorConfigKeys -> " + validConnectorConfigKeys);
@@ -208,9 +208,11 @@ angularAPP.controller('CreateConnectorCtrl', function ($scope, $rootScope, $http
208208 var type = "Unknown" ;
209209 var a = pluginClass . split ( '.' ) ;
210210 if ( a [ a . length - 1 ] . toLowerCase ( ) . indexOf ( 'sink' ) > 0 ) {
211- type = "Sink"
211+ type = "Sink" ;
212+ var myElements = [ { key :'name' , value : a [ a . length - 1 ] , required : true } , { key :'connector.class' , value : pluginClass , required : true } , { key :'topics' , value : 'TopicName_' + a [ a . length - 1 ] , required : true } , { key :'tasks.max' , value : 1 , required : true } ] ;
212213 } else if ( a [ a . length - 1 ] . toLowerCase ( ) . indexOf ( 'source' ) > 0 ) {
213- type = "Source"
214+ type = "Source" ;
215+ var myElements = [ { key :'name' , value : a [ a . length - 1 ] , required : true } , { key :'connector.class' , value : pluginClass , required : true } , { key :'tasks.max' , value : 1 , required : true } ] ;
214216 }
215217
216218 var connector = {
@@ -225,7 +227,7 @@ angularAPP.controller('CreateConnectorCtrl', function ($scope, $rootScope, $http
225227 id : "step1" ,
226228 sections : [
227229 {
228- elements : [ { key : 'name' , value : a [ a . length - 1 ] , required : true } , { key : 'connector.class' , value : pluginClass , required : true } , { key : 'topics' , value : 'TopicName_' + a [ a . length - 1 ] , required : true } , { key : 'tasks.max' , value : 1 , required : true } ]
230+ elements : myElements
229231 }
230232 ]
231233 }
0 commit comments