Browse Source

fix(playlist): fix for memory leak when running playlist for a long period, fixes #3794

Torkel Ödegaard 10 years ago
parent
commit
4f7f03a28c

+ 5 - 2
CHANGELOG.md

@@ -1,6 +1,6 @@
 # 3.0.0 (unrelased master branch)
 # 3.0.0 (unrelased master branch)
 
 
-### New Features ###
+### New Features
 * **Playlists**: Playlists can now be persisted and started from urls, closes [#3655](https://github.com/grafana/grafana/pull/3655)
 * **Playlists**: Playlists can now be persisted and started from urls, closes [#3655](https://github.com/grafana/grafana/pull/3655)
 * **Metadata**: Settings panel now shows dashboard metadata, closes [#3304](https://github.com/grafana/grafana/issues/3304)
 * **Metadata**: Settings panel now shows dashboard metadata, closes [#3304](https://github.com/grafana/grafana/issues/3304)
 * **InfluxDB**: Support for policy selection in query editor, closes [#2018](https://github.com/grafana/grafana/issues/2018)
 * **InfluxDB**: Support for policy selection in query editor, closes [#2018](https://github.com/grafana/grafana/issues/2018)
@@ -10,11 +10,14 @@
 **InfluxDB 0.8.x** The data source for the old version of influxdb (0.8.x) is no longer included in default builds. Can easily be installed via improved plugin system, closes #3523
 **InfluxDB 0.8.x** The data source for the old version of influxdb (0.8.x) is no longer included in default builds. Can easily be installed via improved plugin system, closes #3523
 **KairosDB** The data source is no longer included in default builds. Can easily be installed via improved plugin system, closes #3524
 **KairosDB** The data source is no longer included in default builds. Can easily be installed via improved plugin system, closes #3524
 
 
-### Enhancements ###
+### Enhancements
 * **Sessions**: Support for memcached as session storage, closes [#3458](https://github.com/grafana/grafana/pull/3458)
 * **Sessions**: Support for memcached as session storage, closes [#3458](https://github.com/grafana/grafana/pull/3458)
 * **mysql**: Grafana now supports ssl for mysql, closes [#3584](https://github.com/grafana/grafana/pull/3584)
 * **mysql**: Grafana now supports ssl for mysql, closes [#3584](https://github.com/grafana/grafana/pull/3584)
 * **snapshot**: Annotations are now included in snapshots, closes [#3635](https://github.com/grafana/grafana/pull/3635)
 * **snapshot**: Annotations are now included in snapshots, closes [#3635](https://github.com/grafana/grafana/pull/3635)
 
 
+### Bug fixes
+* **Playlist**: Fix for memory leak when running a playlist, closes [#3794](https://github.com/grafana/grafana/pull/3794)
+
 # 2.6.1 (unrelased, 2.6.x branch)
 # 2.6.1 (unrelased, 2.6.x branch)
 
 
 ### New Features
 ### New Features

+ 1 - 1
public/app/features/dashlinks/module.js

@@ -159,7 +159,7 @@ function (angular, _) {
     };
     };
 
 
     updateDashLinks();
     updateDashLinks();
-    $rootScope.onAppEvent('dash-links-updated', updateDashLinks, $rootScope);
+    $rootScope.onAppEvent('dash-links-updated', updateDashLinks, $scope);
   });
   });
 
 
   module.controller('DashLinkEditorCtrl', function($scope, $rootScope) {
   module.controller('DashLinkEditorCtrl', function($scope, $rootScope) {

+ 2 - 2
public/app/features/playlist/playlist_srv.ts

@@ -1,6 +1,7 @@
 ///<reference path="../../headers/common.d.ts" />
 ///<reference path="../../headers/common.d.ts" />
 
 
 import angular from 'angular';
 import angular from 'angular';
+import config from 'app/core/config';
 import coreModule from '../../core/core_module';
 import coreModule from '../../core/core_module';
 import kbn from 'app/core/utils/kbn';
 import kbn from 'app/core/utils/kbn';
 
 
@@ -20,10 +21,9 @@ class PlaylistSrv {
     var playedAllDashboards = this.index > this.dashboards.length - 1;
     var playedAllDashboards = this.index > this.dashboards.length - 1;
 
 
     if (playedAllDashboards) {
     if (playedAllDashboards) {
-      this.start(this.playlistId);
+      window.location.href = `${config.appSubUrl}/playlists/play/${this.playlistId}`;
     } else {
     } else {
       var dash = this.dashboards[this.index];
       var dash = this.dashboards[this.index];
-
       this.$location.url('dashboard/' + dash.uri);
       this.$location.url('dashboard/' + dash.uri);
 
 
       this.index++;
       this.index++;