Merge pull request #1099 from metamx/console_cleanup

console cleanup
This commit is contained in:
Fangjin Yang 2015-02-08 09:06:05 -08:00
commit 040e771da2
2 changed files with 10 additions and 17 deletions

View File

@ -11277,21 +11277,22 @@ app.filter('simplifyInterval', function($sce) {
var date, nonZero; var date, nonZero;
date = m[j * 5 + 1]; date = m[j * 5 + 1];
nonZero = _.find(idx, function(i) { nonZero = _.find(idx, function(i) {
return parseInt(m[i] !== 0); return parseInt(m[i]) !== 0;
}); });
switch (nonZero) { switch (nonZero) {
case void 0: case undefined:
return date; return date;
case idx[3]: case idx[3]:
return "" + date + timeSep + m[idx[3]]; return "" + date + timeSep + m[idx[3]];
case idx[0]: case idx[2]:
return "" + date + timeSep + m[idx[3]] + ":" + m[idx[2]]; return "" + date + timeSep + m[idx[3]] + ":" + m[idx[2]];
case idx[0]: case idx[1]:
return "" + date + timeSep + m[idx[3]] + ":" + m[idx[2]] + ":" + m[idx[1]]; return "" + date + timeSep + m[idx[3]] + ":" + m[idx[2]] + ":" + m[idx[1]];
case idx[0]: case idx[0]:
return "" + date + timeSep + m[idx[3]] + ":" + m[idx[2]] + ":" + m[idx[1]] + "." + m[idx[0]] + "Z"; return "" + date + timeSep + m[idx[3]] + ":" + m[idx[2]] + ":" + m[idx[1]] + "." + m[idx[0]] + "Z";
} }
}).join(intervalSep); }).join(intervalSep);
return $sce.trustAsHtml(simplified); return $sce.trustAsHtml(simplified);
}; };
}); });
@ -11873,7 +11874,6 @@ app.directive('isoInterval', function() {
} }
return void 0; return void 0;
} else { } else {
console.log('true');
$ctrl.$setValidity('isoInterval', true); $ctrl.$setValidity('isoInterval', true);
val = viewValues.map(function(v) { val = viewValues.map(function(v) {
return v.toISOString(); return v.toISOString();
@ -12425,7 +12425,6 @@ app.controller('DruidDataSourceCtrl', function($scope, $druid, $stateParams, $q)
}; };
$scope.getDaily = function() { $scope.getDaily = function() {
var d; var d;
console.log('getDaily');
return (function() { return (function() {
var _i, _len, _ref, _results; var _i, _len, _ref, _results;
_ref = $scope.days; _ref = $scope.days;
@ -12445,7 +12444,6 @@ app.controller('DruidDataSourceCtrl', function($scope, $druid, $stateParams, $q)
}; };
$scope.getMonthly = function() { $scope.getMonthly = function() {
var i, m, months; var i, m, months;
console.log('getMonthly');
months = (function() { months = (function() {
var _ref, _results; var _ref, _results;
_ref = $scope.days.reduce((function(months, d) { _ref = $scope.days.reduce((function(months, d) {
@ -12536,11 +12534,8 @@ app.controller('RuleEditorCtrl', function($scope, $modal, $druid, $utils) {
} }
}); });
modalInstance.result.then((function(newRules) { modalInstance.result.then((function(newRules) {
console.log("getting new rules for", $scope.dataSource.id);
return $scope.dataSource.rules = $utils.processRules(newRules); return $scope.dataSource.rules = $utils.processRules(newRules);
}), function() { }), function() {});
console.log("modal dismissed");
});
}; };
}); });
@ -12656,7 +12651,6 @@ app.controller('DataSourceDisableCtrl', function($scope, $modal, $druid, $utils,
modalInstance.result.then((function() { modalInstance.result.then((function() {
return $location.path("/" + $scope.env + "/datasources"); return $location.path("/" + $scope.env + "/datasources");
}), function() { }), function() {
console.log("modal dismissed");
}); });
}; };
}); });
@ -12696,7 +12690,6 @@ app.controller('DataSourceEnableCtrl', function($scope, $modal, $druid, $utils,
modalInstance.result.then((function() { modalInstance.result.then((function() {
return $location.path("/" + $scope.env + "/datasources/" + $scope.dataSourceId); return $location.path("/" + $scope.env + "/datasources/" + $scope.dataSourceId);
}), function() { }), function() {
console.log("modal dismissed");
}); });
}; };
}); });

View File

@ -64,7 +64,7 @@
</div> </div>
<div class="interval" ng-if="rule.interval"> <div class="interval" ng-if="rule.interval">
<span class="value">{{ rule.interval }}</span> <span class="value" ng-bind-html="rule.interval | simplifyInterval"></span>
<span class="human">({{ rule.momentInterval.period().humanize() }})</span> <span class="human">({{ rule.momentInterval.period().humanize() }})</span>
</div> </div>
@ -90,7 +90,7 @@
</div> </div>
<div class="interval" ng-if="rule.interval"> <div class="interval" ng-if="rule.interval">
<span class="value">{{ rule.interval }}</span> <span class="value" ng-bind-html="rule.interval | simplifyInterval"></span>
<span class="human">({{ rule.momentInterval.period().humanize() }})</span> <span class="human">({{ rule.momentInterval.period().humanize() }})</span>
</div> </div>
@ -107,9 +107,9 @@
<h2> <h2>
Timeline (unreplicated) Timeline (unreplicated)
<div> <div>
<div ng-if="unreplicatedSegmentSize" class="summary"> <div ng-if="dataSource.segments.size" class="summary">
<div> <div>
{{ unreplicatedSegmentSize | bytes }} {{ dataSource.segments.size | bytes }}
over {{ dataSource.segments.interval.period().humanize() }} over {{ dataSource.segments.interval.period().humanize() }}
</div> </div>
<div> <div>