Skip to content

Commit

Permalink
fix(templating): fixed issue with mixing repeated row and repeated pa…
Browse files Browse the repository at this point in the history
…nel, fixes grafana#4988
  • Loading branch information
torkelo committed May 12, 2016
1 parent 731c355 commit 0201ac2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 3.0.0 Stable (2016-05-11)
# 3.0.2 Stable (unreleased)

* **Templating**: Fixed issue mixing row repeat and panel repeats, fixes [#4988](https://github.com/grafana/grafana/issues/4988)

# 3.0.1 Stable (2016-05-11)

* **Templating**: Fixed issue with new data source variable not persisting current selected value, fixes [#4934](https://github.com/grafana/grafana/issues/4934)

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = function(config) {
browsers: ['PhantomJS'],
captureTimeout: 20000,
singleRun: true,
autoWatchBatchDelay: 10000,
autoWatchBatchDelay: 1000,
browserNoActivityTimeout: 60000,

});
Expand Down
4 changes: 2 additions & 2 deletions packaging/publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ rpm_ver=3.0.1-1
#package_cloud push grafana/testing/el/6 grafana-${rpm_ver}.x86_64.rpm
#package_cloud push grafana/testing/el/7 grafana-${rpm_ver}.x86_64.rpm

package_cloud push grafana/stable/el/7 grafana-${version}.x86_64.rpm
package_cloud push grafana/stable/el/6 grafana-${version}.x86_64.rpm
package_cloud push grafana/stable/el/7 grafana-${rpm_ver}.x86_64.rpm
package_cloud push grafana/stable/el/6 grafana-${rpm_ver}.x86_64.rpm
3 changes: 2 additions & 1 deletion public/app/features/dashboard/dynamicDashboardSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function (angular, _) {
else if (panel.repeatPanelId && panel.repeatIteration !== this.iteration) {
row.panels = _.without(row.panels, panel);
j = j - 1;
} else if (row.repeat || row.repeatRowId) {
continue;
} else if (!_.isEmpty(panel.scopedVars) && panel.repeatIteration !== this.iteration) {
panel.scopedVars = {};
}
Expand Down Expand Up @@ -118,7 +120,6 @@ function (angular, _) {
panel = copy.panels[i];
panel.scopedVars = {};
panel.scopedVars[variable.name] = option;
panel.repeatIteration = this.iteration;
}
}, this);
};
Expand Down
1 change: 1 addition & 0 deletions public/test/specs/dynamicDashboardSrv-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ define([

it('should generate a repeartRowId based on repeat row index', function() {
expect(ctx.rows[1].repeatRowId).to.be(1);
expect(ctx.rows[1].repeatIteration).to.be(ctx.dynamicDashboardSrv.iteration);
});

it('should set scopedVars on row panels', function() {
Expand Down

0 comments on commit 0201ac2

Please sign in to comment.