Skip to content

Commit

Permalink
moving files
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Jun 23, 2021
1 parent d22b841 commit 7baf6a2
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/public/plugin.ts
Expand Up @@ -177,12 +177,12 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {

pluginSetupDeps.home?.tutorials.registerCustomComponent(
'TutorialConfigAgent',
() => import('./components/shared/tutorial/config_agent')
() => import('./tutorial/config_agent')
);

pluginSetupDeps.home?.tutorials.registerCustomComponent(
'TutorialConfigAgentRumScript',
() => import('./components/shared/tutorial/config_agent/rum_script')
() => import('./tutorial/config_agent/rum_script')
);

plugins.observability.dashboard.register({
Expand Down
Expand Up @@ -4,8 +4,6 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
// TODO: ${'http://localhost:8200'}' fallback server_url

export const dotnet = `{
"ElasticApm": {
"SecretToken": "{{{secretToken}}}",
Expand Down
Expand Up @@ -5,7 +5,6 @@
* 2.0.
*/

// TODO: ${'http://localhost:8200'}' fallback server_url
export const rails = `# config/elastic_apm.yml:
# Set the service name - allowed characters: a-z, A-Z, 0-9, -, _ and space
Expand Down
Expand Up @@ -7,7 +7,6 @@

import { i18n } from '@kbn/i18n';

// TODO: doesn't have token
export const rum = `import { init as initApm } from '@elastic/apm-rum'
var apm = initApm({
Expand Down Expand Up @@ -48,13 +47,12 @@ var apm = initApm({
environment: 'production'
})`;

// TODO: doesn't have token/url
export const rumScript = `\
<script src="https://your-cdn-host.com/path/to/elastic-apm-rum.umd.min.js" crossorigin></script>
<script>
elasticApm.init({
serviceName: 'your-app-name',
serverUrl: 'http://localhost:8200',
serverUrl: '{{{apmServerUrl}}}',
})
</script>
`;
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/
import { getPolicyOptions } from './get_policy_options';
import { APIReturnType } from '../../../../services/rest/createCallApmApi';
import { APIReturnType } from '../../services/rest/createCallApmApi';

type APIResponseType = APIReturnType<'GET /api/apm/fleet/agents'>;

Expand Down
Expand Up @@ -15,8 +15,8 @@ import { i18n } from '@kbn/i18n';
import { HttpStart } from 'kibana/public';
import React, { useEffect, useMemo, useState } from 'react';
import styled from 'styled-components';
import { APIReturnType } from '../../../../services/rest/createCallApmApi';
import { CopyCommands } from '../copy_commands';
import { APIReturnType } from '../..//services/rest/createCallApmApi';
import { CopyCommands } from './copy_commands';
import { PolicySelectorOption, PolicySelector } from './policy_selector';
import { getCommands } from './commands/get_commands';
import { getPolicyOptions } from './get_policy_options';
Expand Down Expand Up @@ -58,6 +58,7 @@ function TutorialConfigAgent({
});
const [isLoading, setIsLoading] = useState(true);
const [selectedOption, setSelectedOption] = useState<PolicySelectorOption>();
console.log('### caue ~ selectedOption', selectedOption);

useEffect(() => {
async function fetchData() {
Expand Down
Expand Up @@ -62,6 +62,7 @@ export function PolicySelector({
options={options}
selectedOptions={selectedOption ? [selectedOption] : []}
onChange={(selectedOptions) => {
console.log('### caue ~ selectedOptions', selectedOptions);
onChange(selectedOptions[0]);
}}
/>
Expand Down

0 comments on commit 7baf6a2

Please sign in to comment.