Skip to content

Commit

Permalink
fix typing and crashing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Nov 20, 2019
1 parent 5381830 commit 320618f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
3 changes: 2 additions & 1 deletion x-pack/legacy/plugins/oss_telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const ossTelemetry: LegacyPluginInitializer = kibana => {
taskManager: server.plugins.task_manager,
__LEGACY: {
config: server.config(),
xpackMainStatus: server.plugins.xpack_main.status.plugin,
xpackMainStatus: ((server.plugins.xpack_main as unknown) as { status: any }).status
.plugin,
telemetry: server.usage,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ import { getUsageCollector } from './get_usage_collector';
import { OssTelemetrySetupDependencies } from '../../../plugin';

export function registerVisualizationsCollector(
{
makeUsageCollector,
register,
}: OssTelemetrySetupDependencies['__LEGACY']['telemetry']['collectorSet'],
collectorSet: OssTelemetrySetupDependencies['__LEGACY']['telemetry']['collectorSet'],
taskManager: TaskManagerPluginSetupContract | undefined
): void {
const collector = makeUsageCollector(getUsageCollector(taskManager));
register(collector);
const collector = collectorSet.makeUsageCollector(getUsageCollector(taskManager));
collectorSet.register(collector);
}
3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/xpack_main/xpack_main.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ import { Feature, FeatureWithAllOrReadPrivileges } from '../../../plugins/featur
import { XPackInfo, XPackInfoOptions } from './server/lib/xpack_info';
export { XPackFeature } from './server/lib/xpack_info';

export type XPackStatus = any;

export interface XPackMainPlugin {
info: XPackInfo;
status: XPackStatus;
createXPackInfo(options: XPackInfoOptions): XPackInfo;
getFeatures(): Feature[];
registerFeature(feature: FeatureWithAllOrReadPrivileges): void;
Expand Down

0 comments on commit 320618f

Please sign in to comment.