mirror of https://github.com/grafana/grafana.git
Merge branch 'develop' of github.com:grafana/grafana into develop
This commit is contained in:
commit
69305c20a0
|
|
@ -1,4 +1,5 @@
|
||||||
<div class="page-action-bar" ng-hide="!ctrl.hasFilters && ctrl.sections.length === 0">
|
<div class="dashboard-list">
|
||||||
|
<div class="page-action-bar page-action-bar--narrow" ng-hide="!ctrl.hasFilters && ctrl.sections.length === 0">
|
||||||
<label class="gf-form gf-form--grow gf-form--has-input-icon">
|
<label class="gf-form gf-form--grow gf-form--has-input-icon">
|
||||||
<input type="text" class="gf-form-input max-width-30" placeholder="Find Dashboard by name" tabindex="1" give-focus="true" ng-model="ctrl.query.query" ng-model-options="{ debounce: 500 }" spellcheck='false' ng-change="ctrl.onQueryChange()" />
|
<input type="text" class="gf-form-input max-width-30" placeholder="Find Dashboard by name" tabindex="1" give-focus="true" ng-model="ctrl.query.query" ng-model-options="{ debounce: 500 }" spellcheck='false' ng-change="ctrl.onQueryChange()" />
|
||||||
<i class="gf-form-input-icon fa fa-search"></i>
|
<i class="gf-form-input-icon fa fa-search"></i>
|
||||||
|
|
@ -12,30 +13,46 @@
|
||||||
<i class="fa fa-plus"></i>
|
<i class="fa fa-plus"></i>
|
||||||
Folder
|
Folder
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gf-form" ng-if="ctrl.query.tag.length">
|
<div class="page-action-bar page-action-bar--narrow" ng-show="ctrl.hasFilters">
|
||||||
Filters:
|
<div class="gf-form-inline">
|
||||||
|
<div class="gf-form" ng-show="ctrl.query.tag.length > 0">
|
||||||
|
<label class="gf-form-label width-4">
|
||||||
|
Tags
|
||||||
|
</label>
|
||||||
|
<div class="gf-form-input gf-form-input--plaintext" ng-show="ctrl.query.tag.length > 0">
|
||||||
<span ng-repeat="tagName in ctrl.query.tag">
|
<span ng-repeat="tagName in ctrl.query.tag">
|
||||||
<a ng-click="ctrl.removeTag(tagName, $event)" tag-color-from-name="tagName" class="label label-tag">
|
<a ng-click="ctrl.removeTag(tagName, $event)" tag-color-from-name="tagName" class="tag label label-tag">
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i> {{tagName}}
|
||||||
{{tagName}}
|
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="gf-form">
|
|
||||||
<div class="gf-form-button-row" ng-show="ctrl.hasFilters">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn gf-form-button btn-inverse btn-small"
|
|
||||||
ng-click="ctrl.clearFilters()">
|
|
||||||
<i class="fa fa-close"></i> Clear current search query and filters
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="gf-form" ng-show="ctrl.query.starred">
|
||||||
|
<label class="gf-form-label">
|
||||||
|
<a class="pointer" ng-click="ctrl.removeStarred()">
|
||||||
|
<i class="fa fa-fw fa-check"></i> Starred
|
||||||
|
</a>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="gf-form">
|
||||||
|
<label class="gf-form-label">
|
||||||
|
<a class="pointer" ng-click="ctrl.clearFilters()" bs-tooltip="'Clear current search query and filters'">
|
||||||
|
<i class="fa fa-remove"></i> Clear
|
||||||
|
</a>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="dashboard-list" ng-show="ctrl.sections.length > 0">
|
<div class="search-results" ng-show="ctrl.hasFilters && ctrl.sections.length === 0">
|
||||||
|
<em class="muted">
|
||||||
|
No dashboards matching your query were found.
|
||||||
|
</em>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" ng-show="ctrl.sections.length > 0">
|
||||||
<div class="search-results-filter-row">
|
<div class="search-results-filter-row">
|
||||||
<gf-form-switch
|
<gf-form-switch
|
||||||
on-change="ctrl.onSelectAllChanged()"
|
on-change="ctrl.onSelectAllChanged()"
|
||||||
|
|
@ -82,6 +99,7 @@
|
||||||
on-selection-changed="ctrl.selectionChanged()"
|
on-selection-changed="ctrl.selectionChanged()"
|
||||||
on-tag-selected="ctrl.filterByTag($tag)" />
|
on-tag-selected="ctrl.filterByTag($tag)" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-if="ctrl.folderId && !ctrl.hasFilters && ctrl.sections.length === 0">
|
<div ng-if="ctrl.folderId && !ctrl.hasFilters && ctrl.sections.length === 0">
|
||||||
|
|
|
||||||
|
|
@ -231,8 +231,14 @@ export class ManageDashboardsCtrl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeStarred() {
|
||||||
|
this.query.starred = false;
|
||||||
|
return this.getDashboards();
|
||||||
|
}
|
||||||
|
|
||||||
onStarredFilterChange() {
|
onStarredFilterChange() {
|
||||||
this.query.starred = this.selectedStarredFilter.text === 'Yes';
|
this.query.starred = this.selectedStarredFilter.text === 'Yes';
|
||||||
|
this.selectedStarredFilter = this.starredFilterOptions[0];
|
||||||
return this.getDashboards();
|
return this.getDashboards();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-results {
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.search-results-filter-row {
|
.search-results-filter-row {
|
||||||
height: 35px;
|
height: 35px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,10 @@ $input-border: 1px solid $input-border-color;
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
font-size: $font-size-sm;
|
font-size: $font-size-sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--plaintext {
|
||||||
|
white-space: unset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.gf-form-hint {
|
.gf-form-hint {
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-action-bar--narrow {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.page-action-bar__spacer {
|
.page-action-bar__spacer {
|
||||||
width: $spacer * 2;
|
width: $spacer * 2;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue