From e6338a4fc4527ec91bd9eaf278aaf831c19d8eb8 Mon Sep 17 00:00:00 2001 From: Mirjam Aulbach Date: Tue, 27 Feb 2024 13:08:21 +0700 Subject: [PATCH 1/2] Add string instead of ENUM to cluster page. Signed-off-by: Mirjam Aulbach --- core/src/main/resources/static/js/envs.js | 9 +++++++++ core/src/main/resources/templates/clusters.html | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/core/src/main/resources/static/js/envs.js b/core/src/main/resources/static/js/envs.js index c63da19a67..8a9b627c6c 100644 --- a/core/src/main/resources/static/js/envs.js +++ b/core/src/main/resources/static/js/envs.js @@ -4,6 +4,7 @@ // edit // solution for transaction // message store / key / gui + var app = angular.module('envsApp',[]); app.directive('onReadFile', function ($parse) { @@ -32,6 +33,14 @@ app.controller("envsCtrl", function($scope, $http, $location, $window) { $scope.kafkaClusters = [ { label: 'Non-Aiven', value: 'nonaiven' }, { label: 'Aiven', value: 'aiven' } ]; + $scope.kafkaFlavorToString = { + APACHE_KAFKA: "Apache Kafka", + AIVEN_FOR_APACHE_KAFKA: "Aiven for Apache Kafka", + CONFLUENT: "Confluent", + CONFLUENT_CLOUD: "Confluent Cloud", + OTHERS: "others", + }; + // Set http service defaults // We force the "Accept" header to be only "application/json" // otherwise we risk the Accept header being set by default to: diff --git a/core/src/main/resources/templates/clusters.html b/core/src/main/resources/templates/clusters.html index dfbfb60d10..9682e05a31 100644 --- a/core/src/main/resources/templates/clusters.html +++ b/core/src/main/resources/templates/clusters.html @@ -518,16 +518,16 @@

Shortcuts

{{ allenv.protocol}} - {{ allenv.clusterType }} + Kafka - {{ allenv.clusterType }} + Schema Registry - {{ allenv.clusterType }} + Kafka Connect - {{ allenv.kafkaFlavor }} + {{ kafkaFlavorToString[allenv.kafkaFlavor] }} {{ allenv.associatedServers }} From f9e4b7065935b7a1390717b5fab5420d43474529 Mon Sep 17 00:00:00 2001 From: Mirjam Aulbach Date: Tue, 27 Feb 2024 13:08:39 +0700 Subject: [PATCH 2/2] Add string instead of ENUM to cluster modify page. Signed-off-by: Mirjam Aulbach --- core/src/main/resources/static/js/modifyEnvs.js | 10 +++++++++- core/src/main/resources/templates/modifyCluster.html | 12 ++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/core/src/main/resources/static/js/modifyEnvs.js b/core/src/main/resources/static/js/modifyEnvs.js index e1e7111b55..e5009e6b5f 100644 --- a/core/src/main/resources/static/js/modifyEnvs.js +++ b/core/src/main/resources/static/js/modifyEnvs.js @@ -7,7 +7,15 @@ var app = angular.module('modifyEnvsApp',[]); app.controller("modifyEnvsCtrl", function($scope, $http, $location, $window) { - + + $scope.kafkaFlavorToString = { + APACHE_KAFKA: "Apache Kafka", + AIVEN_FOR_APACHE_KAFKA: "Aiven for Apache Kafka", + CONFLUENT: "Confluent", + CONFLUENT_CLOUD: "Confluent Cloud", + OTHERS: "others", + }; + // Set http service defaults // We force the "Accept" header to be only "application/json" // otherwise we risk the Accept header being set by default to: diff --git a/core/src/main/resources/templates/modifyCluster.html b/core/src/main/resources/templates/modifyCluster.html index 35b1a957d9..0477766927 100644 --- a/core/src/main/resources/templates/modifyCluster.html +++ b/core/src/main/resources/templates/modifyCluster.html @@ -525,8 +525,8 @@

Shortcuts

- - + +
@@ -636,8 +636,8 @@

Shortcuts

- - + +
@@ -712,8 +712,8 @@

Shortcuts

- - + +