chore(playlist): cleanup some code

pull/3882/head
bergquist 9 years ago
parent 85ad5f1d37
commit f36ade2959
  1. 2
      public/app/features/playlist/partials/playlist_search.html
  2. 21
      public/app/features/playlist/playlist_search.ts
  3. 8
      public/less/playlist.less

@ -1,6 +1,6 @@
<div class="playlist-search-field-wrapper">
<span style="position: relative;">
<input type="text" placeholder="Find dashboards by name" give-focus="ctrl.giveSearchFocus" tabindex="1"
<input type="text" placeholder="Find dashboards by name" tabindex="1"
ng-keydown="ctrl.keyDown($event)" ng-model="ctrl.query.query" ng-model-options="{ debounce: 500 }" spellcheck='false' ng-change="ctrl.searchDashboards()" />
</span>
<div class="playlist-search-switches">

@ -26,12 +26,6 @@ export class PlaylistSearchCtrl {
this.tagsMode = false;
var prom: any = {};
/*
prom.promise = this.backendSrv.search(this.query).then((results) => {
console.log('playlist_search_ctrl: ', results);
return results;
});
*/
prom.promise = this.backendSrv.search(this.query).then((result) => {
return {
dashboardResult: result,
@ -42,6 +36,11 @@ export class PlaylistSearchCtrl {
this.searchStarted(prom);
}
showStarred() {
this.query.starred = !this.query.starred;
this.searchDashboards();
};
queryHasNoFilters() {
return this.query.query === '' && this.query.starred === false && this.query.tag.length === 0;
};
@ -66,16 +65,6 @@ export class PlaylistSearchCtrl {
});
this.searchStarted(prom);
/*
this.searchStarted(prom);
return this.backendSrv.get('/api/dashboards/tags').then((results) => {
this.tagsMode = true;
console.log(results);
});
*/
};
}

@ -1,15 +1,10 @@
.playlist-search-container {
//left: 59px;
//top: 39px;
margin: 15px;
z-index: 1000;
//position: relative;
position: relative;
width: 700px;
box-shadow: 0px 0px 55px 0px black;
//padding: 10px;
background-color: @grafanaPanelBackground;
//border: 1px solid @grafanaTargetFuncBackground;
.label-tag {
margin-left: 6px;
@ -21,11 +16,10 @@
.playlist-search-switches {
position: relative;
top: -39px;
right: -268px;
left: 260px;
}
.playlist-search-field-wrapper {
//padding-bottom: 10px;
input {
width: 100%;
padding: 8px 8px;

Loading…
Cancel
Save