2017-12-01 04:32:00 -06:00
< page-header model = "ctrl.navModel" > < / page-header >
2015-12-22 04:07:15 -06:00
2018-08-30 04:52:31 -05:00
< div class = "page-container page-body" ng-form = "ctrl.playlistEditForm" >
2017-12-01 04:32:00 -06:00
2018-08-30 04:52:31 -05:00
< h3 class = "page-sub-heading" ng-hide = "ctrl.isNew" > Edit Playlist< / h3 >
< h3 class = "page-sub-heading" ng-show = "ctrl.isNew" > New Playlist< / h3 >
2016-01-04 03:16:00 -06:00
2016-02-22 04:29:09 -06: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 15:12:15 -06:00
< div class = "gf-form-group" >
< div class = "gf-form" >
2016-02-20 07:21:39 -06:00
< span class = "gf-form-label width-7" > Name< / span >
2016-02-20 07:48:10 -06:00
< input type = "text" required ng-model = "ctrl.playlist.name" class = "gf-form-input max-width-21" >
2016-02-13 15:12:15 -06:00
< / div >
< div class = "gf-form" >
2016-02-20 07:21:39 -06:00
< span class = "gf-form-label width-7" > Interval< / span >
2016-02-20 07:48:10 -06:00
< input type = "text" required ng-model = "ctrl.playlist.interval" placeholder = "5m" class = "gf-form-input max-width-21" >
2016-02-13 15:12:15 -06:00
< / div >
< / div >
2015-12-22 04:07:15 -06:00
2016-02-19 06:53:29 -06:00
< div class = "gf-form-group" >
2016-02-22 04:29:09 -06:00
< h3 class = "page-headering" > Dashboards< / h3 >
2015-12-22 04:07:15 -06:00
2018-08-30 04:52:31 -05:00
< table class = "filter-table playlist-available-list" >
< tr ng-repeat = "playlistItem in ctrl.playlistItems" >
< td ng-if = "playlistItem.type === 'dashboard_by_id'" >
2019-04-17 08:18:32 -05:00
< i class = "gicon gicon-dashboard" > < / i > {{playlistItem.title}}
2018-08-30 04:52:31 -05:00
< / td >
< td ng-if = "playlistItem.type === 'dashboard_by_tag'" >
< 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-02-22 04:29:09 -06:00
2018-08-30 04:52:31 -05:00
< td class = "selected-playlistitem-settings" >
2019-04-08 02:48:15 -05:00
< button class = "btn btn-inverse btn-small" ng-hide = "$first" ng-click = "ctrl.movePlaylistItemUp(playlistItem)" >
2018-08-30 04:52:31 -05:00
< i class = "fa fa-arrow-up" > < / i >
< / button >
2019-04-08 02:48:15 -05:00
< button class = "btn btn-inverse btn-small" ng-hide = "$last" ng-click = "ctrl.movePlaylistItemDown(playlistItem)" >
2018-08-30 04:52:31 -05:00
< i class = "fa fa-arrow-down" > < / i >
< / button >
2019-04-08 02:48:15 -05:00
< button class = "btn btn-inverse btn-small" ng-click = "ctrl.removePlaylistItem(playlistItem)" >
2018-08-30 04:52:31 -05:00
< i class = "fa fa-remove" > < / i >
< / button >
< / td >
< / tr >
< tr ng-if = "ctrl.playlistItems.length === 0" >
< td > < em > Playlist is empty, add dashboards below.< / em > < / td >
< / tr >
< / table >
< / div >
2016-02-15 11:04:45 -06:00
2018-08-30 04:52:31 -05:00
< div class = "gf-form-group" >
< h3 class = "page-headering" > Add dashboards< / h3 >
< playlist-search class = "playlist-search-container" search-started = "ctrl.searchStarted(promise)" > < / playlist-search >
< div ng-if = "ctrl.filteredDashboards.length > 0" >
2017-12-14 07:30:13 -06:00
< table class = "filter-table playlist-available-list" >
2018-08-30 04:52:31 -05:00
< tr ng-repeat = "playlistItem in ctrl.filteredDashboards" >
< td >
2019-04-17 08:18:32 -05:00
< i class = "gicon gicon-dashboard" > < / i >
2018-08-30 04:52:31 -05:00
{{playlistItem.title}}
< i class = "fa fa-star" ng-show = "playlistItem.isStarred" > < / i >
< / td >
< td class = "add-dashboard" >
2019-04-08 02:48:15 -05:00
< button class = "btn btn-inverse btn-small pull-right" ng-click = "ctrl.addPlaylistItem(playlistItem)" >
2018-08-30 04:52:31 -05:00
< i class = "fa fa-plus" > < / i >
Add to playlist
< / button >
2016-02-13 15:12:15 -06:00
< / td >
2018-08-30 04:52:31 -05:00
< / tr >
< / table >
< / div >
< div class = "playlist-search-results-container" ng-if = "ctrl.filteredTags.length > 0;" >
< table class = "filter-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" >
2016-02-13 15:12:15 -06:00
< i class = "fa fa-tag" > < / i >
2018-08-30 04:52:31 -05:00
< span > {{tag.term}} ({{tag.count}})< / span >
2016-02-13 15:12:15 -06:00
< / a >
< / td >
2018-08-30 04:52:31 -05:00
< td class = "add-dashboard" >
2019-04-08 02:48:15 -05:00
< button class = "btn btn-inverse btn-small pull-right" ng-click = "ctrl.addTagPlaylistItem(tag)" >
2018-08-30 04:52:31 -05:00
< i class = "fa fa-plus" > < / i >
Add to playlist
2016-02-13 15:12:15 -06:00
< / button >
< / td >
< / tr >
< / table >
< / div >
< / div >
2015-12-22 04:07:15 -06:00
2016-02-13 15:12:15 -06:00
< div class = "clearfix" > < / div >
2015-12-22 04:07:15 -06:00
2016-02-19 06:53:29 -06:00
< div class = "gf-form-button-row" >
2019-02-05 05:05:02 -06:00
< a class = "btn btn-primary" ng-show = "ctrl.isNew" ng-disabled = "ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()" ng-click = "ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)" > Create< / a >
< a class = "btn btn-primary" ng-show = "!ctrl.isNew" ng-disabled = "ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()" ng-click = "ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)" > Save< / a >
2016-02-15 11:04:45 -06:00
< a class = "btn-text" ng-click = "ctrl.backToList()" > Cancel< / a >
2016-02-13 15:12:15 -06:00
< / div >
2015-12-22 04:07:15 -06:00
< / div >
2020-01-09 04:25:52 -06:00
< footer / >