mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 01:16:46 +00:00
[Search] Don't index objects being edited
https://github.com/nasa/openmctweb/pull/727#issuecomment-195570183
This commit is contained in:
parent
2d305415b3
commit
107ecfe687
@ -121,9 +121,13 @@ define([
|
||||
provider = this;
|
||||
|
||||
mutationTopic.listen(function (mutatedObject) {
|
||||
var id = mutatedObject.getId(),
|
||||
model = mutatedObject.getModel();
|
||||
provider.index(id, model);
|
||||
var status = mutatedObject.getCapability('status');
|
||||
if (!status || !status.get('editing')) {
|
||||
provider.index(
|
||||
mutatedObject.getId(),
|
||||
mutatedObject.getModel()
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -101,7 +101,11 @@ define([
|
||||
|
||||
it('re-indexes when mutation occurs', function () {
|
||||
var mockDomainObject =
|
||||
jasmine.createSpyObj('domainObj', ['getId', 'getModel']),
|
||||
jasmine.createSpyObj('domainObj', [
|
||||
'getId',
|
||||
'getModel',
|
||||
'getCapability'
|
||||
]),
|
||||
testModel = { some: 'model' };
|
||||
mockDomainObject.getId.andReturn("some-id");
|
||||
mockDomainObject.getModel.andReturn(testModel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user