Skip to content

Commit

Permalink
Fix typo unenrollement -> unenrollment
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Jul 3, 2020
1 parent 43ee46b commit fbfc50e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function getAgentStatus(agent: Agent, now: number = Date.now()): AgentSta
if (!agent.active) {
return 'inactive';
}
if (agent.unenrollement_started_at && !agent.unenrolled_at) {
if (agent.unenrollment_started_at && !agent.unenrolled_at) {
return 'unenrolling';
}
if (agent.current_error_events.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/ingest_manager/common/types/models/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ interface AgentBase {
active: boolean;
enrolled_at: string;
unenrolled_at?: string;
unenrollement_started_at?: string;
unenrollment_started_at?: string;
shared_id?: string;
access_api_key_id?: string;
default_api_key?: string;
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/ingest_manager/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const savedObjectTypes: { [key: string]: SavedObjectsType } = {
active: { type: 'boolean' },
enrolled_at: { type: 'date' },
unenrolled_at: { type: 'date' },
unenrollement_started_at: { type: 'date' },
unenrollment_started_at: { type: 'date' },
access_api_key_id: { type: 'keyword' },
version: { type: 'keyword' },
user_provided_metadata: { type: 'flattened' },
Expand Down Expand Up @@ -317,7 +317,7 @@ export function registerEncryptedSavedObjects(
'updated_at',
'current_error_events',
'unenrolled_at',
'unenrollement_started_at',
'unenrollment_started_at',
'packages',
]),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function unenrollAgent(soClient: SavedObjectsClientContract, agentI
type: 'UNENROLL',
});
await soClient.update<AgentSOAttributes>(AGENT_SAVED_OBJECT_TYPE, agentId, {
unenrollement_started_at: now,
unenrollment_started_at: now,
});
}

Expand Down

0 comments on commit fbfc50e

Please sign in to comment.