Skip to content

Commit

Permalink
[APM] Agent remote configuration (#39555)
Browse files Browse the repository at this point in the history
* [APM] Agent remote configuration UI
  - Creates apmCm index mapping on plugin initialization.
  - Links from home page to settings page
  • Loading branch information
ogupte authored Jul 2, 2019
1 parent 2eeea97 commit 0e8b722
Show file tree
Hide file tree
Showing 26 changed files with 1,762 additions and 44 deletions.
4 changes: 3 additions & 1 deletion src/legacy/core_plugins/apm_oss/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default function apmOss(kibana) {
spanIndices: Joi.string().default('apm-*'),
metricsIndices: Joi.string().default('apm-*'),
onboardingIndices: Joi.string().default('apm-*'),
cmIndex: Joi.string().default('.apm-cm')
}).default();
},

Expand All @@ -48,7 +49,8 @@ export default function apmOss(kibana) {
'transactionIndices',
'spanIndices',
'metricsIndices',
'onboardingIndices'
'onboardingIndices',
'cmIndex'
].map(type => server.config().get(`apm_oss.${type}`))));
}
});
Expand Down
19 changes: 18 additions & 1 deletion x-pack/legacy/plugins/apm/public/components/app/Main/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui';
import {
EuiFlexGroup,
EuiFlexItem,
EuiTitle,
EuiButtonEmpty
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { ApmHeader } from '../../shared/ApmHeader';
import { HistoryTabs, IHistoryTab } from '../../shared/HistoryTabs';
import { SetupInstructionsLink } from '../../shared/Links/SetupInstructionsLink';
import { ServiceOverview } from '../ServiceOverview';
import { TraceOverview } from '../TraceOverview';
import { APMLink } from '../../shared/Links/APMLink';

const homeTabs: IHistoryTab[] = [
{
Expand All @@ -32,6 +38,10 @@ const homeTabs: IHistoryTab[] = [
}
];

const SETTINGS_LINK_LABEL = i18n.translate('xpack.apm.settingsLinkLabel', {
defaultMessage: 'Settings'
});

export function Home() {
return (
<div>
Expand All @@ -42,6 +52,13 @@ export function Home() {
<h1>APM</h1>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<APMLink path="/settings">
<EuiButtonEmpty size="s" color="primary" iconType="gear">
{SETTINGS_LINK_LABEL}
</EuiButtonEmpty>
</APMLink>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<SetupInstructionsLink />
</EuiFlexItem>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { TransactionDetails } from '../../TransactionDetails';
import { Home } from '../Home';
import { BreadcrumbRoute } from '../ProvideBreadcrumbs';
import { RouteName } from './route_names';
import { SettingsList } from '../../Settings/SettingsList';

interface RouteParams {
serviceName: string;
Expand Down Expand Up @@ -47,6 +48,15 @@ export const routes: BreadcrumbRoute[] = [
}),
name: RouteName.SERVICES
},
{
exact: true,
path: '/settings',
component: SettingsList,
breadcrumb: i18n.translate('xpack.apm.breadcrumb.listSettingsTitle', {
defaultMessage: 'Settings'
}),
name: RouteName.SETTINGS
},
{
exact: true,
path: '/traces',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ export enum RouteName {
ERROR = 'error',
METRICS = 'metrics',
TRANSACTION_TYPE = 'transaction_type',
TRANSACTION_NAME = 'transaction_name'
TRANSACTION_NAME = 'transaction_name',
SETTINGS = 'settings'
}
Loading

0 comments on commit 0e8b722

Please sign in to comment.