|
@@ -1,7 +1,6 @@
|
|
|
///<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';
|
|
|
|
|
|
|
@@ -11,6 +10,7 @@ class PlaylistSrv {
|
|
|
private index: number;
|
|
private index: number;
|
|
|
private interval: any;
|
|
private interval: any;
|
|
|
private playlistId: number;
|
|
private playlistId: number;
|
|
|
|
|
+ private startUrl: string;
|
|
|
|
|
|
|
|
/** @ngInject */
|
|
/** @ngInject */
|
|
|
constructor(private $rootScope: any, private $location: any, private $timeout: any, private backendSrv: any) { }
|
|
constructor(private $rootScope: any, private $location: any, private $timeout: any, private backendSrv: any) { }
|
|
@@ -21,7 +21,7 @@ class PlaylistSrv {
|
|
|
var playedAllDashboards = this.index > this.dashboards.length - 1;
|
|
var playedAllDashboards = this.index > this.dashboards.length - 1;
|
|
|
|
|
|
|
|
if (playedAllDashboards) {
|
|
if (playedAllDashboards) {
|
|
|
- window.location.href = `${config.appSubUrl}/playlists/play/${this.playlistId}`;
|
|
|
|
|
|
|
+ window.location.href = this.startUrl;
|
|
|
} 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);
|
|
@@ -39,6 +39,7 @@ class PlaylistSrv {
|
|
|
start(playlistId) {
|
|
start(playlistId) {
|
|
|
this.stop();
|
|
this.stop();
|
|
|
|
|
|
|
|
|
|
+ this.startUrl = window.location.href;
|
|
|
this.index = 0;
|
|
this.index = 0;
|
|
|
this.playlistId = playlistId;
|
|
this.playlistId = playlistId;
|
|
|
this.$rootScope.playlistSrv = this;
|
|
this.$rootScope.playlistSrv = this;
|