mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
* noImplicitAny playlist approx 200 * Add AngularPanelMenuItem interface * Roughly 100 noImplicitAny
34 lines
1005 B
TypeScript
34 lines
1005 B
TypeScript
import angular from 'angular';
|
|
import { PlaylistSrv } from './playlist_srv';
|
|
|
|
/** @ngInject */
|
|
function grafanaRoutes($routeProvider: any) {
|
|
$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', {
|
|
template: '',
|
|
resolve: {
|
|
init: (playlistSrv: PlaylistSrv, $route: any) => {
|
|
const playlistId = $route.current.params.id;
|
|
playlistSrv.start(playlistId);
|
|
},
|
|
},
|
|
});
|
|
}
|
|
|
|
angular.module('grafana.routes').config(grafanaRoutes);
|