Browse Source

fixed tests

Torkel Ödegaard 11 years ago
parent
commit
472e1c6d8e
3 changed files with 4 additions and 16 deletions
  1. 1 1
      src/app/app.js
  2. 2 4
      src/app/controllers/p_loginCtrl.js
  3. 1 11
      src/app/panels/overview/module.js

+ 1 - 1
src/app/app.js

@@ -14,7 +14,7 @@ define([
   'extend-jquery',
   'bindonce',
 ],
-function (angular, $, _, appLevelRequire, config) {
+function (angular, $, _, appLevelRequire) {
 
   "use strict";
 

+ 2 - 4
src/app/controllers/p_loginCtrl.js

@@ -1,9 +1,7 @@
 define([
   'angular',
-  'app',
-  'lodash'
 ],
-function (angular, app) {
+function (angular) {
   'use strict';
 
   var module = angular.module('grafana.controllers');
@@ -17,7 +15,7 @@ function (angular, app) {
         return;
       }
 
-      $http.post('/login', $scope.loginModel).then(function(results) {
+      $http.post('/login', $scope.loginModel).then(function() {
         $location.path('/');
       }, function(err) {
         if (err.status === 401) {

+ 1 - 11
src/app/panels/overview/module.js

@@ -36,19 +36,9 @@ function (angular, app, _, timeSeries) {
     _.defaults($scope.panel, _d);
 
     $scope.init = function() {
-      panelSrv.init(this);
-
-      if (!$scope.skipDataOnInit) {
-        $scope.get_data();
-      }
-      //$scope.$on('refresh', $scope.render);
-      //$scope.render();
     };
 
     $scope.get_data = function() {
-      delete $scope.panel.error;
-      $scope.panelMeta.loading = true;
-
       $scope.rangeUnparsed = $scope.filter.timeRange(false);
 
       var metricsQuery = {
@@ -101,7 +91,7 @@ function (angular, app, _, timeSeries) {
     $scope.openEditor = function() {
     };
 
-    $scope.init();
+    panelSrv.init($scope);
 
   });
 });