|
@@ -6,6 +6,7 @@ define([
|
|
|
describe('OverviewCtrl', function() {
|
|
describe('OverviewCtrl', function() {
|
|
|
var _controller;
|
|
var _controller;
|
|
|
var _scope;
|
|
var _scope;
|
|
|
|
|
+ var _datasource;
|
|
|
|
|
|
|
|
beforeEach(module('grafana.services'));
|
|
beforeEach(module('grafana.services'));
|
|
|
beforeEach(module('grafana.panels.overview'));
|
|
beforeEach(module('grafana.panels.overview'));
|
|
@@ -15,14 +16,22 @@ define([
|
|
|
getMetricSources: function() {
|
|
getMetricSources: function() {
|
|
|
},
|
|
},
|
|
|
get: function() {
|
|
get: function() {
|
|
|
- return {};
|
|
|
|
|
|
|
+ return _datasource;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}));
|
|
}));
|
|
|
|
|
|
|
|
- beforeEach(inject(function($controller, $rootScope) {
|
|
|
|
|
|
|
+ beforeEach(inject(function($controller, $rootScope, $q) {
|
|
|
_scope = $rootScope.$new();
|
|
_scope = $rootScope.$new();
|
|
|
_scope.panel = { targets: [] };
|
|
_scope.panel = { targets: [] };
|
|
|
|
|
+ _scope.filter = {
|
|
|
|
|
+ timeRange: function() { }
|
|
|
|
|
+ };
|
|
|
|
|
+ _scope.datasource = {
|
|
|
|
|
+ query: function() {
|
|
|
|
|
+ return $q.resolve('hej');
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
_controller = $controller('OverviewCtrl', {
|
|
_controller = $controller('OverviewCtrl', {
|
|
|
$scope: _scope
|
|
$scope: _scope
|
|
|
});
|
|
});
|