Skip to content

Commit

Permalink
[RUM Dashboard] Update rum title to be consistent with APM (#70460)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored Jul 1, 2020
1 parent 0066702 commit 9ff68e4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 56 deletions.
7 changes: 1 addition & 6 deletions x-pack/plugins/apm/public/components/app/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { ServiceOverview } from '../ServiceOverview';
import { TraceOverview } from '../TraceOverview';
import { RumOverview } from '../RumDashboard';
import { RumOverviewLink } from '../../shared/Links/apm/RumOverviewLink';
import { I18LABELS } from '../RumDashboard/translations';

function getHomeTabs({
serviceMapEnabled = true,
Expand Down Expand Up @@ -109,11 +108,7 @@ export function Home({ tab }: Props) {
<EuiFlexGroup alignItems="center">
<EuiFlexItem grow={false}>
<EuiTitle size="l">
<h1>
{selectedTab.name === 'rum-overview'
? I18LABELS.endUserExperience
: 'APM'}
</h1>
<h1>APM</h1>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,33 @@ import { ClientMetrics } from './ClientMetrics';
import { PageViewsTrend } from './PageViewsTrend';
import { PageLoadDistribution } from './PageLoadDistribution';
import { I18LABELS } from './translations';
import { useUrlParams } from '../../../hooks/useUrlParams';

export function RumDashboard() {
const { urlParams } = useUrlParams();

const { environment } = urlParams;

let environmentLabel = environment || 'all environments';

if (environment === 'ENVIRONMENT_NOT_DEFINED') {
environmentLabel = 'undefined environment';
}

return (
<>
<EuiTitle>
<h2>{I18LABELS.getWhatIsGoingOn(environmentLabel)}</h2>
</EuiTitle>
<EuiSpacer />
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem>
<EuiPanel>
<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexItem grow={1} data-cy={`client-metrics`}>
<EuiTitle size="xs">
<h3>{I18LABELS.pageLoadTimes}</h3>
</EuiTitle>
<EuiSpacer size="s" />
<ClientMetrics />
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
</EuiFlexItem>
<EuiFlexItem>
<EuiPanel>
<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexItem grow={3}>
<PageLoadDistribution />
<PageViewsTrend />
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</>
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem>
<EuiPanel>
<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexItem grow={1} data-cy={`client-metrics`}>
<EuiTitle size="xs">
<h3>{I18LABELS.pageLoadTimes}</h3>
</EuiTitle>
<EuiSpacer size="s" />
<ClientMetrics />
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
</EuiFlexItem>
<EuiFlexItem>
<EuiPanel>
<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexItem grow={3}>
<PageLoadDistribution />
<PageViewsTrend />
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
import { i18n } from '@kbn/i18n';

export const I18LABELS = {
endUserExperience: i18n.translate('xpack.apm.rum.dashboard.title', {
defaultMessage: 'End User Experience',
}),
getWhatIsGoingOn: (environmentVal: string) =>
i18n.translate('xpack.apm.rum.dashboard.environment.title', {
defaultMessage: `What's going on in {environmentVal}?`,
values: { environmentVal },
}),
backEnd: i18n.translate('xpack.apm.rum.dashboard.backend', {
defaultMessage: 'Backend',
}),
Expand Down

0 comments on commit 9ff68e4

Please sign in to comment.