2016-12-09 08:57:25 -06:00
|
|
|
define([
|
2015-12-22 04:07:15 -06:00
|
|
|
'angular',
|
|
|
|
'lodash'
|
|
|
|
],
|
2016-01-08 09:24:35 -06:00
|
|
|
function (angular) {
|
2015-12-22 04:07:15 -06:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var module = angular.module('grafana.routes');
|
|
|
|
|
|
|
|
module.config(function($routeProvider) {
|
|
|
|
$routeProvider
|
|
|
|
.when('/playlists', {
|
2016-02-01 11:19:02 -06:00
|
|
|
templateUrl: 'public/app/features/playlist/partials/playlists.html',
|
2016-01-26 12:03:43 -06:00
|
|
|
controllerAs: 'ctrl',
|
2016-01-08 06:33:24 -06:00
|
|
|
controller : 'PlaylistsCtrl'
|
2015-12-22 04:07:15 -06:00
|
|
|
})
|
|
|
|
.when('/playlists/create', {
|
2016-02-01 11:19:02 -06:00
|
|
|
templateUrl: 'public/app/features/playlist/partials/playlist.html',
|
2016-01-26 12:03:43 -06:00
|
|
|
controllerAs: 'ctrl',
|
2016-01-08 06:57:00 -06:00
|
|
|
controller : 'PlaylistEditCtrl'
|
2015-12-22 04:07:15 -06:00
|
|
|
})
|
|
|
|
.when('/playlists/edit/:id', {
|
2016-02-01 11:19:02 -06:00
|
|
|
templateUrl: 'public/app/features/playlist/partials/playlist.html',
|
2016-01-26 12:03:43 -06:00
|
|
|
controllerAs: 'ctrl',
|
2016-01-08 06:57:00 -06:00
|
|
|
controller : 'PlaylistEditCtrl'
|
2015-12-22 04:07:15 -06:00
|
|
|
})
|
|
|
|
.when('/playlists/play/:id', {
|
2016-03-01 06:50:55 -06:00
|
|
|
templateUrl: 'public/app/features/playlist/partials/playlists.html',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
controller : 'PlaylistsCtrl',
|
2015-12-22 04:07:15 -06:00
|
|
|
resolve: {
|
2016-01-18 06:54:32 -06:00
|
|
|
init: function(playlistSrv, $route) {
|
2015-12-22 04:07:15 -06:00
|
|
|
var playlistId = $route.current.params.id;
|
2016-01-18 06:54:32 -06:00
|
|
|
playlistSrv.start(playlistId);
|
2015-12-22 04:07:15 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|