Explorar o código

Merge remote-tracking branch 'grafana/master'

Sébastien Bouchex Bellomié %!s(int64=10) %!d(string=hai) anos
pai
achega
05fc34533f

+ 3 - 3
public/app/components/extend-jquery.js

@@ -24,14 +24,14 @@ function ($, angular, _) {
         $tooltip.appendTo(document.body);
         $tooltip.appendTo(document.body);
 
 
         if (opts.compile) {
         if (opts.compile) {
-          angular.element(document).injector().invoke(function($compile, $rootScope) {
+          angular.element(document).injector().invoke(["$compile", "$rootScope", function($compile, $rootScope) {
             var tmpScope = $rootScope.$new(true);
             var tmpScope = $rootScope.$new(true);
             _.extend(tmpScope, opts.scopeData);
             _.extend(tmpScope, opts.scopeData);
 
 
             $compile($tooltip)(tmpScope);
             $compile($tooltip)(tmpScope);
             tmpScope.$digest();
             tmpScope.$digest();
-            //tmpScope.$destroy();
-          });
+            tmpScope.$destroy();
+          }]);
         }
         }
 
 
         width = $tooltip.outerWidth(true);
         width = $tooltip.outerWidth(true);

+ 2 - 2
public/app/features/dashboard/playlistCtrl.js

@@ -25,14 +25,14 @@ function (angular, _, config) {
       }
       }
 
 
       backendSrv.search(query).then(function(results) {
       backendSrv.search(query).then(function(results) {
-        $scope.searchHits = results.dashboards;
+        $scope.searchHits = results;
         $scope.filterHits();
         $scope.filterHits();
       });
       });
     };
     };
 
 
     $scope.filterHits = function() {
     $scope.filterHits = function() {
       $scope.filteredHits = _.reject($scope.searchHits, function(dash) {
       $scope.filteredHits = _.reject($scope.searchHits, function(dash) {
-        return _.findWhere($scope.playlist, {slug: dash.slug});
+        return _.findWhere($scope.playlist, {uri: dash.uri});
       });
       });
     };
     };
 
 

+ 1 - 1
public/app/features/dashboard/playlistSrv.js

@@ -18,7 +18,7 @@ function (angular, _, kbn) {
       angular.element(window).unbind('resize');
       angular.element(window).unbind('resize');
       var dash = self.dashboards[self.index % self.dashboards.length];
       var dash = self.dashboards[self.index % self.dashboards.length];
 
 
-      $location.url('dashboard/db/' + dash.slug);
+      $location.url('dashboard/' + dash.uri);
 
 
       self.index++;
       self.index++;
       self.cancelPromise = $timeout(self.next, self.interval);
       self.cancelPromise = $timeout(self.next, self.interval);