Skip to content

Commit

Permalink
Make usageCollection required because it doens't look like it can act…
Browse files Browse the repository at this point in the history
…ually be disabled.
  • Loading branch information
cjcenizal committed Apr 10, 2020
1 parent 24762dd commit cdf20e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/index_lifecycle_management/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"server": true,
"ui": true,
"requiredPlugins": [
"usageCollection",
"home",
"licensing",
"management"
],
"optionalPlugins": [
"usageCollection",
"indexManagement"
],
"configPath": ["xpack", "ilm"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ import { defaultColdPhase, defaultWarmPhase, defaultHotPhase } from '../store/de

export let trackUiMetric: (metricType: UiStatsMetricType, eventName: string) => void;

export function init(usageCollection: UsageCollectionSetup | undefined): void {
if (usageCollection) {
trackUiMetric = usageCollection.reportUiStats.bind(usageCollection, UIM_APP_NAME);
} else {
trackUiMetric = (metricType, eventName) => {};
}
export function init(usageCollection: UsageCollectionSetup): void {
trackUiMetric = usageCollection.reportUiStats.bind(usageCollection, UIM_APP_NAME);
}

export function getUiMetricsForPhases(phases: any): any {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/index_lifecycle_management/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ManagementSetup } from '../../../../src/plugins/management/public';
import { IndexManagementPluginSetup } from '../../index_management/public';

export interface PluginsDependencies {
usageCollection?: UsageCollectionSetup;
usageCollection: UsageCollectionSetup;
management: ManagementSetup;
indexManagement?: IndexManagementPluginSetup;
}
Expand Down

0 comments on commit cdf20e6

Please sign in to comment.