Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Jun 2, 2021
1 parent df1dcc7 commit f450b8c
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 78 deletions.
4 changes: 1 addition & 3 deletions x-pack/plugins/apm/public/application/application.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ describe('renderApp', () => {
observabilityRuleTypeRegistry,
} = mockApmPluginContextValue;

const registerSectionsSpy = jest.fn();

const plugins = {
licensing: { license$: new Observable() },
triggersActionsUi: { actionTypeRegistry: {}, alertTypeRegistry: {} },
Expand All @@ -73,7 +71,7 @@ describe('renderApp', () => {
const pluginsStart = ({
observability: {
navigation: {
registerSections: () => registerSectionsSpy,
registerSections: () => jest.fn(),
PageTemplate: ({ children }: { children: React.ReactNode }) => (
<div>hello worlds {children}</div>
),
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/public/application/csmApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { createCallApmApi } from '../services/rest/createCallApmApi';
import { px, units } from '../style/variables';
import { createStaticIndexPattern } from '../services/rest/index_pattern';
import { UXActionMenu } from '../components/app/RumDashboard/ActionMenu';
import { redirectTo } from '../components/routing/render_as_redirect';
import { redirectTo } from '../components/routing/redirect_to';

const CsmMainContainer = euiStyled.div`
padding: ${px(units.plus)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function ErrorGroupDetails({
<Titles>
<EuiText>
{logMessage && (
<Fragment>
<>
<Label>
{i18n.translate(
'xpack.apm.errorGroupDetails.logMessageLabel',
Expand All @@ -163,7 +163,7 @@ export function ErrorGroupDetails({
)}
</Label>
<Message>{logMessage}</Message>
</Fragment>
</>
)}
<Label>
{i18n.translate(
Expand Down
123 changes: 60 additions & 63 deletions x-pack/plugins/apm/public/components/app/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,68 +30,65 @@ export function Settings({ children }: { children: ReactNode }) {
}

return (
<>
<EuiPage>
<EuiPageSideBar>
<EuiSideNav
toggleOpenOnMobile={() => toggleOpenOnMobile()}
isOpenOnMobile={isSideNavOpenOnMobile}
items={[
{
name: i18n.translate('xpack.apm.settings.pageTitle', {
defaultMessage: 'Settings',
}),
id: 0,
items: [
{
name: i18n.translate('xpack.apm.settings.agentConfig', {
defaultMessage: 'Agent Configuration',
}),
id: '1',
href: getSettingsHref('/agent-configuration'),
isSelected: pathname.startsWith(
'/settings/agent-configuration'
),
},
...(canAccessML
? [
{
name: i18n.translate(
'xpack.apm.settings.anomalyDetection',
{
defaultMessage: 'Anomaly detection',
}
),
id: '4',
href: getSettingsHref('/anomaly-detection'),
isSelected:
pathname === '/settings/anomaly-detection',
},
]
: []),
{
name: i18n.translate('xpack.apm.settings.customizeApp', {
defaultMessage: 'Customize app',
}),
id: '3',
href: getSettingsHref('/customize-ui'),
isSelected: pathname === '/settings/customize-ui',
},
{
name: i18n.translate('xpack.apm.settings.indices', {
defaultMessage: 'Indices',
}),
id: '2',
href: getSettingsHref('/apm-indices'),
isSelected: pathname === '/settings/apm-indices',
},
],
},
]}
/>
</EuiPageSideBar>
<EuiPageBody>{children}</EuiPageBody>
</EuiPage>
</>
<EuiPage>
<EuiPageSideBar>
<EuiSideNav
toggleOpenOnMobile={() => toggleOpenOnMobile()}
isOpenOnMobile={isSideNavOpenOnMobile}
items={[
{
name: i18n.translate('xpack.apm.settings.pageTitle', {
defaultMessage: 'Settings',
}),
id: 0,
items: [
{
name: i18n.translate('xpack.apm.settings.agentConfig', {
defaultMessage: 'Agent Configuration',
}),
id: '1',
href: getSettingsHref('/agent-configuration'),
isSelected: pathname.startsWith(
'/settings/agent-configuration'
),
},
...(canAccessML
? [
{
name: i18n.translate(
'xpack.apm.settings.anomalyDetection',
{
defaultMessage: 'Anomaly detection',
}
),
id: '4',
href: getSettingsHref('/anomaly-detection'),
isSelected: pathname === '/settings/anomaly-detection',
},
]
: []),
{
name: i18n.translate('xpack.apm.settings.customizeApp', {
defaultMessage: 'Customize app',
}),
id: '3',
href: getSettingsHref('/customize-ui'),
isSelected: pathname === '/settings/customize-ui',
},
{
name: i18n.translate('xpack.apm.settings.indices', {
defaultMessage: 'Indices',
}),
id: '2',
href: getSettingsHref('/apm-indices'),
isSelected: pathname === '/settings/apm-indices',
},
],
},
]}
/>
</EuiPageSideBar>
<EuiPageBody>{children}</EuiPageBody>
</EuiPage>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ export function ErrorGroupOverview({ serviceName }: ErrorGroupOverviewProps) {
<ErrorDistribution
distribution={errorDistributionData}
title={i18n.translate(
'xpack.apm.serviceDetails.metrics.errorOccurrencesChartTitle',
{
defaultMessage: 'Error occurrences',
}
'xpack.apm.serviceDetails.metrics.errorOccurrencesChart.title',
{ defaultMessage: 'Error occurrences' }
)}
/>
</EuiPanel>
Expand All @@ -89,7 +87,12 @@ export function ErrorGroupOverview({ serviceName }: ErrorGroupOverviewProps) {
<EuiFlexItem>
<EuiPanel>
<EuiTitle size="xs">
<h3>Errors</h3>
<h3>
{i18n.translate(
'xpack.apm.serviceDetails.metrics.errorsList.title',
{ defaultMessage: 'Errors' }
)}
</h3>
</EuiTitle>
<EuiSpacer size="s" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ export function ServiceInventory() {
<>
<SearchBar />
<EuiFlexGroup direction="column" gutterSize="s">
{displayMlCallout ? (
{displayMlCallout && (
<EuiFlexItem>
<MLCallout onDismiss={() => setUserHasDismissedCallout(true)} />
</EuiFlexItem>
) : null}
)}
<EuiFlexItem>
<EuiPanel hasShadow={false}>
<ServiceList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
EditAgentConfigurationRouteHandler,
} from './route_handlers/agent_configuration';
import { enableServiceOverview } from '../../../common/ui_settings_keys';
import { redirectTo } from './render_as_redirect';
import { redirectTo } from './redirect_to';
import { ApmMainTemplate } from './templates/apm_main_template';
import { ApmServiceTemplate } from './templates/apm_service_template';
import { ServiceProfiling } from '../app/service_profiling';
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/apm/public/components/shared/search_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ function DebugQueryCallout() {
return (
<EuiFlexGroup>
<EuiFlexItem>
yolo
<EuiCallOut
title={i18n.translate(
'xpack.apm.searchBar.inspectEsQueriesEnabled.callout.title',
Expand Down

0 comments on commit f450b8c

Please sign in to comment.