Tweaked wording of compare button.

Still not happy with it... suggestions are welcome :p
This commit is contained in:
Boaz Leskes 2013-11-07 11:01:13 +01:00
parent 0849aba30a
commit 741c0d8ded
2 changed files with 6 additions and 5 deletions

View file

@ -41,7 +41,7 @@
<table class="table table-bordered" ng-if="!panel.compact">
<thead>
<th>node <a ng-href="{{compareLink()}}" target="_blank" class="btn btn-mini btn-info" ng-disabled="!hasSelected(nodes)" bs-tooltip="compareTip()" data-placement="right">Compare</a></th>
<th>node <a ng-href="{{detailViewLink()}}" target="_blank" class="btn btn-mini btn-info" ng-disabled="!hasSelected(nodes)" bs-tooltip="detailViewTip()" data-placement="right">nodes dashboard</a></th>
<th ng-repeat="metric in metrics" ng-class="alertClass(warnLevels['_global_'][metric.name])">{{metric.name}}</th>
</thead>
<tr ng-repeat="node in nodes">
@ -70,7 +70,7 @@
<table class="table table-bordered table-condensed marvel-table" ng-if="panel.compact">
<thead>
<th>node <a ng-href="{{compareLink()}}" class="btn btn-mini btn-info" ng-disabled="!hasSelected(nodes)" bs-tooltip="compareTip()" data-placement="right">Compare</a></th>
<th>node <a ng-href="{{detailViewLink()}}" class="btn btn-mini btn-info" ng-disabled="!hasSelected(nodes)" bs-tooltip="detailViewTip()" data-placement="right">nodes dashboard</a></th>
<th ng-repeat="metric in metrics" ng-class="alertClass(warnLevels['_global_'][metric.name])">{{metric.name}}</th>
</thead>
<tr ng-repeat="node in nodes">

View file

@ -171,13 +171,14 @@ function (angular, app, kbn, _, $) {
});
};
$scope.compareLink = function() {
$scope.detailViewLink = function() {
var nodes = _.pluck(_.where($scope.nodes,{selected:true}),'name');
return "#/dashboard/script/marvel.node_stats.js?show=OS&nodes="+nodes.join(',');
};
$scope.compareTip = function() {
return $scope.hasSelected($scope.nodes) ? false : 'Select nodes to compare';
$scope.detailViewTip = function() {
return $scope.hasSelected($scope.nodes) ? 'Open nodes dashboard for selected nodes' :
'Select nodes and click top open the nodes dashboard';
};
$scope.calculateWarnings = function () {