mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 09:26:45 +00:00
[Search] Moved search folder location
Moved search from platform/features/search to platform/search. Added more style corrections.
This commit is contained in:
parent
164d5485e9
commit
9be646f1e7
@ -16,13 +16,13 @@
|
||||
"platform/features/pages",
|
||||
"platform/features/plot",
|
||||
"platform/features/scrolling",
|
||||
"platform/features/search",
|
||||
"platform/features/events",
|
||||
"platform/forms",
|
||||
"platform/persistence/elastic",
|
||||
"platform/persistence/queue",
|
||||
"platform/policy",
|
||||
"platform/entanglement",
|
||||
"platform/search",
|
||||
|
||||
"example/imagery",
|
||||
"example/eventGenerator",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "Search View",
|
||||
"name": "Search",
|
||||
"description": "Allows the user to search through the file tree.",
|
||||
"extensions": {
|
||||
"controllers": [
|
@ -55,7 +55,7 @@ define(
|
||||
}
|
||||
|
||||
return searchTerm.split(' ').map(function (s) {
|
||||
if (s.includes('"')) {
|
||||
if (s.indexOf('"') !== -1) {
|
||||
return s;
|
||||
} else {
|
||||
return s + '~' + editDistance;
|
||||
@ -166,7 +166,7 @@ define(
|
||||
}).then(function (rawResults) {
|
||||
// ...then process the data
|
||||
return processResults(rawResults, timestamp);
|
||||
}).catch(function (err) {
|
||||
})['catch'](function (err) {
|
||||
// In case of error, return nothing. (To prevent
|
||||
// infinite loading time.)
|
||||
return {hits: [], total: 0};
|
@ -97,7 +97,7 @@
|
||||
|
||||
for (i = 0; i < terms.length; i += 1) {
|
||||
// Increase the score if the term is in the item name
|
||||
if (name.includes(terms[i])) {
|
||||
if (name.indexOf(terms[i]) !== -1) {
|
||||
score += 1;
|
||||
|
||||
// Add extra to the score if the search term exists
|
@ -31,7 +31,7 @@ define(
|
||||
|
||||
describe("The generic search worker ", function () {
|
||||
// If this test fails, make sure this path is correct
|
||||
var worker = new Worker('platform/features/search/src/workers/GenericSearchWorker.js'),
|
||||
var worker = new Worker('platform/search/src/workers/GenericSearchWorker.js'),
|
||||
numObjects = 5;
|
||||
|
||||
beforeEach(function () {
|
Loading…
x
Reference in New Issue
Block a user