Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] Remote Agent Config: Add additional (java) options #59860

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3ea1457
WIP
sorenlouv Mar 6, 2020
2b3bf7a
design
sorenlouv Mar 8, 2020
769e43d
Added server side validation
sorenlouv Mar 9, 2020
75ae370
Adding most settings
sorenlouv Mar 10, 2020
41769d1
Add unsaved indicator
sorenlouv Mar 10, 2020
38c0582
Add descriptions and make validators more generic
sorenlouv Mar 11, 2020
09e077e
use history instead of `useLocation` hook
sorenlouv Mar 11, 2020
74584e5
Removed unused config
sorenlouv Mar 11, 2020
32d21b5
Add xpack to translations
sorenlouv Mar 11, 2020
8b20b7a
Fix API tests
sorenlouv Mar 11, 2020
d8bd3f9
Remove unused import
sorenlouv Mar 12, 2020
61f6f94
Fixed i18n
sorenlouv Mar 12, 2020
d1a79e8
i18n
sorenlouv Mar 12, 2020
5cb5fb5
fix i18n
sorenlouv Mar 12, 2020
739e9d8
Remove custom setting
sorenlouv Mar 16, 2020
fc52aa8
Update x-pack/plugins/apm/common/runtime_types/agent_configuration/co…
sorenlouv Mar 16, 2020
c0a3da0
[APM] Add excludeAgents and includeAgents
sorenlouv Mar 16, 2020
fb9e3b1
Address feedback
sorenlouv Mar 18, 2020
4fce96f
Add remaining translations
sorenlouv Mar 18, 2020
8fdbeb6
Add type
sorenlouv Mar 18, 2020
39fa662
Undo changes tp url_helpers
sorenlouv Mar 19, 2020
3be4d53
Only show options that are applicable to all backend agents
sorenlouv Mar 19, 2020
096b4a2
Highlight menu item
sorenlouv Mar 19, 2020
d209def
Add floating point number and java settings
sorenlouv Mar 20, 2020
a646575
Split settings into “general” and “”java
sorenlouv Mar 20, 2020
e4fe71e
rename “configSettingDefinitions” to “settingDefinitions”
sorenlouv Mar 20, 2020
c30ace4
Fix tests
sorenlouv Mar 20, 2020
2702fbf
fix duplicated i18n labels
sorenlouv Mar 20, 2020
58a1dee
Update x-pack/legacy/plugins/apm/public/components/app/Settings/Agent…
sorenlouv Mar 20, 2020
9dea4c7
Update x-pack/legacy/plugins/apm/public/components/app/Settings/Agent…
sorenlouv Mar 20, 2020
cb51fcc
Update x-pack/legacy/plugins/apm/public/components/app/Settings/Agent…
sorenlouv Mar 20, 2020
be92ba8
Fix `EuiSelectOption` type
sorenlouv Mar 22, 2020
6274d32
Avoid duplicate imports
sorenlouv Mar 22, 2020
b17499f
Add discard button
sorenlouv Mar 23, 2020
0357c6c
Remove unused import
sorenlouv Mar 23, 2020
c585a15
Move files to `common/agent_configuration`
sorenlouv Mar 23, 2020
d83d7a1
Add error handling when fetching configuration fails
sorenlouv Mar 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import { resolveUrlParams } from '../../../../context/UrlParamsContext/resolveUr
import { UNIDENTIFIED_SERVICE_NODES_LABEL } from '../../../../../../../../plugins/apm/common/i18n';
import { TraceLink } from '../../TraceLink';
import { CustomizeUI } from '../../Settings/CustomizeUI';
import {
EditAgentConfigurationRouteHandler,
CreateAgentConfigurationRouteHandler
} from './route_handlers/agent_configuration';

const metricsBreadcrumb = i18n.translate('xpack.apm.breadcrumb.metricsTitle', {
defaultMessage: 'Metrics'
Expand Down Expand Up @@ -101,12 +105,31 @@ export const routes: BreadcrumbRoute[] = [
),
breadcrumb: i18n.translate(
'xpack.apm.breadcrumb.settings.agentConfigurationTitle',
{
defaultMessage: 'Agent Configuration'
}
{ defaultMessage: 'Agent Configuration' }
),
name: RouteName.AGENT_CONFIGURATION
},

{
exact: true,
path: '/settings/agent-configuration/create',
breadcrumb: i18n.translate(
'xpack.apm.breadcrumb.settings.createAgentConfigurationTitle',
{ defaultMessage: 'Create Agent Configuration' }
),
name: RouteName.AGENT_CONFIGURATION_CREATE,
component: () => <CreateAgentConfigurationRouteHandler />
},
{
exact: true,
path: '/settings/agent-configuration/edit',
sorenlouv marked this conversation as resolved.
Show resolved Hide resolved
breadcrumb: i18n.translate(
'xpack.apm.breadcrumb.settings.editAgentConfigurationTitle',
{ defaultMessage: 'Edit Agent Configuration' }
),
name: RouteName.AGENT_CONFIGURATION_EDIT,
component: () => <EditAgentConfigurationRouteHandler />
},
{
exact: true,
path: '/services/:serviceName',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React from 'react';
import { useFetcher } from '../../../../../hooks/useFetcher';
import { history } from '../../../../../utils/history';
import { Settings } from '../../../Settings';
import { AgentConfigurationCreateEdit } from '../../../Settings/AgentConfigurations/AgentConfigurationCreateEdit';
import { toQuery } from '../../../../shared/Links/url_helpers';

export function EditAgentConfigurationRouteHandler() {
const { search } = history.location;

// typescript complains because `pageStop` does not exist in `APMQueryParams`
// Going forward we should move away from globally declared query params and this is a first step
// @ts-ignore
const { name, environment, pageStep } = toQuery(search);

const res = useFetcher(
callApmApi => {
return callApmApi({
pathname: '/api/apm/settings/agent-configuration/view',
params: { query: { name, environment } }
});
},
[name, environment]
);

return (
<Settings>
<AgentConfigurationCreateEdit
pageStep={pageStep || 'choose-settings-step'}
existingConfigResult={res}
/>
</Settings>
);
}

export function CreateAgentConfigurationRouteHandler() {
const { search } = history.location;

// Ignoring here because we specifically DO NOT want to add the query params to the global route handler
// @ts-ignore
const { pageStep } = toQuery(search);

return (
<Settings>
<AgentConfigurationCreateEdit
pageStep={pageStep || 'choose-service-step'}
/>
</Settings>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export enum RouteName {
TRANSACTION_NAME = 'transaction_name',
SETTINGS = 'settings',
AGENT_CONFIGURATION = 'agent_configuration',
AGENT_CONFIGURATION_CREATE = 'agent_configuration_create',
AGENT_CONFIGURATION_EDIT = 'agent_configuration_edit',
INDICES = 'indices',
SERVICE_NODES = 'nodes',
LINK_TO_TRACE = 'link_to_trace',
Expand Down

This file was deleted.

This file was deleted.

Loading