Skip to content

Commit

Permalink
Force Analytics to eager mode (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
olamothe committed May 9, 2017
1 parent f7bcf3c commit b4e8fea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/Lazy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Initialization.componentsFactory = LazyInitialization.componentsFactory;

export { LazyInitialization, EagerInitialization, Initialization } from './ui/Base/Initialization';

import { Analytics } from './ui/Analytics/Analytics';
Analytics.doExport();

import { lazyAdvancedSearch } from './ui/AdvancedSearch/LazyAdvancedSearch';
lazyAdvancedSearch();

import { lazyAggregate } from './ui/Aggregate/LazyAggregate';
lazyAggregate();

import { lazyAnalytics } from './ui/Analytics/LazyAnalytics';
lazyAnalytics();

import { lazyAnalyticsSuggestions } from './ui/AnalyticsSuggestions/LazyAnalyticsSuggestions';
lazyAnalyticsSuggestions();

Expand Down
2 changes: 1 addition & 1 deletion src/rest/SearchEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ export class SearchEndpoint implements ISearchEndpoint {
this.currentListSubscriptions = null;
return data;
}).catch((e: AjaxError) => {
// Trap 503 error, as the listSubscription call is called on every page initialization
// Trap 403 error, as the listSubscription call is called on every page initialization
// to check for current subscriptions. By default, the search alert service is not enabled for most organization
// Don't want to pollute the console with un-needed noise and confusion
if (e.status != 403) {
Expand Down
14 changes: 0 additions & 14 deletions src/ui/Analytics/LazyAnalytics.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/ui/SearchInterface/SearchInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ export class SearchInterface extends RootComponent implements IComponentBindings
protected initializeAnalytics(): IAnalyticsClient {
let analyticsRef = BaseComponent.getComponentRef('Analytics');
if (analyticsRef) {
return analyticsRef.create(this.element, this.analyticsOptions);
return analyticsRef.create(this.element, this.analyticsOptions, this.getBindings());
}
return new NoopAnalyticsClient();
}
Expand Down

0 comments on commit b4e8fea

Please sign in to comment.