Skip to content

Commit

Permalink
Refactor UA telemetry constants by extracting it from common/types.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Oct 14, 2021
1 parent b77716b commit 981e21b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions x-pack/plugins/upgrade_assistant/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export const indexSettingDeprecations = {

export const API_BASE_PATH = '/api/upgrade_assistant';

// Telemetry constants
export const UPGRADE_ASSISTANT_TELEMETRY = 'upgrade-assistant-telemetry';

/**
* This is the repository where Cloud stores its backup snapshots.
*/
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/upgrade_assistant/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ export interface ReindexWarning {
}

// Telemetry types
export const UPGRADE_ASSISTANT_TYPE = 'upgrade-assistant-telemetry';
export const UPGRADE_ASSISTANT_DOC_ID = 'upgrade-assistant-telemetry';
export type UIOpenOption = 'overview' | 'elasticsearch' | 'kibana';
export type UIReindexOption = 'close' | 'open' | 'start' | 'stop';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

import { SavedObjectsType } from 'src/core/server';

import { UPGRADE_ASSISTANT_TYPE } from '../../common/types';
import { UPGRADE_ASSISTANT_TELEMETRY } from '../../common/constants';
import { telemetrySavedObjectMigrations } from './migrations';

export const telemetrySavedObjectType: SavedObjectsType = {
name: UPGRADE_ASSISTANT_TYPE,
name: UPGRADE_ASSISTANT_TELEMETRY,
hidden: false,
namespaceType: 'agnostic',
mappings: {
Expand Down

0 comments on commit 981e21b

Please sign in to comment.