Skip to content

Commit 4bec49c

Browse files
authored
Merge pull request #2 from Landoop/colors-for-each-cluster
Colors for each cluster
2 parents dd5acd5 + d68afac commit 4bec49c

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ 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.
6162

6263
### Supported Connectors
6364
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: 5 additions & 3 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",
@@ -87,7 +89,7 @@ <h3 style="font-weight:300; color:red"><i class="fa fa-exclamation-triangle" ari
8789
<div flex="nogrow">
8890
<img ng-src="src/assets/icons/landoop-dark.svg" style="width:20px;float: left;padding-right:5px;"></div>
8991
<div flex>
90-
<p class="md-caption">Powered by <a href="http://www.landoop.com/capabilities/kafka" target="_blank">LANDOOP</a></p>
92+
<p class="md-caption">Powered by <a href="http://www.landoop.com/" target="_blank">LANDOOP</a></p>
9193
</div>
9294
</div>
9395

src/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ 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;
2223
});
2324

2425
$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: 2 additions & 1 deletion
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>
6-
</md-card>
7+
</md-card>

0 commit comments

Comments
 (0)