Skip to content

Commit d7a6c69

Browse files
authored
Merge pull request #6 from Landoop/One-cluster-case
Hide cluster selection and cluster name when only one cluster
2 parents a9e6393 + 10d4754 commit d7a6c69

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
<div flex>
2626
<h5><a href="{{cluster ? '#/cluster/'+cluster.NAME : '#/'}}">KAFKA CONNECT</a></h5>
2727
</div>
28-
<label ng-show="!missingEnvJS" style="color:#ccc; font-size:12px"><b>SELECT CLUSTER :</b></label>
29-
<md-input-container ng-show="!missingEnvJS" class="selectCluster">
28+
<label ng-show="!missingEnvJS && clusters.length > 1" style="color:#ccc; font-size:12px"><b>SELECT CLUSTER :</b></label>
29+
<md-input-container ng-show="!missingEnvJS && clusters.length > 1" class="selectCluster">
3030
<md-select ng-model="connectEndPoint">
31-
<md-option ng-repeat="connectEndPoint in connectRestArray track by $index"
31+
<md-option ng-repeat="connectEndPoint in clusters track by $index"
3232
ng-click="updateEndPoint(connectEndPoint.NAME)"
3333
value="{{connectEndPoint.NAME}}" ng-selected="{{cluster.NAME == connectEndPoint.NAME}}"
3434
>{{connectEndPoint.NAME}}</md-option>

src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ angularAPP.controller('HeaderCtrl', function ($rootScope, $scope, $location, env
1717

1818

1919
$scope.$on('$routeChangeSuccess', function() {
20-
$scope.connectRestArray = env.getClusters();
20+
$rootScope.clusters = env.getClusters();
2121
$scope.cluster = env.getSelectedCluster();
2222
$scope.color = $scope.cluster.COLOR;
2323
});

src/kafka-connect/home/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<md-card ng-hide="connectionFailure || rebalancing">
22

33
<div layout="row" layout-xs="column">
4-
<h1 flex style="font-weight:300; padding-left:20px; margin-bottom:0px">{{welcomeMessage}} - {{cluster}}</h1>
4+
<h1 flex style="font-weight:300; padding-left:20px; margin-bottom:0px">{{welcomeMessage}} <span ng-show="clusters.length > 1">- {{cluster}}</span></h1>
55
<md-button flex="20" style="margin-left:10px; margin-top:20px;"
66
ng-href="#/cluster/{{cluster}}/export-configs">
77
<i class="fa fa-download" aria-hidden="true"></i> Export config

0 commit comments

Comments
 (0)