mirror of
https://github.com/nasa/openmct.git
synced 2025-02-21 09:52:04 +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",
|
"name": "Search",
|
||||||
"description": "Allows the user to search through the file tree.",
|
"description": "Allows the user to search through the file tree.",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
|
"constants": [
|
||||||
|
{
|
||||||
|
"key": "GENERIC_SEARCH_ROOTS",
|
||||||
|
"value": [ "ROOT" ],
|
||||||
|
"priority": "fallback"
|
||||||
|
}
|
||||||
|
],
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
"provides": "searchService",
|
"provides": "searchService",
|
||||||
"type": "provider",
|
"type": "provider",
|
||||||
"implementation": "GenericSearchProvider.js",
|
"implementation": "GenericSearchProvider.js",
|
||||||
"depends": [ "$q", "objectService", "workerService", "roots[]" ]
|
"depends": [ "$q", "objectService", "workerService", "GENERIC_SEARCH_ROOTS" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"provides": "searchService",
|
"provides": "searchService",
|
||||||
|
@ -142,14 +142,8 @@ define(
|
|||||||
|
|
||||||
// Converts the filetree into a list
|
// Converts the filetree into a list
|
||||||
function getItems(timeout) {
|
function getItems(timeout) {
|
||||||
var rootIds = [],
|
|
||||||
i;
|
|
||||||
for (i = 0; i < roots.length; i += 1) {
|
|
||||||
rootIds.push(roots[i].id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Aquire root objects
|
// Aquire root objects
|
||||||
objectService.getObjects(rootIds).then(function (objectsById) {
|
objectService.getObjects(roots).then(function (objectsById) {
|
||||||
var objects = [],
|
var objects = [],
|
||||||
id;
|
id;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user