Use bindonce to reduce objects to dirty check. Also remove some debug lines.

Renable sparklines

Remove debug
This commit is contained in:
Rashid Khan 2014-01-06 13:52:19 -07:00
parent d0d4b26b35
commit 853038c98d
2 changed files with 6 additions and 9 deletions

View file

@ -158,7 +158,6 @@ function (angular, app, _, kbn) {
var checkReport = function() {
if($cookies.marvelOptIn === 'IN') {
if(_.isUndefined($cookies.marvelLastReport)) {
console.log('undefined');
return true;
} else if (new Date().getTime() - parseInt($cookies.marvelLastReport,10) > reportInterval) {
return true;
@ -182,7 +181,6 @@ function (angular, app, _, kbn) {
$scope.config.stats_report_url,
data
).success(function() {
console.log('reported');
$cookies.marvelLastReport = thisReport;
});
};

View file

@ -42,7 +42,7 @@
<a href="" ng-class="{strong:panel.compact}" ng-click="panel.compact=true">Compact</a>
</div>
<table class="table table-bordered" ng-if="!panel.compact">
<table bindonce class="table table-bordered" ng-if="!panel.compact">
<thead>
<th class="pointer" ng-click="set_sort('__name__')">
{{panel.mode}}
@ -67,21 +67,20 @@
</td>
<td ng-repeat="metric in panel.metrics" ng-class="alertClass(warnLevels[row.id][metric.field])">
<div class="marvel-mean pointer" ng-click="rowClick(row,metric)">
<span>{{data[row.id+"_"+metric.field].mean | metric_format:metric}}</span>
<span bo-text="data[row.id+'_'+metric.field].mean | metric_format:metric"></span>
<br>
<div class="marvel-stats-sparkline" panel='panel' field="metric.field" series="data[row.id+'_'+metric.field+'_history'].series"></div>
</div>
<div class="marvel-extended pointer" ng-click="rowClick(row,metric)">
<span>min: {{data[row.id+"_"+metric.field].min | metric_format:metric}}</span><br>
<span>max: {{data[row.id+"_"+metric.field].max | metric_format:metric}}</span>
<span>min: <span bo-text="data[row.id+'_'+metric.field].min | metric_format:metric"></span></span><br>
<span>max: <span bo-text="data[row.id+'_'+metric.field].max | metric_format:metric"></span></span>
</div>
</td>
</tr>
</table>
<table class="table table-bordered table-condensed marvel-table" ng-if="panel.compact">
<table bindonce class="table table-bordered table-condensed marvel-table" ng-if="panel.compact">
<thead>
<th class="pointer" ng-click="set_sort('__name__')">
{{panel.mode}}
@ -105,7 +104,7 @@
</td>
<td ng-repeat="metric in panel.metrics" ng-class="alertClass(warnLevels[row.id][metric.field])">
<div class="pointer" ng-click="rowClick(row,metric)">
<span>{{data[row.id+"_"+metric.field].mean | metric_format:metric}}</span>
<span bo-text='data[row.id+"_"+metric.field].mean | metric_format:metric'></span>
<div class="marvel-stats-sparkline pointer" ng-click="rowClick(row,metric)" panel='panel' field="metric.field" series="data[row.id+'_'+metric.field+'_history'].series"></div>
</div>