Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Apr 16, 2020
1 parent d63354e commit a41950b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ export interface FullAgentConfig {
};
datasources: FullAgentConfigDatasource[];
revision?: number;
'settings.monitoring'?: {
use_output: string;
enabled: boolean;
metrics: boolean;
logs: boolean;
settings?: {
monitoring: {
use_output: string;
enabled: boolean;
metrics: boolean;
logs: boolean;
};
};
}
24 changes: 14 additions & 10 deletions x-pack/plugins/ingest_manager/server/services/agent_config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ describe('agent config', () => {
},
datasources: [],
revision: 1,
'settings.monitoring': {
use_output: 'default',
enabled: true,
logs: true,
metrics: false,
settings: {
monitoring: {
use_output: 'default',
enabled: true,
logs: true,
metrics: false,
},
},
});
});
Expand All @@ -111,11 +113,13 @@ describe('agent config', () => {
},
datasources: [],
revision: 1,
'settings.monitoring': {
use_output: 'default',
enabled: true,
logs: false,
metrics: true,
settings: {
monitoring: {
use_output: 'default',
enabled: true,
logs: false,
metrics: true,
},
},
});
});
Expand Down
12 changes: 7 additions & 5 deletions x-pack/plugins/ingest_manager/server/services/agent_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,13 @@ class AgentConfigService {
revision: config.revision,
...(config.monitoring_enabled && config.monitoring_enabled.length > 0
? {
'settings.monitoring': {
use_output: defaultOutput.name,
enabled: true,
logs: config.monitoring_enabled.indexOf('logs') >= 0,
metrics: config.monitoring_enabled.indexOf('metrics') >= 0,
settings: {
monitoring: {
use_output: defaultOutput.name,
enabled: true,
logs: config.monitoring_enabled.indexOf('logs') >= 0,
metrics: config.monitoring_enabled.indexOf('metrics') >= 0,
},
},
}
: {}),
Expand Down

0 comments on commit a41950b

Please sign in to comment.