mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fixed tests
This commit is contained in:
parent
46edd6008f
commit
472e1c6d8e
@ -14,7 +14,7 @@ define([
|
|||||||
'extend-jquery',
|
'extend-jquery',
|
||||||
'bindonce',
|
'bindonce',
|
||||||
],
|
],
|
||||||
function (angular, $, _, appLevelRequire, config) {
|
function (angular, $, _, appLevelRequire) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
|
||||||
'lodash'
|
|
||||||
],
|
],
|
||||||
function (angular, app) {
|
function (angular) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
var module = angular.module('grafana.controllers');
|
||||||
@ -17,7 +15,7 @@ function (angular, app) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$http.post('/login', $scope.loginModel).then(function(results) {
|
$http.post('/login', $scope.loginModel).then(function() {
|
||||||
$location.path('/');
|
$location.path('/');
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err.status === 401) {
|
if (err.status === 401) {
|
||||||
|
@ -36,19 +36,9 @@ function (angular, app, _, timeSeries) {
|
|||||||
_.defaults($scope.panel, _d);
|
_.defaults($scope.panel, _d);
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
panelSrv.init(this);
|
|
||||||
|
|
||||||
if (!$scope.skipDataOnInit) {
|
|
||||||
$scope.get_data();
|
|
||||||
}
|
|
||||||
//$scope.$on('refresh', $scope.render);
|
|
||||||
//$scope.render();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.get_data = function() {
|
$scope.get_data = function() {
|
||||||
delete $scope.panel.error;
|
|
||||||
$scope.panelMeta.loading = true;
|
|
||||||
|
|
||||||
$scope.rangeUnparsed = $scope.filter.timeRange(false);
|
$scope.rangeUnparsed = $scope.filter.timeRange(false);
|
||||||
|
|
||||||
var metricsQuery = {
|
var metricsQuery = {
|
||||||
@ -101,7 +91,7 @@ function (angular, app, _, timeSeries) {
|
|||||||
$scope.openEditor = function() {
|
$scope.openEditor = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
panelSrv.init($scope);
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user