Commit f36ade29 by bergquist

chore(playlist): cleanup some code

parent 85ad5f1d
<div class="playlist-search-field-wrapper"> <div class="playlist-search-field-wrapper">
<span style="position: relative;"> <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()" /> ng-keydown="ctrl.keyDown($event)" ng-model="ctrl.query.query" ng-model-options="{ debounce: 500 }" spellcheck='false' ng-change="ctrl.searchDashboards()" />
</span> </span>
<div class="playlist-search-switches"> <div class="playlist-search-switches">
......
...@@ -26,12 +26,6 @@ export class PlaylistSearchCtrl { ...@@ -26,12 +26,6 @@ export class PlaylistSearchCtrl {
this.tagsMode = false; this.tagsMode = false;
var prom: any = {}; 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) => { prom.promise = this.backendSrv.search(this.query).then((result) => {
return { return {
dashboardResult: result, dashboardResult: result,
...@@ -42,6 +36,11 @@ export class PlaylistSearchCtrl { ...@@ -42,6 +36,11 @@ export class PlaylistSearchCtrl {
this.searchStarted(prom); this.searchStarted(prom);
} }
showStarred() {
this.query.starred = !this.query.starred;
this.searchDashboards();
};
queryHasNoFilters() { queryHasNoFilters() {
return this.query.query === '' && this.query.starred === false && this.query.tag.length === 0; return this.query.query === '' && this.query.starred === false && this.query.tag.length === 0;
}; };
...@@ -66,16 +65,6 @@ export class PlaylistSearchCtrl { ...@@ -66,16 +65,6 @@ export class PlaylistSearchCtrl {
}); });
this.searchStarted(prom); this.searchStarted(prom);
/*
this.searchStarted(prom);
return this.backendSrv.get('/api/dashboards/tags').then((results) => {
this.tagsMode = true;
console.log(results);
});
*/
}; };
} }
......
.playlist-search-container { .playlist-search-container {
//left: 59px;
//top: 39px;
margin: 15px; margin: 15px;
z-index: 1000; z-index: 1000;
//position: relative;
position: relative; position: relative;
width: 700px; width: 700px;
box-shadow: 0px 0px 55px 0px black; box-shadow: 0px 0px 55px 0px black;
//padding: 10px;
background-color: @grafanaPanelBackground; background-color: @grafanaPanelBackground;
//border: 1px solid @grafanaTargetFuncBackground;
.label-tag { .label-tag {
margin-left: 6px; margin-left: 6px;
...@@ -21,11 +16,10 @@ ...@@ -21,11 +16,10 @@
.playlist-search-switches { .playlist-search-switches {
position: relative; position: relative;
top: -39px; top: -39px;
right: -268px; left: 260px;
} }
.playlist-search-field-wrapper { .playlist-search-field-wrapper {
//padding-bottom: 10px;
input { input {
width: 100%; width: 100%;
padding: 8px 8px; 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