Torkel Ödegaard 10 سال پیش
والد
کامیت
bcb80eb38f
2فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 0 1
      public/app/panels/graph/module.js
  2. 7 2
      public/test/specs/dynamicDashboardSrv-specs.js

+ 0 - 1
public/app/panels/graph/module.js

@@ -24,7 +24,6 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) {
   });
   });
 
 
   module.controller('GraphCtrl', function($scope, $rootScope, panelSrv, annotationsSrv, panelHelper, $q) {
   module.controller('GraphCtrl', function($scope, $rootScope, panelSrv, annotationsSrv, panelHelper, $q) {
-    console.log('Graph: init: ' + $scope.panel.id);
 
 
     $scope.panelMeta = new PanelMeta({
     $scope.panelMeta = new PanelMeta({
       panelName: 'Graph',
       panelName: 'Graph',

+ 7 - 2
public/test/specs/dynamicDashboardSrv-specs.js

@@ -123,12 +123,17 @@ define([
     });
     });
 
 
     it('should mark second row as repeated', function() {
     it('should mark second row as repeated', function() {
-      expect(ctx.rows[0].linked).to.be(undefined);
       expect(ctx.rows[0].repeat).to.be('$servers');
       expect(ctx.rows[0].repeat).to.be('$servers');
-      expect(ctx.rows[1].linked).to.be(true);
+    });
+
+    it('should clear repeat field on repeated row', function() {
       expect(ctx.rows[1].repeat).to.be(null);
       expect(ctx.rows[1].repeat).to.be(null);
     });
     });
 
 
+    it('should generate a repeartRowId based on repeat row index', function() {
+      expect(ctx.rows[1].repeatRowId).to.be(1);
+    });
+
     it('should set scopedVars on row panels', function() {
     it('should set scopedVars on row panels', function() {
       expect(ctx.rows[0].panels[0].scopedVars.servers.value).to.be('se1');
       expect(ctx.rows[0].panels[0].scopedVars.servers.value).to.be('se1');
       expect(ctx.rows[1].panels[0].scopedVars.servers.value).to.be('se2');
       expect(ctx.rows[1].panels[0].scopedVars.servers.value).to.be('se2');