diff --git a/docker/Dockerfile b/docker/Dockerfile index 9a180f6..29e1035 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,8 +13,9 @@ RUN wget "https://github.com/mholt/caddy/releases/download/v0.10.11/caddy_v0.10. && rm -f /caddy.tgz # Add and Setup Kafka Connect UI -ENV KAFKA_CONNECT_UI_VERSION="0.9.5" -RUN wget "https://github.com/Landoop/kafka-connect-ui/releases/download/v.${KAFKA_CONNECT_UI_VERSION}/kafka-connect-ui-${KAFKA_CONNECT_UI_VERSION}.tar.gz" -O /kafka-connect-ui.tar.gz \ +ARG KAFKA_CONNECT_UI_VERSION="0.9.6" +ARG KAFKA_CONNECT_UI_URL="https://github.com/Landoop/kafka-connect-ui/releases/download/v.${KAFKA_CONNECT_UI_VERSION}/kafka-connect-ui-${KAFKA_CONNECT_UI_VERSION}.tar.gz" +RUN wget "$KAFKA_CONNECT_UI_URL" -O /kafka-connect-ui.tar.gz \ && mkdir /kafka-connect-ui \ && tar xzf /kafka-connect-ui.tar.gz -C /kafka-connect-ui \ && rm -f /kafka-connect-ui.tar.gz diff --git a/package.json b/package.json index 41502cd..6e27d63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kafka-connect-ui", - "version": "0.9.5", + "version": "0.9.6", "description": "A user interface for managing Kafka Connectors", "readme": "README.md", "main": "Gruntfile.js", diff --git a/src/kafka-connect/config/config.html b/src/kafka-connect/config/config.html index 06f37d6..0ed907c 100644 --- a/src/kafka-connect/config/config.html +++ b/src/kafka-connect/config/config.html @@ -2,7 +2,7 @@ Kafka Connect : {{kafkaConnectURL}}
Kafka Connect Version : {{version}}
- Kafka Connect UI Version : 0.9.5
+ Kafka Connect UI Version : 0.9.6
{{connectivityError}}
diff --git a/src/kafka-connect/create-connector/create-connector.controller.js b/src/kafka-connect/create-connector/create-connector.controller.js index 4371cf3..4ed3d11 100644 --- a/src/kafka-connect/create-connector/create-connector.controller.js +++ b/src/kafka-connect/create-connector/create-connector.controller.js @@ -61,13 +61,13 @@ angularAPP.controller('CreateConnectorCtrl', function ($scope, $rootScope, $http } //STEP 1: Validate + $scope.validConfig = ''; + var validConnectorConfigKeys = []; + var requiredConfigKeys = []; KafkaConnectFactory.validateConnectorConfig(classname, model).then( function success(data) { $log.info('Total validation errors from API => ' + data.error_count); //STEP 2: Get errors if any - $scope.validConfig = ''; - var validConnectorConfigKeys = []; - var requiredConfigKeys = []; angular.forEach(data.configs, function (config) { if (data.error_count && config.value.errors.length > 0) { errorConfigs.push(config.value); @@ -89,13 +89,6 @@ angularAPP.controller('CreateConnectorCtrl', function ($scope, $rootScope, $http errorConfigs.push(errors); } }); - // Now check the other way around. Whether a required property is not set - angular.forEach(requiredConfigKeys, function (requiredKey) { - if (!model[requiredKey]) { - var errors = { errors : [ 'Required config "' + requiredKey + '" is not there' ] }; - errorConfigs.push(errors); - }; - }); if(errorConfigs == 0) { $scope.validConfig = constants.VIEW_MESSAGE_CONNECTOR_VALID; @@ -107,7 +100,9 @@ angularAPP.controller('CreateConnectorCtrl', function ($scope, $rootScope, $http $scope.warningConfigs = warningConfigs; }, function error(data, reason) { - $log.error('Failure : ' + data); + const errorObject = JSON.parse(data.split('error:')[1]) + $scope.errorConfigs = []; + $scope.errorConfigs.push({errors : [errorObject.message]}) deferred.reject(data); }); return deferred.promise;