mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 09:26:45 +00:00
[Search] Generic search roots constant
Made a constant for the generic search roots, rather than depending on roots[].
This commit is contained in:
parent
56265c2277
commit
b6c1eadb91
@ -2,12 +2,19 @@
|
||||
"name": "Search",
|
||||
"description": "Allows the user to search through the file tree.",
|
||||
"extensions": {
|
||||
"constants": [
|
||||
{
|
||||
"key": "GENERIC_SEARCH_ROOTS",
|
||||
"value": [ "ROOT" ],
|
||||
"priority": "fallback"
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"provides": "searchService",
|
||||
"type": "provider",
|
||||
"implementation": "GenericSearchProvider.js",
|
||||
"depends": [ "$q", "objectService", "workerService", "roots[]" ]
|
||||
"depends": [ "$q", "objectService", "workerService", "GENERIC_SEARCH_ROOTS" ]
|
||||
},
|
||||
{
|
||||
"provides": "searchService",
|
||||
|
@ -142,14 +142,8 @@ define(
|
||||
|
||||
// Converts the filetree into a list
|
||||
function getItems(timeout) {
|
||||
var rootIds = [],
|
||||
i;
|
||||
for (i = 0; i < roots.length; i += 1) {
|
||||
rootIds.push(roots[i].id);
|
||||
}
|
||||
|
||||
// Aquire root objects
|
||||
objectService.getObjects(rootIds).then(function (objectsById) {
|
||||
objectService.getObjects(roots).then(function (objectsById) {
|
||||
var objects = [],
|
||||
id;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user