@ -1,9 +1,9 @@
< page-header model = "ctrl.navModel" > < / page-header >
< div class = "page-container page-body" ng-form = "playlistEditForm" >
< div class = "page-container page-body" ng-form = "ctrl. playlistEditForm" >
< h3 class = "page-sub-heading" ng-hide = "ctrl.isNew" > Edit Playlist< / h3 >
< h3 class = "page-sub-heading" ng-show = "ctrl.isNew" > New Playlist< / h3 >
< h3 class = "page-sub-heading" ng-hide = "ctrl.isNew" > Edit Playlist< / h3 >
< h3 class = "page-sub-heading" ng-show = "ctrl.isNew" > New Playlist< / h3 >
< 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 >
@ -20,79 +20,71 @@
< div class = "gf-form-group" >
< h3 class = "page-headering" > Dashboards< / h3 >
< / div >
< div class = "row" >
< div class = "col-lg-6" >
< 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 >
< table class = "filter-table playlist-available-list" >
< tr ng-repeat = "playlistItem in ctrl.playlistItems" >
< td ng-if = "playlistItem.type === 'dashboard_by_id'" >
< i class = "icon-gf icon-gf-dashboard" > < / i > {{playlistItem.title}}
< / 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 >
< div ng-if = "ctrl.filteredDashboards.length > 0" >
< table class = "filter-table playlist-available-list" >
< tr ng-repeat = "playlistItem in ctrl.filteredDashboards" >
< td >
< i class = "icon-gf icon-gf-dashboard" > < / i >
{{playlistItem.title}}
< i class = "fa fa-star" ng-show = "playlistItem.isStarred" > < / i >
< / td >
< td class = "add-dashboard" >
< 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 >
< / 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" >
< i class = "fa fa-tag" > < / i >
< span > {{tag.term}} ({{tag.count}})< / span >
< / a >
< / td >
< td class = "add-dashboard" >
< button class = "btn btn-inverse btn-mini pull-right" ng-click = "ctrl.addTagPlaylistItem(tag)" >
< i class = "fa fa-plus" > < / i >
Add to playlist
< / button >
< / td >
< / tr >
< / table >
< / div >
< / div >
< td class = "selected-playlistitem-settings" >
< 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 >
< tr ng-if = "ctrl.playlistItems.length === 0" >
< td > < em > Playlist is empty, add dashboards below.< / em > < / td >
< / tr >
< / table >
< / div >
< div class = "col-lg-6" >
< h5 class = "page headering playlist-column-header" > Selected< / h5 >
< 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" >
< table class = "filter-table playlist-available-list" >
< tr ng-repeat = "playlistItem in ctrl.playlistItems" >
< td ng-if = "playlistItem.type === 'dashboard_by_id'" >
< i class = "icon-gf icon-gf-dashboard" > < / i > {{playlistItem.title}}
< tr ng-repeat = "playlistItem in ctrl.filteredDashboards" >
< td >
< i class = "icon-gf icon-gf-dashboard" > < / i >
{{playlistItem.title}}
< i class = "fa fa-star" ng-show = "playlistItem.isStarred" > < / i >
< / td >
< td class = "add-dashboard" >
< 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 >
< td ng-if = "playlistItem.type === 'dashboard_by_tag'" >
< a class = "search-result-tag label label-tag" tag-color-from-name = "playlistItem.title" >
< / 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" >
< i class = "fa fa-tag" > < / i >
< span > {{playlistItem.title}}< / span >
< span > {{tag.term}} ({{tag.count}}) < / span >
< / a >
< / td >
< td class = "selected-playlistitem-settings" >
< 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 >
< td class = "add-dashboard" >
< button class = "btn btn-inverse btn-mini pull-right" ng-click = "ctrl.addTagPlaylistItem(tag)" >
< i class = "fa fa-plus" > < / i >
Add to playlist
< / button >
< / td >
< / tr >
@ -103,12 +95,8 @@
< div class = "clearfix" > < / div >
< div class = "gf-form-button-row" >
< a class = "btn btn-success " ng-show = "ctrl.isNew"
ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Create new playlist< / a >
< a class = "btn btn-success" ng-show = "!ctrl.isNew()"
ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Save< / a >
< a class = "btn btn-success" 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-success" ng-show = "!ctrl.isNew" 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 >
< / div >
< / div >