Merge branch '10819_empty_dashboard_list'

This commit is contained in:
Torkel Ödegaard 2018-02-14 09:38:19 +01:00
commit bb681cd498
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<div class="dashboard-list"> <div class="dashboard-list">
<div class="page-action-bar page-action-bar--narrow" ng-hide="!ctrl.hasFilters && ctrl.sections.length === 0"> <div class="page-action-bar page-action-bar--narrow" ng-hide="ctrl.folderId && !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>
@ -52,6 +52,12 @@
</em> </em>
</div> </div>
<div class="search-results" ng-show="!ctrl.folderId && !ctrl.hasFilters && ctrl.sections.length === 0">
<em class="muted">
No dashboards found.
</em>
</div>
<div class="search-results" ng-show="ctrl.sections.length > 0"> <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
@ -103,6 +109,7 @@
/> />
</div> </div>
</div> </div>
</div> </div>
<div ng-if="ctrl.canSave && ctrl.folderId && !ctrl.hasFilters && ctrl.sections.length === 0"> <div ng-if="ctrl.canSave && ctrl.folderId && !ctrl.hasFilters && ctrl.sections.length === 0">

View File

@ -37,7 +37,7 @@ export class ManageDashboardsCtrl {
folderUid?: string; folderUid?: string;
// if user can add new folders and/or add new dashboards // if user can add new folders and/or add new dashboards
canSave: boolean; canSave = false;
// if user has editor role or higher // if user has editor role or higher
isEditor: boolean; isEditor: boolean;