2016-02-27 00:40:39 -08:00
< navbar icon = "fa fa-fw fa-list" title = "Playlists" title-url = "playlists" >
2016-02-12 17:20:58 -05:00
< / navbar >
2015-12-22 02:07:15 -08:00
< div class = "page-container" ng-form = "playlistEditForm" >
2016-02-19 13:53:29 +01:00
< div class = "page-header" >
< h1 ng-show = "ctrl.isNew()" > New Playlist< / h1 >
< h1 ng-show = "!ctrl.isNew()" > Edit Playlist< / h1 >
< / div >
2016-01-04 10:16:00 +01:00
2016-02-22 11:29:09 +01:00
< p class = "playlist-description" > A playlist rotates through a pre-selected list of Dashboards. A Playlist can be a great way to build situational awareness, or just show off your metrics to your team or visitors.< / p >
2016-02-13 22:12:15 +01:00
< div class = "gf-form-group" >
< div class = "gf-form" >
2016-02-20 14:21:39 +01:00
< span class = "gf-form-label width-7" > Name< / span >
2016-02-20 14:48:10 +01:00
< input type = "text" required ng-model = "ctrl.playlist.name" class = "gf-form-input max-width-21" >
2016-02-13 22:12:15 +01:00
< / div >
< div class = "gf-form" >
2016-02-20 14:21:39 +01:00
< span class = "gf-form-label width-7" > Interval< / span >
2016-02-20 14:48:10 +01:00
< input type = "text" required ng-model = "ctrl.playlist.interval" placeholder = "5m" class = "gf-form-input max-width-21" >
2016-02-13 22:12:15 +01:00
< / div >
< / div >
2015-12-22 02:07:15 -08:00
2016-02-19 13:53:29 +01:00
< div class = "gf-form-group" >
2016-02-22 11:29:09 +01:00
< h3 class = "page-headering" > Dashboards< / h3 >
2016-02-13 22:12:15 +01:00
< / div >
2015-12-22 02:07:15 -08:00
2016-02-13 22:12:15 +01:00
< div class = "row" >
2016-09-22 10:00:09 +02:00
< div class = "col-lg-6" >
2016-02-22 11:29:09 +01:00
< div class = "playlist-search-containerwrapper" >
< div class = "max-width-32" >
< h5 class = "page-headering playlist-column-header" > Available< / h5 >
< div style = "" >
< playlist-search class = "playlist-search-container" search-started = "ctrl.searchStarted(promise)" > < / playlist-search >
< / div >
< / div >
< / div >
2016-02-15 18:04:45 +01:00
< div ng-if = "ctrl.filteredDashboards.length > 0" >
2016-02-22 11:29:09 +01:00
< table class = "grafana-options-table playlist-available-list" >
2016-02-15 18:04:45 +01:00
< tr ng-repeat = "playlistItem in ctrl.filteredDashboards" >
2016-02-22 11:29:09 +01:00
< td >
2016-02-22 16:45:14 +01:00
< i class = "icon-gf icon-gf-dashboard" > < / i >
{{playlistItem.title}}
< i class = "fa fa-star" ng-show = "playlistItem.isStarred" > < / i >
2016-02-15 18:04:45 +01:00
< / td >
2016-02-22 11:29:09 +01:00
< td class = "add-dashboard" >
2016-02-15 18:04:45 +01:00
< button class = "btn btn-inverse btn-mini pull-right" ng-click = "ctrl.addPlaylistItem(playlistItem)" >
< i class = "fa fa-plus" > < / i >
Add to playlist
< / button >
< / td >
< / tr >
< / table >
2016-02-19 13:53:29 +01:00
< / div >
< div class = "playlist-search-results-container" ng-if = "ctrl.filteredTags.length > 0;" >
2016-02-22 16:45:14 +01:00
< table class = "grafana-options-table playlist-available-list" >
< tr ng-repeat = "tag in ctrl.filteredTags" >
< td >
< a class = "search-result-tag label label-tag" tag-color-from-name = "tag.term" >
< i class = "fa fa-tag" > < / i >
< span > {{tag.term}} ({{tag.count}})< / span >
< / a >
< / td >
< td class = "add-dashboard" >
2016-03-07 11:10:10 +01:00
< button class = "btn btn-inverse btn-mini pull-right" ng-click = "ctrl.addTagPlaylistItem(tag)" >
2016-02-22 16:45:14 +01:00
< i class = "fa fa-plus" > < / i >
Add to playlist
< / button >
< / td >
< / tr >
< / table >
< / div >
2016-02-13 22:12:15 +01:00
< / div >
2016-02-15 18:04:45 +01:00
2016-09-22 10:00:09 +02:00
< div class = "col-lg-6" >
2016-02-22 11:29:09 +01:00
< h5 class = "page headering playlist-column-header" > Selected< / h5 >
< table class = "grafana-options-table playlist-available-list" >
2016-02-13 22:12:15 +01:00
< tr ng-repeat = "playlistItem in ctrl.playlistItems" >
2016-02-22 11:29:09 +01:00
< td ng-if = "playlistItem.type === 'dashboard_by_id'" >
< i class = "icon-gf icon-gf-dashboard" > < / i > {{playlistItem.title}}
2016-02-13 22:12:15 +01:00
< / td >
2016-02-22 11:29:09 +01:00
< td ng-if = "playlistItem.type === 'dashboard_by_tag'" >
2016-02-13 22:12:15 +01:00
< a class = "search-result-tag label label-tag" tag-color-from-name = "playlistItem.title" >
< i class = "fa fa-tag" > < / i >
< span > {{playlistItem.title}}< / span >
< / a >
< / td >
2016-01-28 23:04:22 +01:00
2016-02-22 11:29:09 +01:00
< td class = "selected-playlistitem-settings" >
2016-02-13 22:12:15 +01:00
< button class = "btn btn-inverse btn-mini" ng-hide = "$first" ng-click = "ctrl.movePlaylistItemUp(playlistItem)" >
< i class = "fa fa-arrow-up" > < / i >
< / button >
< button class = "btn btn-inverse btn-mini" ng-hide = "$last" ng-click = "ctrl.movePlaylistItemDown(playlistItem)" >
< i class = "fa fa-arrow-down" > < / i >
< / button >
< button class = "btn btn-inverse btn-mini" ng-click = "ctrl.removePlaylistItem(playlistItem)" >
< i class = "fa fa-remove" > < / i >
< / button >
< / td >
< / tr >
< / table >
< / div >
< / div >
2015-12-22 02:07:15 -08:00
2016-02-13 22:12:15 +01:00
< div class = "clearfix" > < / div >
2015-12-22 02:07:15 -08:00
2016-02-19 13:53:29 +01:00
< div class = "gf-form-button-row" >
2016-02-22 11:29:09 +01:00
< a class = "btn btn-success " ng-show = "ctrl.isNew()"
ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
2016-02-22 14:30:35 -05:00
ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Create new playlist< / a >
2016-02-22 11:29:09 +01:00
< a class = "btn btn-success" ng-show = "!ctrl.isNew()"
2016-02-15 18:04:45 +01:00
ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Save< / a >
< a class = "btn-text" ng-click = "ctrl.backToList()" > Cancel< / a >
2016-02-13 22:12:15 +01:00
< / div >
2015-12-22 02:07:15 -08:00
< / div >