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

[Metrics UI] Rename "Metrics" to "Infrastructure" in appropriate places #135278

4 changes: 2 additions & 2 deletions x-pack/plugins/infra/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class Plugin implements InfraClientPluginClass {
...(capabilities.infrastructure.show
? [
{
label: 'Metrics',
label: 'Infrastructure',
sortKey: 300,
entries: [
{ label: 'Inventory', app: 'metrics', path: '/inventory' },
Expand Down Expand Up @@ -169,7 +169,7 @@ export class Plugin implements InfraClientPluginClass {
core.application.register({
id: 'metrics',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is just for the labels, isn't it? I'm wondering if the application register should have the id replaced too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m thinking not at this point. Similar to how I’d like to leave the urls as-is. Especially with the growing interactions with apm UI it seems best to keep this change in the view layer.

title: i18n.translate('xpack.infra.metrics.pluginTitle', {
defaultMessage: 'Metrics',
defaultMessage: 'Infrastructure',
}),
euiIconType: 'logoObservability',
order: 8200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
]);
});

it('shows metrics navlink', async () => {
it('shows infrastructure navlink', async () => {
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).to.eql(['Overview', 'Alerts', 'Metrics', 'Stack Management']);
expect(navLinks).to.eql(['Overview', 'Alerts', 'Infrastructure', 'Stack Management']);
});

describe('infrastructure landing page without data', () => {
Expand Down Expand Up @@ -161,7 +161,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

it('shows metrics navlink', async () => {
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).to.eql(['Overview', 'Alerts', 'Metrics', 'Stack Management']);
expect(navLinks).to.eql(['Overview', 'Alerts', 'Infrastructure', 'Stack Management']);
});

describe('infrastructure landing page without data', () => {
Expand Down Expand Up @@ -359,7 +359,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

it(`doesn't show metrics navlink`, async () => {
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).to.not.contain(['Metrics']);
expect(navLinks).to.not.contain(['Infrastructure']);
});

it(`metrics app is inaccessible and returns a 403`, async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await spacesService.delete('custom_space');
});

it('shows Metrics navlink', async () => {
it('shows Infrastructure navlink', async () => {
await PageObjects.common.navigateToApp('home', {
basePath: '/s/custom_space',
});
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).to.contain('Metrics');
expect(navLinks).to.contain('Infrastructure');
});

it(`Metrics app is accessible`, async () => {
it(`Infrastructure app is accessible`, async () => {
await PageObjects.common.navigateToApp('infraOps', {
basePath: '/s/custom_space',
});
Expand All @@ -72,15 +72,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
});

it(`doesn't show metrics navlink`, async () => {
it(`doesn't show infrastructure navlink`, async () => {
await PageObjects.common.navigateToApp('home', {
basePath: '/s/custom_space',
});
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).not.to.contain('Metrics');
expect(navLinks).not.to.contain('Infrastructure');
});

it(`metrics app is inaccessible and Application Not Found message is rendered`, async () => {
it(`infrastructure app is inaccessible and Application Not Found message is rendered`, async () => {
await PageObjects.common.navigateToActualUrl('infraOps', '', {
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
Expand Down Expand Up @@ -114,7 +114,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
});

it(`Metrics app is accessible`, async () => {
it(`Infrastructure app is accessible`, async () => {
await PageObjects.common.navigateToApp('infraOps', {
basePath: '/s/custom_space',
});
Expand All @@ -139,7 +139,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
});

it(`Metrics app is accessible`, async () => {
it(`Infrastructure app is accessible`, async () => {
await PageObjects.common.navigateToApp('infraOps', {
basePath: '/s/custom_space',
});
Expand Down