|
@@ -1,14 +1,14 @@
|
|
|
<navbar title="Playlists" title-url="playlists" icon="fa fa-fw fa-list" subnav="true">
|
|
<navbar title="Playlists" title-url="playlists" icon="fa fa-fw fa-list" subnav="true">
|
|
|
<ul class="nav">
|
|
<ul class="nav">
|
|
|
- <li ng-class="{active: isNew()}" ng-show="isNew()"><a href="datasources/create">New</a></li>
|
|
|
|
|
- <li class="active" ng-show="!isNew()"><a href="playlists/edit/{{playlist.id}}">{{playlist.name}}</a></li>
|
|
|
|
|
|
|
+ <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>
|
|
|
</ul>
|
|
</ul>
|
|
|
</navbar>
|
|
</navbar>
|
|
|
|
|
|
|
|
<div class="page-container" ng-form="playlistEditForm">
|
|
<div class="page-container" ng-form="playlistEditForm">
|
|
|
<div class="page">
|
|
<div class="page">
|
|
|
- <h2 ng-show="isNew()">New playlist</h2>
|
|
|
|
|
- <h2 ng-show="!isNew()">Edit playlist</h2>
|
|
|
|
|
|
|
+ <h2 ng-show="ctrl.isNew()">New playlist</h2>
|
|
|
|
|
+ <h2 ng-show="!ctrl.isNew()">Edit playlist</h2>
|
|
|
|
|
|
|
|
<h4>Name and interval</h4>
|
|
<h4>Name and interval</h4>
|
|
|
|
|
|
|
@@ -20,7 +20,7 @@
|
|
|
Name
|
|
Name
|
|
|
</li>
|
|
</li>
|
|
|
<li>
|
|
<li>
|
|
|
- <input type="text" required ng-model="playlist.name" class="input-xlarge tight-form-input">
|
|
|
|
|
|
|
+ <input type="text" required ng-model="ctrl.playlist.name" class="input-xlarge tight-form-input">
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
<div class="clearfix"></div>
|
|
@@ -31,7 +31,7 @@
|
|
|
Interval
|
|
Interval
|
|
|
</li>
|
|
</li>
|
|
|
<li>
|
|
<li>
|
|
|
- <input type="text" required ng-model="playlist.interval" placeholder="5m" class="input-xlarge tight-form-input">
|
|
|
|
|
|
|
+ <input type="text" required ng-model="ctrl.playlist.interval" placeholder="5m" class="input-xlarge tight-form-input">
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
<div class="clearfix"></div>
|
|
@@ -50,10 +50,10 @@
|
|
|
<li>
|
|
<li>
|
|
|
<input type="text"
|
|
<input type="text"
|
|
|
class="tight-form-input input-xlarge last"
|
|
class="tight-form-input input-xlarge last"
|
|
|
- ng-model="searchQuery"
|
|
|
|
|
|
|
+ ng-model="ctrl.searchQuery"
|
|
|
placeholder="dashboard search term"
|
|
placeholder="dashboard search term"
|
|
|
ng-trim="true"
|
|
ng-trim="true"
|
|
|
- ng-change="search()">
|
|
|
|
|
|
|
+ ng-change="ctrl.search()">
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
<div class="clearfix"></div>
|
|
@@ -64,20 +64,20 @@
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="span5 pull-left">
|
|
<div class="span5 pull-left">
|
|
|
- <h5>Search results ({{filteredPlaylistItems.length}})</h5>
|
|
|
|
|
|
|
+ <h5>Search results ({{ctrl.filteredPlaylistItems.length}})</h5>
|
|
|
<table class="grafana-options-table">
|
|
<table class="grafana-options-table">
|
|
|
- <tr ng-repeat="playlistItem in filteredPlaylistItems">
|
|
|
|
|
|
|
+ <tr ng-repeat="playlistItem in ctrl.filteredPlaylistItems">
|
|
|
<td style="white-space: nowrap;">
|
|
<td style="white-space: nowrap;">
|
|
|
{{playlistItem.title}}
|
|
{{playlistItem.title}}
|
|
|
</td>
|
|
</td>
|
|
|
<td style="text-align: center">
|
|
<td style="text-align: center">
|
|
|
- <button class="btn btn-inverse btn-mini pull-right" ng-click="addPlaylistItem(playlistItem)">
|
|
|
|
|
|
|
+ <button class="btn btn-inverse btn-mini pull-right" ng-click="ctrl.addPlaylistItem(playlistItem)">
|
|
|
<i class="fa fa-plus"></i>
|
|
<i class="fa fa-plus"></i>
|
|
|
Add to playlist
|
|
Add to playlist
|
|
|
</button>
|
|
</button>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
- <tr ng-if="isSearchResultsEmpty()">
|
|
|
|
|
|
|
+ <tr ng-if="ctrl.isSearchResultsEmpty()">
|
|
|
<td colspan="2">
|
|
<td colspan="2">
|
|
|
<i class="fa fa-warning"></i> Search results empty
|
|
<i class="fa fa-warning"></i> Search results empty
|
|
|
</td>
|
|
</td>
|
|
@@ -87,18 +87,18 @@
|
|
|
<div class="span5 pull-left">
|
|
<div class="span5 pull-left">
|
|
|
<h5>Added dashboards</h5>
|
|
<h5>Added dashboards</h5>
|
|
|
<table class="grafana-options-table">
|
|
<table class="grafana-options-table">
|
|
|
- <tr ng-repeat="playlistItem in playlistItems">
|
|
|
|
|
|
|
+ <tr ng-repeat="playlistItem in ctrl.playlistItems">
|
|
|
<td style="white-space: nowrap;">
|
|
<td style="white-space: nowrap;">
|
|
|
{{playlistItem.title}}
|
|
{{playlistItem.title}}
|
|
|
</td>
|
|
</td>
|
|
|
<td style="text-align: right">
|
|
<td style="text-align: right">
|
|
|
- <button class="btn btn-inverse btn-mini" ng-hide="$first" ng-click="movePlaylistItemUp(playlistItem)">
|
|
|
|
|
|
|
+ <button class="btn btn-inverse btn-mini" ng-hide="$first" ng-click="ctrl.movePlaylistItemUp(playlistItem)">
|
|
|
<i class="fa fa-arrow-up"></i>
|
|
<i class="fa fa-arrow-up"></i>
|
|
|
</button>
|
|
</button>
|
|
|
- <button class="btn btn-inverse btn-mini" ng-hide="$last" ng-click="movePlaylistItemDown(playlistItem)">
|
|
|
|
|
|
|
+ <button class="btn btn-inverse btn-mini" ng-hide="$last" ng-click="ctrl.movePlaylistItemDown(playlistItem)">
|
|
|
<i class="fa fa-arrow-down"></i>
|
|
<i class="fa fa-arrow-down"></i>
|
|
|
</button>
|
|
</button>
|
|
|
- <button class="btn btn-inverse btn-mini" ng-click="removePlaylistItem(playlistItem)">
|
|
|
|
|
|
|
+ <button class="btn btn-inverse btn-mini" ng-click="ctrl.removePlaylistItem(playlistItem)">
|
|
|
<i class="fa fa-remove"></i>
|
|
<i class="fa fa-remove"></i>
|
|
|
</button>
|
|
</button>
|
|
|
</td>
|
|
</td>
|
|
@@ -113,11 +113,11 @@
|
|
|
<!-- <div class="tight-form"> -->
|
|
<!-- <div class="tight-form"> -->
|
|
|
<button type="button"
|
|
<button type="button"
|
|
|
class="btn btn-success"
|
|
class="btn btn-success"
|
|
|
- ng-disabled="playlistEditForm.$invalid || isPlaylistEmpty()"
|
|
|
|
|
- ng-click="savePlaylist(playlist, playlistItems)">Save</button>
|
|
|
|
|
|
|
+ ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
|
|
|
|
|
+ ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Save</button>
|
|
|
<button type="button"
|
|
<button type="button"
|
|
|
class="btn btn-inverse"
|
|
class="btn btn-inverse"
|
|
|
- ng-click="backToList()">Cancel</button>
|
|
|
|
|
|
|
+ ng-click="ctrl.backToList()">Cancel</button>
|
|
|
<!-- </div> -->
|
|
<!-- </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|