Skip to content

Commit 7d2b4cf

Browse files
committed
Different header background color for each cluster, show version at footer
1 parent 457b9b4 commit 7d2b4cf

File tree

6 files changed

+16
-3
lines changed

6 files changed

+16
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ var clusters = [
5858
5959
```
6060
With the use of KAFKA_TOPICS_UI you will be able to navigate to your selected connector topics.
61+
With the use of COLOR you can set different colors for each cluster.
62+
6163

6264
### Supported Connectors
6365
For our [DM connectors](http://www.landoop.com/capabilities/kafka-connectors/) we have a template of metadata within the `supported-connectors.js`. In any case you will be shown all the existing connectors in your classpath with all the required fields to set them up.

env.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ var clusters = [
44
NAME:"prod",
55
KAFKA_CONNECT: "http://kafka-connect.prod.url",
66
KAFKA_TOPICS_UI: "http://kafka-topics-ui.url",
7-
KAFKA_TOPICS_UI_ENABLED: true
7+
KAFKA_TOPICS_UI_ENABLED: true ,
8+
COLOR: "#141414"
89
},
910
{
1011
NAME:"dev",

index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<body ng-app="angularAPP" ngCloak>
2222
<md-progress-linear md-mode="indeterminate" ng-show="loading || rebalancing"></md-progress-linear>
23-
<header class="header" ng-controller="HeaderCtrl" >
23+
<header class="header" ng-controller="HeaderCtrl" style="background-color:{{color}}">
2424
<div layout="row" layout-xs="column">
2525
<div flex>
2626
<h5><a href="{{cluster ? '#/cluster/'+cluster.NAME : '#/'}}">KAFKA CONNECT</a></h5>
@@ -53,7 +53,9 @@ <h3 style="font-weight:300; color:red"><i class="fa fa-exclamation-triangle" ari
5353
NAME:"prod", //Required
5454
KAFKA_CONNECT: "http://kafka-connect.url", //Required
5555
KAFKA_TOPICS_UI: "http://kafka-topics-ui.url", //Optional
56-
KAFKA_TOPICS_UI_ENABLED: true //Optional
56+
KAFKA_TOPICS_UI_ENABLED: true, //Optional
57+
COLOR: "#141414" // Optional
58+
5759
},
5860
{
5961
NAME:"dev",

src/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ angularAPP.controller('HeaderCtrl', function ($rootScope, $scope, $location, env
1919
$scope.$on('$routeChangeSuccess', function() {
2020
$scope.connectRestArray = env.getClusters();
2121
$scope.cluster = env.getSelectedCluster();
22+
$scope.color = $scope.cluster.COLOR;
23+
console.log($scope.cluster)
2224
});
2325

2426
$scope.updateEndPoint = function(cluster) {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
angularAPP.controller('KafkaConnectConfigCtrl', function ($scope, $http, $log, env, constants) {
22
$scope.$on('$routeChangeSuccess', function() {
3+
$scope.showVersion = false;
34
$scope.kafkaConnectURL = env.KAFKA_CONNECT();
5+
$http.get(env.KAFKA_CONNECT()).then(function(response){
6+
$scope.showVersion = true;
7+
$scope.version =response.data.version;
8+
})
49
})
510
$scope.connectivityError = constants.CONFIG_CONNECTIVITY_ERROR;
611
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<md-card ng-controller="KafkaConnectConfigCtrl" class="config">
22
<md-content flex layout-padding>
33
<b>Kafka Connect :</b> {{kafkaConnectURL}} <br>
4+
<span ng-show="showVersion"> <b>Kafka Connect Version :</b> {{version}} <br></span>
45
<span ng-show="connectionFailure" class="red">{{connectivityError}}</span><br>
56
</md-content>
67
</md-card>

0 commit comments

Comments
 (0)