Browse Source

fix(templating): fix for text panel when using template variables in text and repeating panel, fixes #2442

Torkel Ödegaard 10 years ago
parent
commit
bd7ae3dc71
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 1
      public/app/panels/text/module.js

+ 1 - 0
CHANGELOG.md

@@ -2,6 +2,7 @@
 
 
 **Fixes**
 **Fixes**
 - [Issue #2443](https://github.com/grafana/grafana/issues/2443). Templating: Fix for buggy repeat row behavior when combined with with repeat panel due to recent change before 2.1 release
 - [Issue #2443](https://github.com/grafana/grafana/issues/2443). Templating: Fix for buggy repeat row behavior when combined with with repeat panel due to recent change before 2.1 release
+- [Issue #2442](https://github.com/grafana/grafana/issues/2442). Templating: Fix text panel when using template variables in text in in repeated panel
 
 
 # 2.1.0 (2015-08-04)
 # 2.1.0 (2015-08-04)
 
 

+ 1 - 1
public/app/panels/text/module.js

@@ -93,7 +93,7 @@ function (angular, app, _, require, PanelMeta) {
 
 
     $scope.updateContent = function(html) {
     $scope.updateContent = function(html) {
       try {
       try {
-        $scope.content = $sce.trustAsHtml(templateSrv.replace(html));
+        $scope.content = $sce.trustAsHtml(templateSrv.replace(html, $scope.panel.scopedVars));
       } catch(e) {
       } catch(e) {
         console.log('Text panel error: ', e);
         console.log('Text panel error: ', e);
         $scope.content = $sce.trustAsHtml(html);
         $scope.content = $sce.trustAsHtml(html);