mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -06:00
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
define([
|
|
'angular',
|
|
'lodash'
|
|
],
|
|
function (angular) {
|
|
'use strict';
|
|
|
|
var module = angular.module('grafana.routes');
|
|
|
|
module.config(function($routeProvider) {
|
|
$routeProvider
|
|
.when('/playlists', {
|
|
templateUrl: 'public/app/features/playlist/partials/playlists.html',
|
|
controllerAs: 'ctrl',
|
|
controller : 'PlaylistsCtrl'
|
|
})
|
|
.when('/playlists/create', {
|
|
templateUrl: 'public/app/features/playlist/partials/playlist.html',
|
|
controllerAs: 'ctrl',
|
|
controller : 'PlaylistEditCtrl'
|
|
})
|
|
.when('/playlists/edit/:id', {
|
|
templateUrl: 'public/app/features/playlist/partials/playlist.html',
|
|
controllerAs: 'ctrl',
|
|
controller : 'PlaylistEditCtrl'
|
|
})
|
|
.when('/playlists/play/:id', {
|
|
templateUrl: 'public/app/features/playlist/partials/playlists.html',
|
|
controllerAs: 'ctrl',
|
|
controller : 'PlaylistsCtrl',
|
|
resolve: {
|
|
init: function(playlistSrv, $route) {
|
|
var playlistId = $route.current.params.id;
|
|
playlistSrv.start(playlistId);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|