Commit f36ade29 by bergquist

chore(playlist): cleanup some code

parent 85ad5f1d
<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);
});
*/
};
}
......
.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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment