Przeglądaj źródła

dashboard search

Torkel Ödegaard 8 lat temu
rodzic
commit
6c5e19c1e0
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      public/app/core/services/search_srv.ts

+ 5 - 2
public/app/core/services/search_srv.ts

@@ -10,6 +10,9 @@ export class SearchSrv {
   search(options) {
     if (!options.query) {
       options.folderIds = [0];
+    } else {
+      options.folderIds = [];
+      options.type = 'dash-db';
     }
 
     return this.backendSrv.search(options).then(results => {
@@ -36,14 +39,14 @@ export class SearchSrv {
       //   ]
       // };
 
-     // create folder index
+      // create folder index
       for (let hit of results) {
         if (hit.type === 'dash-folder') {
           sections[hit.id] = {
             id: hit.id,
             title: hit.title,
             items: [],
-            icon: 'fa fa-folder-open',
+            icon: 'fa fa-folder',
             score: _.keys(sections).length,
           };
         }