forked from lmenezes/cerebro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Leonardo Menezes
committed
Dec 25, 2016
1 parent
d2281c4
commit e04eec4
Showing
12 changed files
with
259 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<span class="dropdown"> | ||
<span class="shard shard-{{state}} normal-action {{clazz}}" data-toggle="dropdown" id="{{id}}"> | ||
<small>{{shard.shard}}</small> | ||
</span> | ||
<ul class="dropdown-menu" aria-labelledby="{{id}}"> | ||
<li ng-click="shardStats(shard.index, shard.node, shard.shard)" data-toggle="modal" href="#confirm_dialog" target="_self"> | ||
<a target="_self"><i class="fa fa-fw fa-info-circle"> </i> display shard stats</a> | ||
</li> | ||
<li ng-click="select(shard)" ng-hide="equal(relocatingShard)"> | ||
<a target="_self"><i class="fa fa-fw fa-arrows"> </i> select for relocation</a> | ||
</li> | ||
<li ng-click="select()" ng-show="equal(relocatingShard)"> | ||
<a target="_self"><i class="fa fa-fw fa-arrows"> </i> unselect for relocation</a> | ||
</li> | ||
</ul> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
angular.module('cerebro').directive('ngShard', function() { | ||
return { | ||
scope: true, | ||
link: function(scope) { | ||
var shard = scope.shard; | ||
scope.state = shard.state.toLowerCase(); | ||
scope.replica = !shard.primary && shard.node; | ||
scope.id = shard.shard + '_' + shard.node + '_' + shard.index; | ||
scope.clazz = scope.replica ? 'shard-replica' : ''; | ||
scope.equal = function(other) { | ||
return other && shard.index === other.index && | ||
shard.node === other.node && shard.shard === other.shard; | ||
}; | ||
}, | ||
templateUrl: function() { | ||
return 'overview/shard.html'; | ||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters