Browse Source

fix(playlists): fixed url in playlist view when using sub url, fixes #3711

Torkel Ödegaard 10 years ago
parent
commit
a147015e96

+ 2 - 2
public/app/features/playlist/partials/playlists.html

@@ -22,10 +22,10 @@
           {{playlist.title}}
         </td>
         <td >
-          <a href="{{ playlistUrl(playlist) }}">{{ playlistUrl(playlist) }}</a>
+					<a href="playlists/play/{{playlist.id}}">playlists/play/{{playlist.id}}</a>
         </td>
         <td class="text-center">
-          <a href="{{ playlistUrl(playlist) }}" class="btn btn-inverse btn-mini">
+          <a href="playlists/play/{{playlist.id}}" class="btn btn-inverse btn-mini">
             <i class="fa fa-play"></i>
             Play
           </a>

+ 1 - 9
public/app/features/playlist/playlists_ctrl.js

@@ -7,20 +7,12 @@ function (angular, _) {
 
   var module = angular.module('grafana.controllers');
 
-  module.controller('PlaylistsCtrl', function(
-    $scope,
-    $location,
-    backendSrv
-  ) {
+  module.controller('PlaylistsCtrl', function($scope, $location, backendSrv) {
     backendSrv.get('/api/playlists')
       .then(function(result) {
         $scope.playlists = result;
       });
 
-    $scope.playlistUrl = function(playlist) {
-      return '/playlists/play/' + playlist.id;
-    };
-
     $scope.removePlaylist = function(playlist) {
       var modalScope = $scope.$new(true);