Commit Graph

1489 Commits

Author SHA1 Message Date
slhale
7cad3ba0bc [Search] Update tests
Updated generic provider test for more general
mock capability object.
2015-08-06 14:52:54 -07:00
slhale
168a805e8e [Search] Index checks for changes
When indexing items initially, the generic
provider listens for mutations in case an
item's composition changes, so it can then
index the new children.
2015-08-06 14:41:47 -07:00
slhale
a2eabc1b08 [Search] Infinite cycle check
in indexItems in the generic provider.
2015-08-06 10:25:02 -07:00
slhale
f76f6548a5 [Search] Type checking
Added type checking for arrays to indexItems.
2015-08-06 10:13:32 -07:00
slhale
836c508698 [Search] Style compliance 2015-08-06 09:55:08 -07:00
slhale
1fe492cc3d [Search] New item indexer
This one (hopefully) doesn't fill up the
call stack when there are lots of items.
2015-08-06 09:51:09 -07:00
Pete Richards
37cd73c6e8 [Template] Move ng-click to parent node
Move the ng-click directive to the li element to match the element that receives
hover styles.

Fixes nasa/openmctweb#60.
2015-08-05 17:11:30 -07:00
slhale
ae763d000c [Search] Remove ES provider from bundle
Removed the ElasticSearch search provider from its
bundle definition, but left its file in.
2015-08-05 12:23:40 -07:00
slhale
6a0bd10d5b [Search] Worker test correction
Removed unused parameter. Made path to worker
not relative.
2015-08-05 10:18:10 -07:00
slhale
d23f4de36a [Search] Cleanup
Variable names, and unused parameters.
2015-08-04 13:16:29 -07:00
slhale
b6c1eadb91 [Search] Generic search roots constant
Made a constant for the generic search roots,
rather than depending on roots[].
2015-08-04 11:48:28 -07:00
slhale
56265c2277 [Search] Search aggregator return type
The search service returns objects containing
searchResult objects.
2015-08-04 11:39:09 -07:00
slhale
bbce5c3154 [Search] Changed array to dictionary
for faster lookup times in the search aggregator's
filterDuplicated function.
2015-08-04 11:19:34 -07:00
slhale
c869aaf91a [Search] Fix file paths 2015-08-04 11:10:49 -07:00
slhale
5b0bf0a0ba [Search] Moving files
Moved the elasticsearch provider to
platform/persistence/elastic. Then moved
the generic provider out of its folder.
2015-08-04 11:05:32 -07:00
slhale
ec87ac7652 [Search] Comments 2015-08-04 10:37:47 -07:00
slhale
8f65c73c8a [Search] Recompile CSS
To make changes to the Sass reflected.
2015-08-04 10:36:46 -07:00
slhale
35316dc31c [Search] Clean up
Removed additional reference to searhc UI, as well
as correct persistence provider.
2015-08-04 10:35:15 -07:00
slhale
b6bb689ccc [Search] Remove search UI files
Leaving only search service related files.
2015-08-04 10:31:52 -07:00
slhale
45bedb20c1 [Search] Comments and style 2015-08-04 10:01:54 -07:00
Victor Woeltjen
2ca3c6ea93 [Layout] Use consistent whitespace
Use consistent whitespace in array literals, WTD-1424.
2015-08-04 10:00:44 -07:00
slhale
4439e1680d [Search] Update CSS
Scrolling now does not move the search input
field. Load more text always stays on one line.
2015-08-03 13:49:53 -07:00
slhale
5569ef8b2d Revert "[Search] Update CSS"
This reverts commit e05f16d780.
2015-08-03 13:39:22 -07:00
slhale
e05f16d780 [Search] Update CSS
Slight tweak to the padding of the search view,
which affects where the top of the scroll bar
appears. Also removed the search scroll div
because it was unused.
2015-08-03 13:26:29 -07:00
Victor Woeltjen
a4c704a5a2 [Layout] Ensure minimum frame size
Ensure default frame size in a layout is not small,
even if the grid size for the layout is very small.
WTD-1424.
2015-08-03 12:18:49 -07:00
slhale
e928e02b1c [Search] Update tests
Updated the search controller test to work with
the changes to loadMore
2015-08-03 11:48:50 -07:00
slhale
1cd6685b36 [Search] Update loadMore
The controller's loadMore function now sends
new queries to the search service if the
controller's full results list does not have
enough results in it to load more.
2015-08-03 11:44:56 -07:00
slhale
695582b30f [Search] Clean up 2015-08-03 11:38:47 -07:00
slhale
d0bad46627 [Search] Style
Removed use of the keyword 'catch' when dealing
with promises, and instead used the second
parameter of then.
2015-08-03 10:46:34 -07:00
slhale
eb0bdba666 [Search] Moved isLoading
Moved the isLoading function away from
the aggregator. It is now the controller's
responsibility. Corresponding tests
updated.
2015-08-03 10:45:30 -07:00
slhale
19b9668190 [Search] Restoring web worker tests 2015-08-03 10:21:50 -07:00
slhale
59d4c362f6 [Search] Temporarily remove web worker test 2015-08-03 10:13:00 -07:00
slhale
9be646f1e7 [Search] Moved search folder location
Moved search from platform/features/search to
platform/search. Added more style corrections.
2015-08-03 09:51:36 -07:00
slhale
164d5485e9 [Search] Wrote provider test
Completed tests for GenericSearchProvider.
Also fixed style in other tests.
2015-08-03 09:36:13 -07:00
slhale
7678289ead [Search] Wrote worker test
Completed tests for GenericSearchWorker.
2015-07-31 16:37:11 -07:00
slhale
2a62494296 [Search] Wrote provider test
Completed tests for ElasticsearchSearchProvider.
2015-07-31 15:27:02 -07:00
slhale
ae94ba73d7 [Search] Wrote aggregator test
Completed tests for SearchAggregator.
2015-07-31 11:33:58 -07:00
slhale
5b3f78287e [Search] Wrote controller tests
Completed tests for SearchController and
SearchItemController.
2015-07-31 10:40:16 -07:00
slhale
4bb000dd93 [Search] Writing tests
Created files for all the tests to write.
2015-07-31 09:38:45 -07:00
slhale
06d9b68406 [Search] Comments 2015-07-31 09:38:05 -07:00
slhale
3a3e98cc48 [Search] Update provider timeout
Added a timedOut property to the provider's
return object. Changed the generic search
worker to stop if it reaches timeout.
2015-07-30 16:35:26 -07:00
slhale
6e11941ae9 [Search] ES Provider error checks
The elasticsearch provider returns an empty
result when elasticsearch throws an error
(probably a bad request). This prevents the
aggregator from thinking that ES is loading
infinitely.
2015-07-30 15:47:09 -07:00
slhale
f8471bc944 [Search] Comments 2015-07-30 15:04:42 -07:00
slhale
15b7e3ac9b [Search] Aggregator returns result object
The aggregator now returns a result object similar
to that of the providers, but the hits array contains
domain objects rather than searchResult objects.
Also removed overly complicated filterRepeats
function from the aggregator and replaced it with a
simpler one.
2015-07-30 14:57:15 -07:00
slhale
51bc7c6a7f [Search] Generic tracks total hits
The generic search worker keeps track of the total
number of search hits before truncating to match
the max results.
2015-07-30 14:06:35 -07:00
slhale
60dad014cc [Search] Changed provider return type
The provider now returns an object that has
a hits property which contains what it
previously returned, and also a total property
which contains the total number of results.
2015-07-30 13:54:56 -07:00
slhale
a7cd6d8807 [Search] Removed name field form ES provider
Removed the name field from the ElasticSearch provider
search query string, so now it will check all of the
fields of the domain object (such as type).
2015-07-30 13:32:34 -07:00
slhale
bce56c53ed [Search] Clean up
Updated comments and documentation. Changed the generic
worker to return results as {id: score} key value pairs
rather than {id: {score: score}} format. Removed unused
getLatestResults and getLatestTimestamps functions from
the providers.
2015-07-30 13:27:45 -07:00
slhale
2c5da44e5e [Search] Clean up
Removed the timestamp as an optional parameter
of the search aggregator's query(), and now it
instead automattically generates one before
querying the providers.
Also attempted to fix loading, but did not
complete (commented out).
2015-07-30 12:38:03 -07:00
slhale
6b613f234b [Search] Clean up comments 2015-07-29 15:22:46 -07:00
slhale
1619f236cf [Search] Updated search service interface
The search service's interface now just consists
of the two functions query() and isLoading().
query() returns a promise for an array or results,
which eliminates the need for timeout polling like
was previously done. The search providers
have also been changed to reutrn promises.
2015-07-29 15:07:13 -07:00
slhale
5ee8dd239b [Search] Comments 2015-07-29 13:17:50 -07:00
slhale
f2cd55d6cd [Search] Cleaning up
Cleaning up code in generic serach provider. Removed
unnecissary return statements. Moved indexing via web
worker from getItems() loop to within itemsHelper().
Commented out timeout, becuase seems unnecissary.
Changed all date.getTime() to Date.now(). Indexing
has undefined checking.
2015-07-29 11:01:38 -07:00
slhale
639cf1cf59 [Search] Generic indexes once
Changed the generic search provider to index the
file tree only once when it is initially called.
This assumes that the contents of the file tree
will not change significantly within the course
of a use session (and some changes may be caught
by other search providers).
2015-07-29 10:28:07 -07:00
slhale
495d8c9830 [Search] Search term processing
The search term processor for ElasticSearch now
removes extra spaces from inside of the search
term (to avoid some ES errors).
2015-07-28 17:04:29 -07:00
slhale
32b58715c6 [Search] Fixed scrolling and layout edit
Changed the CSS so that scrolling for the tree and
search results works again. Additionally, layout
editing works again.
2015-07-28 12:33:22 -07:00
slhale
1a9dd2f144 [Search] Comments
Updated documentation. Removed unnecissary dependency
fom generic provider.
2015-07-28 11:33:29 -07:00
slhale
d6a7dc9820 Merge branch 'search' of https://github.com/slhale/openmctweb into search 2015-07-28 10:17:15 -07:00
slhale
dc53cf60d1 [Search] Style
Made style compliance changes.
2015-07-28 10:15:05 -07:00
slhale
e0e5ad1347 [Search] Removed console output
Accidentally left in a console.log statement
2015-07-28 10:04:31 -07:00
slhale
a6b11354cd [Search] Removed console output
Accidentally left in a console.log statement
2015-07-28 10:03:22 -07:00
slhale
561d671181 [Search] Fix to pass test
Changing TreeNodeController's isSelected function
back to original, so that it doesn't break tests.
2015-07-28 09:50:50 -07:00
shale
84486f2086 [Search] Fixed empty search
Pressing enter on the searchbar before putting
any input would before hide the filtree when
it shouldn't. Now it does not.
2015-07-27 14:12:49 -07:00
shale
dc79f460e5 [Search] Fixing conflicts 2015-07-27 13:34:12 -07:00
shale
7cac858697 [Search] Cleanup
Updated documentation. Removed most unused funtions.
Removed references to the search service in the
search template -- necissary functions added to
the search controller.
(Search in a 'working' state again.)
2015-07-27 13:25:35 -07:00
shale
a3977a18f0 [Search] Results polling in aggregator
Moved the polling for most recent results
from the search controller to the search
aggregator.
Also changed ng-change back to ng-keyup
in the search template.
2015-07-27 12:59:32 -07:00
shale
5e858f73d5 [Search] Changed ng-keyup to ng-change
In the search template. Also small comment change.
2015-07-27 11:55:42 -07:00
shale
181fb32a2a [Search] Responsibility change (in progress)
Attempting to move some responsibility from
the search controller to the aggregator.
(Committing for save before possible revert.)
2015-07-27 10:04:09 -07:00
shale
232a648fbd Merge branch 'master' of https://github.com/nasa/openmctweb into search 2015-07-27 09:14:52 -07:00
Victor Woeltjen
77edb07333 Merge pull request #52 from nasa/continuous-deployment
Support continuous deployment of open source Open MCT Web.
2015-07-27 07:51:54 -07:00
shale
d35a149108 [Search] Remove unused controll
Removed searchbar controll, as the control to
use would be the provided textfield control.
2015-07-24 16:52:55 -07:00
shale
dca0014862 [Search] Removed unused
Removed incorrect 'uses' statements from
bundle.json. Also removed unused controller
ToggleController. Edited some comments.
2015-07-24 15:08:43 -07:00
shale
6b02295bf4 Merge branch 'master' of https://github.com/nasa/openmctweb into search 2015-07-24 14:20:27 -07:00
Victor Woeltjen
9435e75461 Merge remote-tracking branch 'slhale/open33' into open47b
Fix merge conflict in preparation to integrate nasa/openmctweb#47

Conflicts:
	platform/commonUI/browse/res/templates/browse/object-header.html
2015-07-24 13:46:37 -07:00
shale
05c43db6fe [Search] Search input using the model
Made the search bar text input go to ngModel.input,
rather than getting the text manually from the DOM
element. Additionally, removed the search service
from the search controller's scope.
2015-07-24 13:04:48 -07:00
shale
9143f5febd [Search] Comments and errors
Changed TreeNodeController slightly to do error
checking. Also updated some comments.
2015-07-24 13:03:18 -07:00
shale
300280e03e [Search] Moving responsibility
Moving the responsibility of polling for updates
from the search controller to the search aggregator.

In progress. Previously this prototype was what
could be called semi-stable, but now it is no longer.
2015-07-23 16:58:25 -07:00
shale
341218e8f6 [Search] Tree hide change
The tree is now hidden whenever there is
text in the search bar. (This allows for
the case when there are no search results,
but text in the search bar.)
2015-07-23 16:24:38 -07:00
shale
33e8084852 [Search] Getting input text
The controller now gets the input text from the
DOM element ID, then passes that string along
to the search service, instead of passing the
raw ID.
2015-07-23 16:13:26 -07:00
shale
7d495f6389 [Search] Hide tree
The tree is hidden when there are
search results.
2015-07-23 15:55:20 -07:00
shale
f4d34a2a9c [Search] mctControl for searchbar
Attempting to generalize the searchbar using
mct-control. In progress.
2015-07-23 15:29:19 -07:00
shale
0feab1965c [Search] Attempt at scroll bars
Attempted to make the search results scroll,
but failed for now. Created a div for the
search results, load icon, and load more
button, which are the elements desired to
be scrolled. Did not work because search
result labels have absolute position text.
2015-07-23 15:12:13 -07:00
shale
aa17d3034e [Search] Fixed excessive calls to setSelection
There were excessive calls to TreeNodeController's
setSelection() due to a modification for search
compatibility. Changed to not call as often.
2015-07-23 13:32:15 -07:00
shale
52a9fcf5d6 [Search] Changed highlight size
The search item highlight when selected or
hovered over is now talled, and the margin
between search items is reduced to
counteract any effect to spacing.
2015-07-23 13:29:11 -07:00
shale
7b271dcb6b [Search] Highlight transitions
Added transitions for when objects get
highlighted from selection or hover.
2015-07-23 13:14:20 -07:00
shale
2680e466fa [Search] Tree selection syncs
Selecting something in the search results now
also makes it selected in the filetree. It
remains selected even when the search results
are cleared. (The filetree does not
automatically expand to that position though.)
2015-07-23 12:47:21 -07:00
shale
29d5535e7c [Search] Changed search load time
Changed how frequently the search controller
checks for updates. This makes the load icon
dissapear faster, and looks more natural. But,
may affect performance.
Also changed the point at which the loading
status becomes 'true'. Made it earlier, at
the beginning of the controller's update().
2015-07-23 11:48:19 -07:00
shale
ebb5474b34 [Search] Hover and loading
Added styling to result items when they are
hovered over.
Also added a loading icon.
2015-07-23 11:41:17 -07:00
shale
4759162bb7 [Search] Added right padding
Added padding to the right side of the
search holder to match the tree holder's
padding.
2015-07-23 11:08:31 -07:00
shale
deba184103 [Search] Selection remains across queries
The selected object in the search results now
remains selected even after a new search is made.
It also will remain selected if it is clicked
on the file tree, but the file tree version is
not yet selected if it is clicked on the search
results list.
2015-07-23 10:56:38 -07:00
shale
c65a278fcf [Search] Selecting results works
Can now click on search results. The view will
be updated, as well as the selected object
being higlighted.
2015-07-23 10:50:00 -07:00
shale
8c08f7b93e [Search] Less space above tree
Removed the awkward spacing between the filetree
and the search bar. Now 'My Items' appears just
below the search bar.
Also added .search-holder to the sass, but haven't
done anything with it yet.
2015-07-23 09:25:10 -07:00
shale
501e426868 [Search] Centered load more button
More correctly centered the load more button,
so that when the left panel is resized,
the button remains in the middle.
Additionally, added more comments to the sass.
2015-07-22 16:35:41 -07:00
shale
8f1f4eb177 [Search] Generic search gets all roots
Generic search now automatically finds all
the roots before searching.
2015-07-22 16:21:38 -07:00
shale
b0e7dca985 [Search] Empty search resets results
When there is no input into the search bar
no results are displayed/displayed results
are removed. This is because the search
providers were changed to return empty
arrays for empty search strings.
2015-07-22 16:09:14 -07:00
shale
b16af5fe3e [Search] Renaming search and searchbar
Changed what was previously just 'search' and
renamed to 'search view'. Then, took what was
previously 'searchbar' and renamed to
'search'.
2015-07-22 15:43:28 -07:00
shale
1dbe039be8 [Search] Load more button style
Styled the load more button to match
the general theme.
2015-07-22 15:17:27 -07:00
shale
d82538a799 [Search] Item background highlight
Each result item now has a highlighted
background, with correct rounding of
edges. Need to now detect when to
highlight (on selection).
2015-07-22 14:48:14 -07:00
shale
57d45b24be [Search] Removed Search View
Removed the search view from bundle.json because
the search in the left panel is the actualy
UI for searching. The search view is temporary.
2015-07-22 13:46:40 -07:00
shale
dcd4006017 [Search] Positioning fixed
Fixed the search results so that they
now display correctly, with overflow
hidden, and no unusual positioning.
Also changed font size to 0.8em.
2015-07-22 13:43:54 -07:00