Skip to content

Commit

Permalink
[Infra] Amend inventory title to "Infrastructure Inventory" (elastic#…
Browse files Browse the repository at this point in the history
…193189)

## Summary

Update the Inventory title terminology to be "Infrastructure Inventory",
in order to differentiate from the incoming top-level "Inventory" page.

<img width="481" alt="Screenshot 2024-09-17 170745"
src="https://github.com/user-attachments/assets/d72dfb6e-fe3b-44d8-b6f0-ae333586ceb4">

Closes elastic#192324 

# How to test

- Load Elastic cluster, go to Infrastructure -> Infrastructure Inventory

**Expected**: The side menu link text should match the breadcrumb title
and the main title text for the page.

---------

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
Bluefinger and elasticmachine authored Sep 20, 2024
1 parent b1434a4 commit 04c3486
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 22 deletions.
23 changes: 16 additions & 7 deletions x-pack/plugins/observability_solution/infra/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import type {
} from './types';
import { getLogsHasDataFetcher, getLogsOverviewDataFetcher } from './utils/logs_overview_fetchers';
import type { LogStreamSerializedState } from './components/log_stream/types';
import { hostsTitle, inventoryTitle, metricsExplorerTitle, metricsTitle } from './translations';

export class Plugin implements InfraClientPluginClass {
public config: InfraPublicConfig;
Expand Down Expand Up @@ -163,17 +164,27 @@ export class Plugin implements InfraClientPluginClass {
...(capabilities.infrastructure.show
? [
{
label: 'Infrastructure',
label: metricsTitle,
sortKey: 300,
entries: [
{ label: 'Inventory', app: 'metrics', path: '/inventory' },
{
label: inventoryTitle,
app: 'metrics',
path: '/inventory',
},
...(this.config.featureFlags.metricsExplorerEnabled
? [{ label: 'Metrics Explorer', app: 'metrics', path: '/explorer' }]
? [
{
label: metricsExplorerTitle,
app: 'metrics',
path: '/explorer',
},
]
: []),
...(isInfrastructureHostsViewEnabled
? [
{
label: 'Hosts',
label: hostsTitle,
app: 'metrics',
path: '/hosts',
},
Expand Down Expand Up @@ -269,9 +280,7 @@ export class Plugin implements InfraClientPluginClass {
return [
{
id: 'inventory',
title: i18n.translate('xpack.infra.homePage.inventoryTabTitle', {
defaultMessage: 'Inventory',
}),
title: inventoryTitle,
path: '/inventory',
visibleIn,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const metricsTitle = i18n.translate('xpack.infra.header.infrastructureTit
defaultMessage: 'Infrastructure',
});

export const inventoryTitle = i18n.translate('xpack.infra.metrics.inventoryPageTitle', {
defaultMessage: 'Inventory',
export const inventoryTitle = i18n.translate('xpack.infra.metrics.infrastructureInventoryTitle', {
defaultMessage: 'Infrastructure Inventory',
});

export const metricsExplorerTitle = i18n.translate('xpack.infra.metrics.metricsExplorerTitle', {
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -23005,7 +23005,6 @@
"xpack.infra.header.logsTitle": "Logs",
"xpack.infra.header.observabilityTitle": "Observability",
"xpack.infra.hideHistory": "Masquer l'historique",
"xpack.infra.homePage.inventoryTabTitle": "Inventory",
"xpack.infra.homePage.kubernetesToastButton": "Démarrer l'enquête",
"xpack.infra.homePage.kubernetesToastText": "Aidez-nous à concevoir votre expérience Kubernetes en répondant à l'enquête de satisfaction.",
"xpack.infra.homePage.kubernetesToastTitle": "Nous avons besoin de votre aide !",
Expand Down Expand Up @@ -23565,7 +23564,6 @@
"xpack.infra.metrics.invalidNodeErrorTitle": "Il semblerait que {nodeName} ne collecte aucune donnée d'indicateurs",
"xpack.infra.metrics.inventory.alertFlyout.alertDescription": "Alerte lorsque l'inventaire dépasse un seuil défini.",
"xpack.infra.metrics.inventory.alertName": "Inventaire",
"xpack.infra.metrics.inventoryPageTitle": "Inventaire",
"xpack.infra.metrics.loadingNodeDataText": "Chargement des données",
"xpack.infra.metrics.metricsExplorerTitle": "Metrics Explorer",
"xpack.infra.metrics.missingTSVBModelError": "Le modèle TSVB pour {metricId} n'existe pas pour {nodeType}",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -22995,7 +22995,6 @@
"xpack.infra.header.logsTitle": "ログ",
"xpack.infra.header.observabilityTitle": "Observability",
"xpack.infra.hideHistory": "履歴を表示しない",
"xpack.infra.homePage.inventoryTabTitle": "インベントリ",
"xpack.infra.homePage.kubernetesToastButton": "調査を開始",
"xpack.infra.homePage.kubernetesToastText": "フィードバックアンケートに答えて、Kubernetes経験の設計を支援してください。",
"xpack.infra.homePage.kubernetesToastTitle": "ご協力をお願いします。",
Expand Down Expand Up @@ -23553,7 +23552,6 @@
"xpack.infra.metrics.invalidNodeErrorTitle": "{nodeName} がメトリックデータを収集していないようです",
"xpack.infra.metrics.inventory.alertFlyout.alertDescription": "インベントリが定義されたしきい値を超えたときにアラートを発行します。",
"xpack.infra.metrics.inventory.alertName": "インベントリ",
"xpack.infra.metrics.inventoryPageTitle": "インベントリ",
"xpack.infra.metrics.loadingNodeDataText": "データを読み込み中",
"xpack.infra.metrics.metricsExplorerTitle": "メトリックエクスプローラー",
"xpack.infra.metrics.missingTSVBModelError": "{nodeType}では{metricId}の TSVB モデルが存在しません",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -23023,7 +23023,6 @@
"xpack.infra.header.logsTitle": "日志",
"xpack.infra.header.observabilityTitle": "Observability",
"xpack.infra.hideHistory": "隐藏历史记录",
"xpack.infra.homePage.inventoryTabTitle": "库存",
"xpack.infra.homePage.kubernetesToastButton": "开始调查",
"xpack.infra.homePage.kubernetesToastText": "通过完成反馈调查帮助我们设计您的 Kubernetes 体验。",
"xpack.infra.homePage.kubernetesToastTitle": "我们需要您的帮助!",
Expand Down Expand Up @@ -23583,7 +23582,6 @@
"xpack.infra.metrics.invalidNodeErrorTitle": "似乎 {nodeName} 未在收集任何指标数据",
"xpack.infra.metrics.inventory.alertFlyout.alertDescription": "当库存超过定义的阈值时告警。",
"xpack.infra.metrics.inventory.alertName": "库存",
"xpack.infra.metrics.inventoryPageTitle": "库存",
"xpack.infra.metrics.loadingNodeDataText": "正在加载数据",
"xpack.infra.metrics.metricsExplorerTitle": "指标浏览器",
"xpack.infra.metrics.missingTSVBModelError": "{nodeType} 的 {metricId} TSVB 模型不存在",
Expand Down
10 changes: 6 additions & 4 deletions x-pack/test/functional/apps/infra/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await pageObjects.header.waitUntilLoadingHasFinished();

const documentTitle = await browser.getTitle();
expect(documentTitle).to.contain('Inventory - Infrastructure - Observability - Elastic');
expect(documentTitle).to.contain(
'Infrastructure Inventory - Infrastructure - Observability - Elastic'
);
});

it('renders the inventory survey link', async () => {
Expand Down Expand Up @@ -457,7 +459,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.tryForTime(5000, async () => {
const documentTitle = await browser.getTitle();
expect(documentTitle).to.contain(
'host-5 - Inventory - Infrastructure - Observability - Elastic'
'host-5 - Infrastructure Inventory - Infrastructure - Observability - Elastic'
);
});

Expand All @@ -474,7 +476,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.tryForTime(5000, async () => {
const documentTitle = await browser.getTitle();
expect(documentTitle).to.contain(
'pod-0 - Inventory - Infrastructure - Observability - Elastic'
'pod-0 - Infrastructure Inventory - Infrastructure - Observability - Elastic'
);
});

Expand All @@ -492,7 +494,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.tryForTime(5000, async () => {
const documentTitle = await browser.getTitle();
expect(documentTitle).to.contain(
'container-id-4 - Inventory - Infrastructure - Observability - Elastic'
'container-id-4 - Infrastructure Inventory - Infrastructure - Observability - Elastic'
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await pageObjects.header.waitUntilLoadingHasFinished();

const documentTitle = await browser.getTitle();
expect(documentTitle).to.contain('Inventory - Infrastructure - Observability - Elastic');
expect(documentTitle).to.contain(
'Infrastructure Inventory - Infrastructure - Observability - Elastic'
);
});

it('renders an empty data prompt for dates with no data', async () => {
Expand Down Expand Up @@ -85,7 +87,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.try(async () => {
const documentTitle = await browser.getTitle();
expect(documentTitle).to.contain(
'demo-stack-redis-01 - Inventory - Infrastructure - Observability - Elastic'
'demo-stack-redis-01 - Infrastructure Inventory - Infrastructure - Observability - Elastic'
);
});

Expand All @@ -101,7 +103,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.try(async () => {
const documentTitle = await browser.getTitle();
expect(documentTitle).to.contain(
'pod-0 - Inventory - Infrastructure - Observability - Elastic'
'pod-0 - Infrastructure Inventory - Infrastructure - Observability - Elastic'
);
});

Expand Down

0 comments on commit 04c3486

Please sign in to comment.