Browse Source

Merge branch 'develop-search' of github.com:grafana/grafana into develop-search

Torkel Ödegaard 8 years ago
parent
commit
27acaf3830

+ 0 - 1
pkg/services/sqlstore/dashboard.go

@@ -202,7 +202,6 @@ func findDashboards(query *search.FindPersistedDashboardsQuery) ([]DashboardSear
 		dashboard.title,
 		dashboard.slug,
 		dashboard_tag.term,
-		dashboard.is_folder,
 		dashboard.folder_id,
 		folder.slug as folder_slug,
 		folder.title as folder_title

+ 2 - 1
public/app/core/components/search/search.html

@@ -59,7 +59,8 @@
 					<a class="search-section__header pointer" ng-show="::section.title" ng-click="section.collapsed = !section.collapsed">
 						<i class="search-section__header__icon" ng-class="section.icon"></i>
 						<span class="search-section__header__text">{{::section.title}}</span>
-						<i class="fa fa-minus search-section__header__toggle"></i>
+						<i class="fa fa-minus search-section__header__toggle" ng-hide="section.collapsed"></i>
+						<i class="fa fa-plus search-section__header__toggle" ng-show="section.collapsed"></i>
 					</a>
 
 					<div ng-if="!section.collapsed">

+ 7 - 1
public/app/core/components/search/search.ts

@@ -132,9 +132,15 @@ export class SearchCtrl {
         if (!section) {
           section = {
             id: hit.folderId,
-            title: hit.folderTitle, items: [],
+            title: hit.folderTitle,
+            items: [],
             icon: 'fa fa-folder-open'
           };
+          // handle root
+          if (!hit.folderId) {
+            section.title = "Dashboards";
+            section.icon = "fa fa-circle-o";
+          }
           sections[hit.folderId] = section;
         }
 

+ 0 - 1
public/sass/components/_modals.scss

@@ -21,7 +21,6 @@
 // Base modal
 .modal {
   position: fixed;
-  overflow: hidden;
   z-index: $zindex-modal;
   width: 100%;
 	background-color: $panel-bg;

+ 8 - 7
public/sass/components/_search.scss

@@ -134,13 +134,13 @@
     background-color: $tight-form-func-bg;
   }
 
-  .fa-star, .fa-star-o {
-    padding-left: 13px;
-  }
-
-  .fa-star {
-    color: $orange;
-  }
+  // .fa-star, .fa-star-o {
+  //   padding-left: 13px;
+  // }
+  //
+  // .fa-star {
+  //   color: $orange;
+  // }
 }
 
 .search-item__title {
@@ -154,6 +154,7 @@
   padding: 5px;
   flex: 0 0 auto;
   font-size: 19px;
+  padding: 5px 2px 5px 10px;
 }
 
 .search-item__tags {