2016-01-16 23:26:29 +01:00
|
|
|
<navbar title="Playlists" title-url="playlists" icon="fa fa-fw fa-list" subnav="true">
|
2016-01-15 14:42:59 +01:00
|
|
|
<ul class="nav">
|
2016-01-26 19:03:43 +01:00
|
|
|
<li ng-class="{active: ctrl.isNew()}" ng-show="ctrl.isNew()"><a href="datasources/create">New</a></li>
|
|
|
|
|
<li class="active" ng-show="!ctrl.isNew()"><a href="playlists/edit/{{ctrl.playlist.id}}">{{ctrl.playlist.name}}</a></li>
|
2016-01-15 14:42:59 +01:00
|
|
|
</ul>
|
2016-01-16 23:26:29 +01:00
|
|
|
</navbar>
|
2015-12-22 02:07:15 -08:00
|
|
|
|
|
|
|
|
<div class="page-container" ng-form="playlistEditForm">
|
|
|
|
|
<div class="page">
|
2016-01-26 19:03:43 +01:00
|
|
|
<h2 ng-show="ctrl.isNew()">New playlist</h2>
|
|
|
|
|
<h2 ng-show="!ctrl.isNew()">Edit playlist</h2>
|
2016-01-04 10:16:00 +01:00
|
|
|
|
2016-01-15 14:42:59 +01:00
|
|
|
<h4>Name and interval</h4>
|
2016-01-04 10:16:00 +01:00
|
|
|
|
|
|
|
|
<div style="margin-bottom: 10px;">
|
2015-12-22 02:07:15 -08:00
|
|
|
<div>
|
|
|
|
|
<div class="tight-form">
|
|
|
|
|
<ul class="tight-form-list">
|
|
|
|
|
<li class="tight-form-item" style="width: 100px">
|
2016-01-15 14:42:59 +01:00
|
|
|
Name
|
2015-12-22 02:07:15 -08:00
|
|
|
</li>
|
|
|
|
|
<li>
|
2016-01-26 19:03:43 +01:00
|
|
|
<input type="text" required ng-model="ctrl.playlist.name" class="input-xlarge tight-form-input">
|
2015-12-22 02:07:15 -08:00
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|
2016-01-04 09:17:47 +01:00
|
|
|
<div class="tight-form last">
|
2015-12-22 02:07:15 -08:00
|
|
|
<ul class="tight-form-list">
|
|
|
|
|
<li class="tight-form-item" style="width: 100px">
|
2016-01-15 14:42:59 +01:00
|
|
|
Interval
|
2015-12-22 02:07:15 -08:00
|
|
|
</li>
|
|
|
|
|
<li>
|
2016-01-26 19:03:43 +01:00
|
|
|
<input type="text" required ng-model="ctrl.playlist.interval" placeholder="5m" class="input-xlarge tight-form-input">
|
2015-12-22 02:07:15 -08:00
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<br>
|
2016-01-15 14:42:59 +01:00
|
|
|
<h4>Add dashboards</h4>
|
2015-12-22 02:07:15 -08:00
|
|
|
|
|
|
|
|
<div style="display: inline-block">
|
2016-01-04 10:16:00 +01:00
|
|
|
<div class="tight-form last">
|
2015-12-22 02:07:15 -08:00
|
|
|
<ul class="tight-form-list">
|
2016-01-15 14:42:59 +01:00
|
|
|
<li class="tight-form-item">
|
|
|
|
|
Search
|
|
|
|
|
</li>
|
2015-12-22 02:07:15 -08:00
|
|
|
<li>
|
|
|
|
|
<input type="text"
|
|
|
|
|
class="tight-form-input input-xlarge last"
|
2016-01-26 19:03:43 +01:00
|
|
|
ng-model="ctrl.searchQuery"
|
2016-01-04 14:23:24 +01:00
|
|
|
placeholder="dashboard search term"
|
2015-12-22 02:07:15 -08:00
|
|
|
ng-trim="true"
|
2016-01-26 19:03:43 +01:00
|
|
|
ng-change="ctrl.search()">
|
2015-12-22 02:07:15 -08:00
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2016-01-15 14:42:59 +01:00
|
|
|
<div class="row">
|
2016-01-04 10:16:00 +01:00
|
|
|
<div class="span5 pull-left">
|
2016-01-26 19:03:43 +01:00
|
|
|
<h5>Search results ({{ctrl.filteredPlaylistItems.length}})</h5>
|
2015-12-28 04:24:38 -08:00
|
|
|
<table class="grafana-options-table">
|
2016-01-26 19:03:43 +01:00
|
|
|
<tr ng-repeat="playlistItem in ctrl.filteredPlaylistItems">
|
2015-12-22 02:07:15 -08:00
|
|
|
<td style="white-space: nowrap;">
|
2016-01-11 16:54:52 +01:00
|
|
|
{{playlistItem.title}}
|
2015-12-22 02:07:15 -08:00
|
|
|
</td>
|
|
|
|
|
<td style="text-align: center">
|
2016-01-26 19:03:43 +01:00
|
|
|
<button class="btn btn-inverse btn-mini pull-right" ng-click="ctrl.addPlaylistItem(playlistItem)">
|
2015-12-22 02:07:15 -08:00
|
|
|
<i class="fa fa-plus"></i>
|
|
|
|
|
Add to playlist
|
|
|
|
|
</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2016-01-26 19:03:43 +01:00
|
|
|
<tr ng-if="ctrl.isSearchResultsEmpty()">
|
2015-12-22 02:07:15 -08:00
|
|
|
<td colspan="2">
|
2015-12-28 04:24:38 -08:00
|
|
|
<i class="fa fa-warning"></i> Search results empty
|
2015-12-22 02:07:15 -08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2016-01-04 10:16:00 +01:00
|
|
|
<div class="span5 pull-left">
|
2016-01-15 14:42:59 +01:00
|
|
|
<h5>Added dashboards</h5>
|
2015-12-22 02:07:15 -08:00
|
|
|
<table class="grafana-options-table">
|
2016-01-26 19:03:43 +01:00
|
|
|
<tr ng-repeat="playlistItem in ctrl.playlistItems">
|
2015-12-22 02:07:15 -08:00
|
|
|
<td style="white-space: nowrap;">
|
2016-01-11 16:54:52 +01:00
|
|
|
{{playlistItem.title}}
|
2015-12-22 02:07:15 -08:00
|
|
|
</td>
|
2016-01-06 02:05:23 +03:00
|
|
|
<td style="text-align: right">
|
2016-01-26 19:03:43 +01:00
|
|
|
<button class="btn btn-inverse btn-mini" ng-hide="$first" ng-click="ctrl.movePlaylistItemUp(playlistItem)">
|
2016-01-06 02:05:23 +03:00
|
|
|
<i class="fa fa-arrow-up"></i>
|
|
|
|
|
</button>
|
2016-01-26 19:03:43 +01:00
|
|
|
<button class="btn btn-inverse btn-mini" ng-hide="$last" ng-click="ctrl.movePlaylistItemDown(playlistItem)">
|
2016-01-06 02:05:23 +03:00
|
|
|
<i class="fa fa-arrow-down"></i>
|
|
|
|
|
</button>
|
2016-01-26 19:03:43 +01:00
|
|
|
<button class="btn btn-inverse btn-mini" ng-click="ctrl.removePlaylistItem(playlistItem)">
|
2015-12-22 02:07:15 -08:00
|
|
|
<i class="fa fa-remove"></i>
|
|
|
|
|
</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2016-01-04 10:16:00 +01:00
|
|
|
<div class="clearfix"></div>
|
2015-12-22 02:07:15 -08:00
|
|
|
|
2016-01-04 10:16:00 +01:00
|
|
|
<div class="pull-left" style="margin-top: 25px;">
|
|
|
|
|
<!-- <div class="tight-form"> -->
|
2015-12-22 02:07:15 -08:00
|
|
|
<button type="button"
|
|
|
|
|
class="btn btn-success"
|
2016-01-26 19:03:43 +01:00
|
|
|
ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
|
|
|
|
|
ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Save</button>
|
2015-12-22 02:07:15 -08:00
|
|
|
<button type="button"
|
2016-01-15 14:42:59 +01:00
|
|
|
class="btn btn-inverse"
|
2016-01-26 19:03:43 +01:00
|
|
|
ng-click="ctrl.backToList()">Cancel</button>
|
2016-01-04 10:16:00 +01:00
|
|
|
<!-- </div> -->
|
2015-12-22 02:07:15 -08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|