2016-02-13 14:32:20 +01:00
|
|
|
<navbar icon="fa fa-fw fa-list" title="Playlist">
|
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-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-20 14:48:10 +01:00
|
|
|
<div class="max-width-28">
|
2016-02-19 13:53:29 +01:00
|
|
|
<h5 class="page-headering">Add dashboards</h5>
|
2016-02-15 18:04:45 +01:00
|
|
|
<div style="">
|
|
|
|
|
<playlist-search class="playlist-search-container" search-started="ctrl.searchStarted(promise)"></playlist-search>
|
|
|
|
|
</div>
|
2016-02-13 22:12:15 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2015-12-22 02:07:15 -08:00
|
|
|
|
2016-02-13 22:12:15 +01:00
|
|
|
<div class="row">
|
2016-02-19 13:53:29 +01:00
|
|
|
<div class="col-md-6">
|
|
|
|
|
<h5>Search results ({{ctrl.filteredDashboards.length + ctrl.filteredTags.length}})</h5>
|
2016-02-15 18:04:45 +01:00
|
|
|
<div ng-if="ctrl.filteredDashboards.length > 0">
|
|
|
|
|
<table class="grafana-options-table">
|
|
|
|
|
<tr ng-repeat="playlistItem in ctrl.filteredDashboards">
|
|
|
|
|
<td style="white-space: nowrap;">
|
|
|
|
|
{{playlistItem.title}}
|
|
|
|
|
</td>
|
|
|
|
|
<td style="text-align: center">
|
|
|
|
|
<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-13 22:12:15 +01:00
|
|
|
<div ng-repeat="tag in ctrl.filteredTags" class="pointer" style="width: 180px; float: left;"
|
|
|
|
|
ng-click="ctrl.addTagPlaylistItem(tag, $event)">
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-02-15 18:04:45 +01:00
|
|
|
|
2016-02-19 13:53:29 +01:00
|
|
|
<div class="col-md-6">
|
2016-02-13 22:12:15 +01:00
|
|
|
<h5>Added dashboards</h5>
|
|
|
|
|
<table class="grafana-options-table">
|
|
|
|
|
<tr ng-repeat="playlistItem in ctrl.playlistItems">
|
|
|
|
|
<td style="white-space: nowrap;" ng-if="playlistItem.type === 'dashboard_by_id'">
|
|
|
|
|
{{playlistItem.title}}
|
|
|
|
|
</td>
|
|
|
|
|
<td style="white-space: nowrap;" 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-01-28 23:04:22 +01:00
|
|
|
|
2016-02-13 22:12:15 +01:00
|
|
|
<td style="text-align: right">
|
|
|
|
|
<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-15 18:04:45 +01:00
|
|
|
<a class="btn btn-success"
|
|
|
|
|
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>
|